mv filename.zip `date +%Y-%m-%d_%H:%M`_filename.zip
Categoria: Linux
github patching
obtain a patch from commin
https://github.com/xxxxx/xxxxx/commit/yyyyyyyyyyyyyyyyyyyyyyyyy
adding .patch at the end, so
https://github.com/xxxxx/xxxxx/commit/yyyyyyyyyyyyyyyyyyyyyyyyy.patch
to verify patch use
$ git apply --check filename.patch
to apply it use
$ git apply filename.patch
wine on cinnamon
added expand = true under GtkScrolledWindow object as follow
<object class="GtkScrolledWindow" id="zenity_tree_window"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="shadow_type">in</property> <property name="expand">True</property>
monodevelop 4 and oxygen
to use oxygen is required start monodevelop as follow:
OXYGEN_DISABLE_INNER_SHADOWS_HACK=1 monodevelop
backup / restore hd
Backup the drive.
# dd if=/dev/hda conv=sync,noerror bs=64K gzip -c > /mnt/sda1/hda.img.gz
“dd” is the command to make a bit-by-bit copy of “if=/dev/hda” as the “Input File” to “of=/mnt/sda1/hda.img.gz” as the “Output File”. Everything from the partition will go into an “Output File” named “hda.img.gz”. “conv=sync,noerror” tells dd that if it can’t read a block due to a read error, then it should at least write something to its output of the correct length. Even if your hard disk exhibits no errors, remember that dd will read every single block, including any blocks which the OS avoids using because it has marked them as bad. “bs=64K” is the block size of 64×1024 Bytes. Using this large of block size speeds up the copying process. The output of dd is then piped through gzip to compress it.
To restore your system:
# gunzip -c /mnt/sda1/hda.img.gz dd of=/dev/hda conv=sync,noerror bs=64K
NOTE: I’ve had much success leaving out “conv=sync,noerror” during restore.
To check status use:
# kill -USR1 <PID>
From images to pdf and other
To obtain pdf from images:
convert -compress jpeg *.jpg output.pdf
To merge more pdf:
pdftk file1.pdf file2.pdf cat output newFile.pdf
To split pdf (one file per page):
pdftk user_guide.pdf burst
create one image for each pdf page :
convert foo.pdf foo.png
To remove page from 10 to 25:
pdftk myDocument.pdf cat 1-9 26-end output removedPages.pdf