In order to have local copies of my web pages hosted on VPS I have configured rsync cronjob to sync everything during the night to my local box.
Sometimes with larger files you can encounter errors like these:
Received disconnect from [YOUR_IP]: 2: Packet corrupt
rsync: [sender] write error: Broken pipe (32)
rsync error: unexplained error (code 255) at io.c(820) [sender=3.1.1]
Continue reading “How to fix corrupt packet error for with rsync for large files”
After a long time I got the urge to code something for our bellowed Commodore 64. Since it’s a pain to do it on a real machine, it takes a lot of time to set everything up since I do not have permanent location for my C64 in the apartment.
Continue reading “Configure Sublime Editor with KickAss on Debian 8 Jessie”
To format my USB sticks that I use following set of commands:
Assuming my USB stick is recognized as sdc, and has a primary partition created this is the set of commands that I use:
# create ext4 filesystem without journal
mkfs.ext4 -O ^has_journal /dev/sdc1
# give your newly formatted partition a name
e2label /dev/sdc1 storage
# Use data mode for filesystem as writeback for better performance
tune2fs -o journal_data_writeback /dev/sdc1
# Disable reserved space on my 57GB drive it wastes 5% which is 3GB
tune2fs -m 0 /dev/sdc1
It’s always good when you are looking for a way to do a task and you find great one-liner that just does the job right:
diff -rq directory1/ directory2
Switches “r” and “q” will recursively compare the two directories and showing brief output. Continue reading “Compare contents of two directories in bash”
I do not use vim macros often, but they can be useful from time to time. But when I need them I always need to re-learn the shortcuts, so now I will summarize them in simple example which will create number list from 1. to 50.
Start your vim editor by typing:
Continue reading “Create incremental number list in vim with using simple macro”