Skip to content

Instantly share code, notes, and snippets.

View cmeiklejohn's full-sized avatar
💭
Always working.

Christopher S. Meiklejohn cmeiklejohn

💭
Always working.
View GitHub Profile
@cmeiklejohn
cmeiklejohn / methadone.rb
Created October 17, 2011 14:34
argument count with methadone?
executable items list # shows list of items
executable items one_item # shows info about one_item
executable items one_item list # list sub_items of one_item
executable items one_item one_subitem # shows info about items sub_item
class Robocop
include Directive4 # My little contribution to your psychological profile!
end
@cmeiklejohn
cmeiklejohn / .fonts.conf
Created November 18, 2011 02:57
fix debian chrome/chromium hinting problems since it doesn't obey the normal gnome settings
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font" >
<edit mode="assign" name="rgba" >
<const>none</const>
</edit>
</match>
<match target="font" >
<edit mode="assign" name="hinting" >
@cmeiklejohn
cmeiklejohn / rbenv-install-system-wide.sh
Created November 22, 2011 04:59
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
/home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:167:in `block in non_options': file not found: cucumber (ArgumentError)
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:146:in `map!'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:146:in `non_options'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:207:in `non_options'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:52:in `process_args'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:891:in `_run'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/minitest/unit.rb:884:in `run'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:21:in `run'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun'
from /home/cmeiklejohn/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/test/unit.rb:27:in `run_once'
1649 rubygems.org:master % cap production deploy
* executing `production'
triggering start callbacks for `deploy'
* executing `multistage:ensure'
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git://github.com/rubygems/rubygems.org production"
@cmeiklejohn
cmeiklejohn / hello_spec.rb
Created March 1, 2012 16:48
achievement unlocked!
describe MessageReceiver do
context 'with a hello message' do
let(:message) { "hello" }
it 'responds accordingly' do
subject.receive(message).should == 'is it me your looking for?'
end
end
end
curl -X PUT http://127.0.0.1:8098/riak/test/one -H 'Content-Type: application/json' -d "{'foo': 'bar'}"
curl -X POST http://127.0.0.1:8098/mapred -H "Content-Type: application/json" -d '{ "inputs": "test", "query": [{ "map": { "language": "javascript", "name": "Riak.mapValuesJson", "keep": true } }] }'
curl -X PUT http://127.0.0.1:8098/riak/test/one -H 'Content-Type: application/json' -d '{ "foo" : "bar" }'
curl -X POST http://127.0.0.1:8098/mapred -H "Content-Type: application/json" -d @-
{
"inputs": "test",
"query": [
{
"map": {
"language": "javascript",
"name": "Riak.mapValuesJson",
{{#each App.myController}}
{{#view App.myItemView contentBinding="this"}}
thing
{{/view}}
{{/each}}