Auriol IAN94702 kitchen timer manual

Each time there is time change between summer and winter I always have to look for a manual to kitchen timer Auriol IAN94702.
Now it is in this place so I don’t have to look for it.

Auriol IAN94702 kitchen timer manual PDF

Quick manual for Setting the time:

  1. In Clock mode, press and hold down the CLOCK (TIMER) key 5 for 3 seconds. The top field of the display 1 flashes.
  2. Press the SEC key 4 , the MIN key 3 or the HR key 2 to change the displayed values for seconds (SEC), minutes
    (MIN) or hours (HR) in steps. TIP: Press and hold the key to make the numbers change
    more quickly.
  3. Press the CLOCK (TIMER) key briefly, in order to confirm the set time. The time does not flash.

Colors in git diff

When I use git a diff function is really useful but by default it displays VT100 commands instead text coloring. This is solution how to enable colors in git diff.

Solution:

add this line to your ~/.cshrc.user

setenv LESS -R

and source that file:

source ~/.cshrc.user

Remove multiple spaces in Erlang

I recently I ran into a problem in Erlang project and I had to find a way to Remove multiple spaces in string and leave only one one space.

Some string with     extra        spaces.

Solution:

Here is solution how to remove it with simple re:replace

re:replace("Some string with     extra        spaces.", "(\\s+\\s+)", " ", [global,{return,list}]).

and the returned output is:

Some string with extra spaces.

Useful links:

http://stackoverflow.com/questions/12794358/how-to-strip-all-blank-characters-in-a-string-in-erlang

sed in-place – find and replace string in all files

Sed is a really powerful and useful linux program when you want to replace certain string in a file.
But it gets harder when you wan replase srting in all available files in directory .
Here is the solution with sed in-place command:

find /home/user/mydir -type f -exec sed -i 's/oldstring/newstring/g' {} \;

Useful links:

http://linux.about.com/od/commands/l/blcmdl1_sed.htm

Source:

http://www.brunolinux.com/02-The_Terminal/Find_and%20Replace_with_Sed.html

Create and extract tar.gz files on any Linux

I allways forget how to extract a *.tar.gz file from command line on Linux, so I have to write it down.

Example of extract tar file:

tar -xvf file.tar.gz

Where:
x extract
v verbose output (prints all extracted files)
f specify input filename
z decompress

Example of creating archive with tar:

tar -cvzf compressed_file.tar /path/to/directory

Where:
c create archive
v verbose output
f specify output filename
z compress

Other examples:
Create compressed archive with three files from separate directories:

tar -cvzf compressed_file.tar /path/to/file1 /path/to/file2 /path/to/file3

Czytaj więcej

Giving general verdict (true or false) from function execution on a list

General:
Return true if all function returns are true.
If there is at least one false returns false.

Similar to And function but gives the opportunity to execute an additional function

Val1 And Val2 And Val3 ...

Returns true when:

(true And true And true And true) = true

Returns false when:

(true And false And true And true) = false

Erlang code:

Verdicts = [true, true, false, true].
Verdict = lists:all(fun(Elem)->Elem end, Verdicts).

Where:

fun(Elem)->Elem

returns the element of a list

More complex example:
We have a list with tuples:

{day_of_week_atom, Temeprature_value}

and we want to check if it was a warm week (temperature above 20 degrees of Celsius)

List = [{monday,21},{tuesday,22},{wednesday,6},{thursday,22},{friday,21}].
	lists:all(fun({_,Temperature})-> Temperature >= 20 end, List).

Tip:
Function is executed on each element of a list until first false is returned.
So for above example it will be executed for Monday, Tuesday and Wednesday