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”

Good 64GB MicroSD XC cards from Toshiba and SanDisk

Since Android lollipop update on my Xperia phone and tablet I was in desperate need for more storage space.

Earlier this year I bought Toshiba MicroSD XC 64GB card for Xperia Z2 tablet with declared speed of 40MB/s. You can find a card like this one for $23.59 with free shipping on eBay. I can recommend the following seller and their super fast delivery service: Continue reading “Good 64GB MicroSD XC cards from Toshiba and SanDisk”