Skip to content

Instantly share code, notes, and snippets.

@DavideD
DavideD / gist:4008816
Created November 3, 2012 21:08
ImageMagick PDF conversion
convert -verbose -density 150 -trim original.pdf -quality 100 -sharpen 0x1.0 converted.bmp
convert a.png b.png -compress jpeg -resize 1240x1753 \
-units PixelsPerInch -density 150x150 \
-repage a4 multipage.pdf
@DavideD
DavideD / gist:3742603
Created September 18, 2012 11:10
Git common options for repository
#The receive.denyNonFastforwards flag makes sure that merges can't happen when you push to the repo. You have to do the merges on your local machine, and then push the result.
git config receive.denyNonFastforwards true
@DavideD
DavideD / git_lg.sh
Created August 6, 2012 21:18
Better git log
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset%cn' --abbrev-commit"
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen(%cr, %cn) %C(bold blue)%Creset' --abbrev-commit"