Skip to content

Instantly share code, notes, and snippets.

gem list | cut -d" " -f1 | xargs gem uninstall -aIx
# sudo port install postgres84
export PATH=/opt/local/lib/postgresql84/bin:${PATH}
env ARCHFLAGS="-arch x86_64" bundle install
@scottlowe
scottlowe / en-GB.yml
Created July 17, 2010 22:02
en-GB locale for Rails 3
en-GB:
date:
formats:
# Use the strftime parameters for formats.
# When no format has been given, it uses default.
# You can provide other formats here if you like!
default: "%d/%m/%Y"
short: "%d %b"
long: "%d %B, %Y"
@scottlowe
scottlowe / If WPF used YAML.yml
Created July 24, 2010 15:23
The quest for something less noisy than XAML
%YAML 1.2
---
UserControl:
Name: AddressBookControl
BackgroundColor: White
Controls:
StackPanel:
Children:
- Label: {Color: Blue, Content: This is the title}
- TextBox: {Text: Hello World, FontSize: 14}
From: why the lucky stiff <[email protected]>
Date: 21 June 2004 18:17:08 BST
To: Scott <[email protected]>
Subject: Re: Low
Scott wrote:
>> Um... can I have extra oats, a sugar lump and a ruby gem
>> in my nose-bag, please mister?
@scottlowe
scottlowe / .bashrc
Created September 1, 2010 22:33
Part of a recipe for fronting Glassfish with Nginx
# ~/.bashrc: executed by bash(1) for non-login shells.
# If not running interactively, don't do anything
#[ -z "$PS1" ] && return
if [[ -n "$PS1" ]] ; then
# don't put duplicate lines in the history. See bash(1) for more options
#export HISTCONTROL=ignoredups
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
@scottlowe
scottlowe / stop nginx on Mac OS X
Created October 24, 2010 19:50
start / stop nginx on Mac OS X using Launch Daemon
sudo launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist
sudo launchctl remove org.macports.nginx
@scottlowe
scottlowe / nokogrir-build-steps.sh
Created November 29, 2010 10:15
Nokogiri build steps
# A couple of build steps that I'll forget when building Nokogiri from source on Mac OS X
racc -l -o lib/nokogiri/css/generated_parser.rb lib/nokogiri/css/parser.y
rex --independent -o lib/nokogiri/css/generated_tokenizer.rb lib/nokogiri/css/tokenizer.rex
jruby-head - #fetching
++[/Users/scott/.rvm/scripts/manage] : 1281 : __rvm_fetch_ruby() $ [[ 1 -eq 0 ]]
++[/Users/scott/.rvm/scripts/manage] : 1400 : __rvm_fetch_ruby() $ mkdir -p /Users/scott/.rvm/repos
++[/Users/scott/.rvm/scripts/manage] : 1402 : __rvm_fetch_ruby() $ [[ -z git://github.com/jruby/jruby.git ]]
++[/Users/scott/.rvm/scripts/manage] : 1406 : __rvm_fetch_ruby() $ echo git://github.com/jruby/jruby.git
++[/Users/scott/.rvm/scripts/manage] : 1406 : __rvm_fetch_ruby() $ grep -q git
++[/Users/scott/.rvm/scripts/manage] : 1409 : __rvm_fetch_ruby() $ [[ -z '' ]]
++[/Users/scott/.rvm/scripts/manage] : 1411 : __rvm_fetch_ruby() $ [[ -n head ]]
++[/Users/scott/.rvm/scripts/manage] : 1413 : __rvm_fetch_ruby() $ [[ -n head ]]
++[/Users/scott/.rvm/scripts/manage] : 1414 : __rvm_fetch_ruby() $ rvm_ruby_repo_branch=ruby_1_head_head
@scottlowe
scottlowe / rvm-jruby-error.txt
Created January 10, 2011 18:52
RVM install jruby-head error
scotts-macbook-pro:~ scott$ rvm install jruby-head --trace
jruby-head --trace
rvm 1.2.0 by Wayne E. Seguin ([email protected]) [http://rvm.beginrescueend.com/]
+ [[ -z '' ]]
+ export 'PS4=+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
+ PS4='+[${BASH_SOURCE}] : ${LINENO} : ${FUNCNAME[0]:+${FUNCNAME[0]}() $ }'
+[/Users/scott/.rvm/scripts/cli] : 597 : __rvm_parse_args() $ [[ -z install ]]
+[/Users/scott/.rvm/scripts/cli] : 599 : __rvm_parse_args() $ [[ 0 -eq 1 ]]