Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add emacs alias, other tweeks

  • Loading branch information...
commit e7bc960d2376ae6e0ace55310269608e7effea39 1 parent a2c4713
@tclem authored
View
4 bin/gifme
@@ -12,8 +12,8 @@
output="$HOME/Desktop/animated.gif"
-convert -verbose -delay 15 -loop 0 -resize 500 -layers OptimizeTransparency \
+convert -verbose -delay 60 -loop 0 -resize 500 -layers OptimizeTransparency \
$* $output
# comment out if you don't need CloudApp.
-cloudapp $output
+# cloudapp $output
View
57 bin/mustacheme
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# mustacheme
+# expanded from an idea from Rick Olson (@technoweenie)
+#
+# Takes a .gif, splits it into constituent frames, mustaches each, restitches
+# the gif, and uploads to cloudapp.
+#
+# This leverages the nifty service mustachify.me, which will analyze your photo,
+# identify faces, and add a mustache to your image.
+#
+# If the .gif is a remote file, we'll download it and blow it up locally.
+#
+# $1 - the path of the gif
+#
+# Examples:
+#
+# mustacheme holman-jumping-off-cliff-into-butter.gif
+# mustacheme http://github.com/holman/butter/blob/master/holman-butter.gif
+#
+# Dependencies:
+#
+# - ImageMagick. If you're on a Mac, run:
+# brew install imagemagick
+# - wget
+# - cloudapp: https://github.com/holman/dotfiles/blob/master/bin/cloudapp
+# - gifme: https://github.com/holman/gifme
+
+set -e
+
+# Set up mustacheme temporary working directory
+output=/tmp/mustacheme
+rm -rf $output
+mkdir $output
+
+if [[ $1 == http* ]]
+then
+ wget $1 -O /tmp/mustache-download.gif
+ file=/tmp/mustache-download.gif
+else
+ file="$1"
+fi
+
+# Blow apart the GIF
+convert $1 -coalesce $output/frame_%03d.gif
+
+# Mustache each frame
+for frame in $output/*.gif
+do
+ url=$(cloudapp $frame | grep Uploaded | awk '{print substr($0, index($0, "http://"))}')
+ url="$url/$(basename $frame)"
+ wget "http://mustachify.me/?src=$url" -O "$frame-stache"
+done
+
+# Ding! Fries are done.
+gifme $output/*-stache -d 0
+
View
7 zsh/aliases.zsh
@@ -1,9 +1,14 @@
alias dotmate='mate $ZSH'
alias dotcd='cd $ZSH'
-alias be='bundle exec'
alias reload!='. ~/.zshrc'
alias v=mvim
+alias emacs="/usr/local/Cellar/emacs/23.3a/Emacs.app/Contents/MacOS/Emacs -nw"
+
+# mvim()
+# {
+ # (unset GEM_PATH GEM_HOME; command mvim "$@")
+# }
alias pu='pushd'
alias po='popd'
View
38 zsh/plugins/bundler/plugin.zsh
@@ -0,0 +1,38 @@
+alias be="bundle exec"
+alias bi="bundle install"
+alias bl="bundle list"
+alias bu="bundle update"
+alias bp="bundle package"
+
+# The following is based on https://github.com/gma/bundler-exec
+
+# bundled_commands=(cap capify cucumber guard heroku rackup rails rake rspec ruby shotgun spec spork thin unicorn unicorn_rails)
+
+# # Functions
+
+# _bundler-installed() {
+# which bundle > /dev/null 2>&1
+# }
+
+# _within-bundled-project() {
+# local check_dir=$PWD
+# while [ "$(dirname $check_dir)" != "/" ]; do
+# [ -f "$check_dir/Gemfile" ] && return
+# check_dir="$(dirname $check_dir)"
+# done
+# false
+# }
+
+# _run-with-bundler() {
+# if _bundler-installed && _within-bundled-project; then
+# bundle exec $@
+# else
+# $@
+# fi
+# }
+
+# ## Main program
+# for cmd in $bundled_commands; do
+# alias $cmd="_run-with-bundler $cmd"
+# done
+
View
2  zsh/plugins/git/gitignore.symlink
@@ -5,3 +5,5 @@
*.swp
tags
NERD_tree*
+.rbenv-version
+config/solr*
Please sign in to comment.
Something went wrong with that request. Please try again.