This file contains hidden or 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
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) { |
This file contains hidden or 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/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/')" |
This file contains hidden or 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
# .( 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 |
This file contains hidden or 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/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"] |