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
$ gem spec --debug ~/.bundle/ruby/1.8/bundler/gems/sinatra-b525892ea06b9fac17e190c37b6500b2c2378e0b-1.0.a/sinatra-1.0.a.gem | |
Exception `NameError' at /Library/Ruby/Site/1.8/rubygems/command_manager.rb:163 - uninitialized constant Gem::Commands::SpecificationCommand | |
Exception `Gem::Exception' at /Library/Ruby/Site/1.8/rubygems/specification.rb:487 - YAML data doesn't evaluate to gem specification | |
Exception `IOError' at /Library/Ruby/Site/1.8/rubygems/format.rb:50 - closed stream | |
Exception `NoMethodError' at /Library/Ruby/Site/1.8/rubygems/commands/specification_command.rb:118 - undefined method `version' for nil:NilClass | |
ERROR: While executing gem ... (NoMethodError) | |
undefined method `version' for nil:NilClass | |
/Library/Ruby/Site/1.8/rubygems/commands/specification_command.rb:118:in `execute' | |
/Library/Ruby/Site/1.8/rubygems/format.rb:50:in `sort_by' | |
/Library/Ruby/Site/1.8/rubygems/commands/specification_command.rb:118:in `each' |
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
# | |
# A set of aliases from my global .gitconfig taken from the most useful scripts in | |
# ddollar/git-utils and elsewhere on the 'net. | |
# | |
[alias] | |
# helper functions | |
current-branch = "!f() { B=$(git symbolic-ref HEAD) && echo ${B#refs/heads/}; }; f" | |
current-remote = "!f() { B=$(git config branch.$(git current-branch).remote) && echo ${B}; }; f" | |
current-merge = "!f() { B=$(git config branch.$(git current-branch).merge) && echo ${B#refs/heads/}; }; f" | |
current-track = "!f() { R=$(git current-remote) && M=$(git current-merge) && echo ${R}/${M}; }; f" |
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
case | |
when foo then 1 | |
when bar then 2 | |
when baz then 3 | |
else 4 | |
end | |
# or | |
foo ? 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
~ $ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head ) | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
121 364 121 364 0 0 692 0 --:--:-- --:--:-- --:--:-- 1259 | |
Cloning into rvm... | |
remote: Counting objects: 12843, done. | |
remote: Compressing objects: 100% (3504/3504), done. | |
remote: Total 12843 (delta 8450), reused 12335 (delta 8019) | |
Receiving objects: 100% (12843/12843), 1.87 MiB | 117 KiB/s, done. | |
Resolving deltas: 100% (8450/8450), done. |
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
class ActionView::Template::Handlers::Sass < ActionView::Template::Handler | |
include ActionView::Template::Handlers::Compilable | |
def compile(template) | |
engine = Sass::Engine.new template.source, options(template) | |
<<-VCJMIOEP | |
<<-QCGQCEWG | |
#{engine.render} | |
QCGQCEWG |
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
~ $ rvm install 1.9.2 --with-readline-dir=$rvm_path/usr | |
Installing Ruby from source to: /Users/stouset/.rvm/rubies/ruby-1.9.2-p180, this may take a while depending on your cpu(s)... | |
ruby-1.9.2-p180 - #fetching | |
ruby-1.9.2-p180 - #extracting ruby-1.9.2-p180 to /Users/stouset/.rvm/src/ruby-1.9.2-p180 | |
ruby-1.9.2-p180 - #extracted to /Users/stouset/.rvm/src/ruby-1.9.2-p180 | |
ruby-1.9.2-p180 - #configuring | |
ruby-1.9.2-p180 - #compiling | |
ruby-1.9.2-p180 - #installing | |
Removing old Rubygems files... |
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
export DOT_PROFILE=~/.profile.git | |
export PROFILE_BIN=$DOT_PROFILE/bin | |
export PROFILE_HOME_D=$DOT_PROFILE/home.d | |
export PROFILE_SYSTEM_D=$DOT_PROFILE/system.d | |
export SYSTEM_BASE="" | |
export SYSTEM_TYPE="" | |
export SYSTEM_VERSION="" | |
case "$(uname -s)" in |
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 | |
# include profile location variables | |
. ~/.profile | |
. ~/.profile.git/profile-env | |
# update ourself | |
(cd $DOT_PROFILE && git pull) | |
# symlink all home.d files into place |
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
def reload_browser(paths = []) | |
UI.info "Reloading browser: #{paths.join(' ')}" | |
paths.each do |path| | |
path = path.gsub %r{ (\.[^.]+) .* }x, '\1' | |
data = ['refresh', { | |
:path => "#{Dir.pwd}/#{path}", | |
:apply_js_live => @options[:apply_js_live], | |
:apply_css_live => @options[:apply_css_live] | |
}].to_json |
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
[alias] | |
current-branch = "!f() { B=$(git symbolic-ref HEAD) && echo ${B#refs/heads/}; }; f" | |
current-remote = "!f() { B=$(git config branch.$(git current-branch).remote) && echo ${B}; }; f" | |
current-merge = "!f() { B=$(git config branch.$(git current-branch).merge) && echo ${B#refs/heads/}; }; f" | |
current-track = "!f() { R=$(git current-remote) && M=$(git current-merge) && echo ${R}/${M}; }; f" | |
remove = "!f() { git ls-files --deleted -z $@ | xargs -0 git rm -r; }; f" | |
addremove = "!f() { git add -v ${@-.}; git remove $@; }; f" | |
incoming = "!f() { T=$( [ \"${1}\" == \"\" ] && echo $(git current-track) || echo ${1} ) && git log ..${T}; }; f" | |
outgoing = "!f() { T=$( [ \"${1}\" == \"\" ] && echo $(git current-track) || echo ${1} ) && git log ${T}..; }; f" | |
wip = "!f() { git addremove $@; git commit -m 'Work in progress'; }; f" |