Skip to content

Instantly share code, notes, and snippets.

View jphase's full-sized avatar

Jeff Hays jphase

View GitHub Profile
@jphase
jphase / .bash_profile_mac
Last active February 18, 2016 01:40
Mac Bash Profile
# Bash shortcuts
alias ll='ls -Ghal $@'
alias ls='ls -G $@'
alias grep='grep --colour $@'
alias mkdir='mkdir -p $@'
# Git shortcuts
alias gitclean='git diff --diff-filter=D --name-only -z | xargs -0 git rm'
alias gitquick='git pull && git add . && echo "Enter a commit message (optional): " && read MSG && git commit -m "$MSG" && git push origin master'
alias gadd='git add .'
@jphase
jphase / clear-fb-images.js
Last active March 24, 2016 16:03
Clear Facebook Cached Images on Current URL (Bookmarklet)
javascript: (function() {
var jquery = document.createElement('script');
jquery.setAttribute('src', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js');
document.body.appendChild(jquery);
jQuery.post( 'https://graph.facebook.com', {
id: window.location.href,
scrape: true
}, function(response) {
if ( typeof response == 'object' && response.hasOwnProperty('url') && response.hasOwnProperty('image') ) {
Resize images in a directory with ImageMagick:
mogrify -path /path/to/image/folder -resize 60x60% -quality 60 -format jpg *.png