Set syntax highlighting in Vi/Vim with dark background

I always forget how to do this and I need to write it down:

Turn on syntax highlighting with:

:syntax on

If highlighting looks to dark, then you are probably using dark background, so set it to achieve better readability:

:set background=dark

To make these two changes permanent, edit ~/.vimrc file and enter:

syntax on
  set background=dark

To turn of syntax highlighting do:

:syntax off

To go back to light background do:

:set background=light

or delete the lines from ~/.vimrc file.

Bash zip all files in directory one by one in individual zips

If you like me have for example folder filled with NES rom files that end with .nes extension and you would like to zip them all up in individual files to save some space.

I use this one-liner to zip all my NES collection so that it will take less space on my USB stick when I transfer it to my bartop arcade running RetroPie:

for file in *.nes ; do zip "$file.zip" "$file"; done

Continue reading “Bash zip all files in directory one by one in individual zips”

Excellent protective ABS Case for Raspberry Pi 2 / B+ for multimedia use

Beside retro-gaming I am using Raspberry Pi 2 as my always on media center running Xbian.

I weighted between OpenELEC and Xbian and at the moment of my decision Xbian won me over with file-system. Xbian uses btrfs snapshot system which proved to be quite useful if you run into any kind of trouble since it is really easy to do a fallback to previous file system snapshot. Continue reading “Excellent protective ABS Case for Raspberry Pi 2 / B+ for multimedia use”