A quick ruby command line to pretty-print piped json.
Put this somewhere in your path, with chmod +x, then:
curl http://myapp.com/stuff.json | json
A quick ruby command line to pretty-print piped json.
Put this somewhere in your path, with chmod +x, then:
curl http://myapp.com/stuff.json | json
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
As configured in my dotfiles.
start new:
tmux
start new with session name:
| # put the file into spec/support | |
| shared_examples_for "ActiveModel" do | |
| include ActiveModel::Lint::Tests | |
| # to_s is to support ruby-1.9 | |
| ActiveModel::Lint::Tests.public_instance_methods.map{|m| m.to_s}.grep(/^test/).each do |m| | |
| example m.gsub('_',' ') do | |
| send m | |
| end | |
| end |
| # Install pow | |
| $ curl get.pow.cx | sh | |
| # Install powder | |
| $ gem install powder | |
| # See that firewall is fucked | |
| $ sudo ipfw show | |
| 00100 0 0 fwd 127.0.0.1,20559 tcp from any to me dst-port 80 in <- THIS ONE!!! | |
| 65535 81005 28684067 allow ip from any to any |
| tell application "Google Chrome" | |
| set theTitle to title of active tab of front window | |
| set theURL to URL of active tab of front window | |
| end tell | |
| tell application "OmniFocus" | |
| set theDoc to default document | |
| set theTask to theTitle | |
| set theNote to theURL | |
| RSpec.configure do |config| | |
| config.before(:all, &:silence_output) | |
| config.after(:all, &:enable_output) | |
| end | |
| # Redirects stderr and stdout to /dev/null. | |
| def silence_output | |
| @orig_stderr = $stderr | |
| @orig_stdout = $stdout |
| var cradle = require('cradle'); | |
| var database = 'app'; | |
| cradle.setup({ | |
| host: '127.0.0.1', | |
| port: 5984, | |
| auth: { username: "YOUR_USERNAME", password: "YOUR_PASSWORD" } | |
| }); |
| # ... | |
| gem 'padrino-warden', :git => "git://github.com/zmack/padrino-warden.git" | |
| gem 'authtools' |