Remove enter network password popup when accessing your shares

I am really annoyed by Windows message that pops up every time when I access my network share asking me to enter my credentials.

I have Samba share running on my D-Link DNS-320 NAS with two shared volumes that I have mounted as network drives Y and Z.

Assignment of drives will work until you restart your PC. After restart you will be presented withe message like this: Continue reading “Remove enter network password popup when accessing your shares”

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”