This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tm() { | |
if [ -z $1 ]; then | |
tmux switch-client -l | |
else | |
if [ -z "$TMUX" ]; then | |
tmux new-session -As $1 | |
else | |
if ! tmux has-session -t $1 2>/dev/null; then | |
TMUX= tmux new-session -ds $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript | |
on run argv | |
set display_string to (item 1 of argv) | |
tell application "Quicksilver" to show large type display_string | |
end run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
irb(main):001:0> "hello"f.object_id | |
=> 70108391341300 | |
irb(main):002:0> "hello"f.object_id | |
=> 70108391341300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 cup onion, diced | |
3/4 stick butter | |
2 tsp salt | |
4 tsp bullion | |
6 cups water | |
3 tbsp paprika | |
4lbs chicken thighs | |
7 tbsp flour | |
1 cup plain yogurt (or sour cream, but yogurt is smoother in the end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 Birdhouse:~/Development/project1 jyurek (sandbox1)$ which bundle | |
/Users/jyurek/.rbenv/shims/bundle | |
0 Birdhouse:~/Development/project1 jyurek (sandbox1)$ bundle | |
Fetching source index for http://rubygems.org/ | |
Enter your password to install the bundled RubyGems to your system: #[ <-------- WAT ] | |
[.. a bunch of gems ...] | |
Installing linecache19 (0.5.12) /Library/Ruby/Site/1.8/rubygems/installer.rb:388:in `ensure_required_ruby_version_met': linecache19 requires Ruby version >= 1.9.2. (Gem::InstallError) | |
from /Library/Ruby/Site/1.8/rubygems/installer.rb:156:in `install' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/source.rb:101:in `install' | |
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:78:in `preserve_paths' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for c in $(convert $1 -colors 5 -depth 8 -format %c histogram:info: | sort -d -r | cut -d '#' -f 2 | cut -d ' ' -f 1); do | |
colors+=($c) | |
convert -size 50x50 'canvas:#'$c /tmp/$c.png | |
done | |
color_files= | |
for c in ${colors[@]}; do | |
color_files="$color_files /tmp/$c.png" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'benchmark' | |
require 'dimensions' | |
pics = Dir.glob("/Users/jyurek/Pictures/[0-9a-zA-Z]*.*") | |
Benchmark.bmbm do |x| | |
x.report('imagemagick') do | |
pics[0..1000].each{|f| `identify -format '%wx%h' "#{f}" 2>&1`.split("x") } | |
end | |
x.report('dimensions') do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo '✏ ' | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | grep \* | awk '{print $2}' | |
} | |
function parse_hg_branch { | |
hg branch 2>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
class File | |
def self.finalizer(path) | |
lambda do | |
FileUtils.rm(path) | |
end | |
end | |
def tempify! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :first do | |
gem "activerecord", "2.0.5" | |
end | |
group :second do | |
gem "activerecord", "2.3.5" | |
end | |
group :third do | |
gem "activerecord", "3.0.0.rc2" |
NewerOlder