Sunday, May 24, 2015

Latex / Bibtex rename Bibliography / references section when using babel

\addto\captionsenglish{\renewcommand{\refname}{Newname}} %% for babel

Monday, May 11, 2015

Kubuntu 12.04 wifi before logon

Check both boxes in network manger to get wifi running before login:
connect automatically & system connection

bash config files

For this task, you don't have to write fat parser routines (unless you want it 100% secure or you want a special file syntax) - you can use Bash's source command. The file to be sourced should be formated in key="value" format, otherwise bash will try to interpret commands:
#!/bin/bash
echo "Reading config...." >&2
source /etc/cool.cfg
echo "Config for the username: $cool_username" >&2
echo "Config for the target host: $cool_host" >&2
So, where do these variables come from? If everything works fine, they are defined in /etc/cool.cfg which is a file that's sourced into the current script or shell. Note that this is not the same as executing this file as a script! The sourced file most likely contains something like:
cool_username="guest"
cool_host="foo.example.com"
These are normal statements understood by Bash, nothing special to do. Of course (and that is a big disadvantage under normal circumstances) the sourced file can contain everything that Bash understands, including evil code!
Src/more: http://wiki.bash-hackers.org/howto/conffile

Wednesday, May 6, 2015

Subversion 1.7 on Ubuntu 12.04

there’s an official Subversion PPA on Launchpad, so for Ubuntu 12.04 all you have to do is add the following couple lines to your /etc/apt/sources.list file:

deb http://ppa.launchpad.net/svn/ppa/ubuntu precise main 
deb-src http://ppa.launchpad.net/svn/ppa/ubuntu precise main 

 To configure APT to trust this repository's signing key, run script from the page
https://launchpad.net/~svn/+archive/ubuntu/ppa

And upgrade Subversion to its latest version with apt-get:
sudo apt-get update
sudo apt-get install subversion

Source: https://kovshenin.com/2013/subversion-1-7-on-ubuntu-12-04/ 

Thursday, April 30, 2015

Obtain the number of CPUs / cores in Linux / bash

grep -c ^processor /proc/cpuinfo 
 
Src:http://stackoverflow.com/questions/6481005/obtain-the-number-of-cpus-cores-in-linux 

Monday, April 27, 2015

Inkscape - change the color of markers

How do I change the color of markers (e.g., arrow ends)?

By default, markers are black. You can change their color to match the color of the stroke of the object they are applied to by enabling an effect: Extensions > Modify Path > Color Markers to Match Stroke. 

http://wiki.inkscape.org/wiki/index.php/Frequently_asked_questions#How_do_I_change_the_color_of_markers_.28e.g..2C_arrow_ends.29.3F

Tuesday, March 31, 2015

Adding alpha (transparent) background to jpeg images, logos

- Some posters, powerpoints, have non-white backgrounds. Company logos with transparency look nicer on these. However, sometimes logos are only available in the jpeg format.

- Tools like GIMP/KolourPaint will easily flood-fill the white as alpha, except for the closed figures like "O,e" letters. This can be done by hand, than the result saved as png with alpha channel.

- However, jpeg images are full of shades of white, so the result can be very messy sometimes.

- Solution: use advanced software such as ImageJ, to change the contrast so any intensity value say, above 250/255, will be brought to 255. Then automatic flood-fill of the other software programs will be a lot more efficient.

Note: as of 03/2015, ImageJ does not natively support the alpha channel, so other paint software is still required to finish the job.