Skip to content

Instantly share code, notes, and snippets.

View jtescher's full-sized avatar

Julian Tescher jtescher

View GitHub Profile
@jtescher
jtescher / outdated_gems.sh
Created March 21, 2013 23:54
Determine outdated gems without listing dependencies of dependencies
#!/bin/bash
bundle outdated | awk '{print($2)}' | while read line
do
if grep -q "gem '$line'" Gemfile; then
echo $line
fi
done
@jtescher
jtescher / gist:5059049
Created February 28, 2013 18:41
Amazon EC2 Instance private IP addresses
ec2-describe-instances --region us-west-2 | grep INSTANCE | awk {'print $5'} | awk -F"." '{print $1}'
@jtescher
jtescher / gist:3183389
Created July 26, 2012 17:36
zsh-theme
PROMPT='%3~$(git_prompt_info)%# '
ZSH_THEME_GIT_PROMPT_PREFIX="["
ZSH_THEME_GIT_PROMPT_SUFFIX="]"
@jtescher
jtescher / gist:1487555
Created December 16, 2011 19:31
Capistrano task: Optimize images with pngcrush and jpegoptim
namespace :image_compression do
desc 'Optimize images with pngcrush and jpegoptim'
task :process do
# Check for pngcrush
if (!`which pngcrush`.empty? rescue false) # rescue on environments without `which` (windows)
# Crush all .png files
run "find #{shared_path}/assets/ -type f -name '*.png' -print0 | xargs -0 pngcrush -q -e .crushed"