Skip to content

Instantly share code, notes, and snippets.

View stephencelis's full-sized avatar

Stephen Celis stephencelis

View GitHub Profile
#!/bin/env ruby
require 'fileutils'
# Most Macs these days are dual-core machines. This should, maybe, default to 2.
print "How many cores does your system have? [1] "
cores = gets.chomp.to_i
cores = 1 if cores < 1
config_opts = ["--with-jpeg=no", "--with-gif=no", "--with-tiff=no", "--with-ns"]
@stephencelis
stephencelis / gist:286436
Created January 26, 2010 01:06 — forked from qrush/gist:286431
_why's ~/.screenrc
# .( screenrc ). for _why :: * supports xterm/rxvt titles
# * default encoding is utf-8 (i use urxvt with this)
setenv LC_CTYPE en_US.UTF-8
defutf8 on
autodetach on
crlf off
#deflogin off
hardcopy_append on
#!/usr/bin/env sh
#
# Works best with blinking text: the last heart will blink when you have less
# than 25% of your battery life remaining.
#
# Add the following to your `~/.tmux.conf`;
#
# set -g status-right "#[fg=red]#(path/to/zelda-battery-tmux.sh) "
battery="$(pmset -g ps | awk 'NR==2' | perl -pe 's/.*?(\d+)%.*/\1/')"
class CachedAccount < CachedDelegateClass(Recurly::Account)
self.cache_key = :account_code
cache_constructor :find
cache(:billing_info)
cache(:subscription) { subscriptions.live.first }
cache(:add_ons) { subscription.try(:add_ons).to_a }
cache(:plan) { subscription.try :plan }
cache(:balance) {