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
# ~/.elvish/lib/direnv.elv | |
fn hook []{ | |
env = (or (direnv export json | from-json) [&]) | |
if (> (count $env) 0) { | |
f = (mktemp) | |
keys $env | each [k]{ echo "E:"$k" = \""$env[$k]"\"" >> $f } | |
-source $f | |
rm -f $f | |
} |
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
# rails/templates/default/memcached.yml.erb | |
<% | |
instances = node[:opsworks][:layers][:memcached][:instances] | |
instances = {:localhost => {:private_ip => "127.0.0.1"}} if instances.empty? | |
-%> | |
hosts: | |
<% instances.each_pair do |name, cache_server| -%> | |
- "<%= cache_server[:private_ip]%>:<%= @memcached[:port] %>" | |
<% end -%> |
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
# See man page http://git-scm.com/docs/git-bisect | |
# Start the bisect process | |
» git bisect start | |
# Mark current commit as bad | |
» git bisect bad |
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
Sehr hilfreiche Anleitung fürs Installieren einer Entwicklungsumgebung auf Mountain Lion. | |
http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion | |
- Xcode | |
- Xcode Command Line Tools | |
- Homebrew GCC | |
- Mysql chown | |
- X11 Quartz | |
brew uninstall imagemagick |
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
mkdir -p $HOME/.ssh/conf.d | |
mv $HOME/.ssh/config $HOME/.ssh/conf.d/orig.conf | |
echo 'cat $HOME/.ssh/conf.d/*.conf > $HOME/.ssh/config' >> $HOME/.zshrc |
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
# config/application.rb | |
unless Rails.env.development? | |
Cell::Rendering::ClassMethods.class_eval do | |
def render_cell_for(name, state, *args) | |
cell = nil | |
cell = create_cell_for(name, *args) | |
yield cell if block_given? | |
render_cell_state(cell, state, *args) | |
rescue => exception |
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
# (Gem install did not work with PostgreSQL binary from enterprisedb.) | |
# | |
# - Install PostgreSQL with homebrew (requires XCode): | |
# cd $HOME/d/other | |
# git clone git://github.com/mxcl/homebrew.git | |
# cd homebrew | |
# brew install postgresql | |
# - Add $HOME/d/other/homebrew/bin to $PATH | |
# - Follow the further instructions: | |
# initdb $HOME/d/other/homebrew/var/postgres |