Skip to content

Instantly share code, notes, and snippets.

View garrison's full-sized avatar

Jim Garrison garrison

View GitHub Profile
@jottr
jottr / pdfcrop
Created December 4, 2015 16:55
A better pdfcrop, which preserves links
#!/bin/bash
# from http://tex.stackexchange.com/questions/42236/pdfcrop-generates-larger-file
function usage () {
echo "Usage: `basename $0` [Options] <input.pdf> [<output.pdf>]"
echo
echo " * Removes white margins from each page in the file. (Default operation)"
echo " * Trims page edges by given amounts. (Alternative operation)"
echo
echo "If only <input.pdf> is given, it is overwritten with the cropped output."
@un33k
un33k / nginx.conf
Last active January 17, 2023 22:36
Enable Nginx to send Content-Dispositions on specific files
server {
listen *:80;
server_name www.example.com;
rewrite ^(.*) http://example.com $1 permanent;
}
server {
listen *:80;
server_name example.com;
@benbahrenburg
benbahrenburg / gist:1129364
Created August 6, 2011 14:15
Tell git to globally ignore .DS_Store
git config --global core.excludesfile ~/.gitignore
echo .DS_Store >> ~/.gitignore