I hereby claim:
- I am fanktom on github.
- I am fanktom (https://keybase.io/fanktom) on keybase.
- I have a public key whose fingerprint is A7EF 59CF D39A A601 B86F 6E02 ABAB AAB3 A2F5 1FEA
To claim this, I am signing this object:
require 'goliath' | |
require 'em-synchrony/em-http' | |
# After a connect the server streams 10 bomb ticks and then stops with a BOOM. The | |
# event source needs to listen to source.addEventListener 'bomb', .. to retrieve | |
# the ticks. | |
class Stream < Goliath::API | |
def response(env) | |
foo |
# list | |
curl -v http://localhost:3000/organizations.json | |
# create | |
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"organization":{"first_name":"firstname","last_name":"lastname","email":"email@email.com"}}' http://localhost:3000/organizations | |
# read | |
url -v http://localhost:3000/organizations/1.json | |
# update |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
git symbolic-ref HEAD refs/heads/$1 && rm .git/index && git clean -fdx | |
@echo "Created new root branch '$1'" |
#!/usr/bin/env bash | |
# encoding: UTF-8 | |
TEXT_MATE_APP_NAME="TextMate2" | |
scp /Applications/$TEXT_MATE_APP_NAME.app/Contents/Frameworks/Preferences.framework/Resources/rmate $1:/usr/bin/rmate | |
# Usage | |
# Copy this file to localhost /usr/bin/rmateify | |
# Run rmateify root@servername once |
# RMate | |
ssh_mate(){ | |
ssh -R 52698:localhost:52698 $1 | |
} | |
alias sshmate=ssh_mate | |
# Usage | |
sshmate ubuntu@yourserver |
@partial_html = "<div>Just the Navigation</div>" | |
@partial_xml = "<track><name>Islandary</name><artist>Thomas Fankhauser</artist></track>" | |
@partial_json = '{ name : "Islandary", artist : "Thomas Fankhauser" }' | |
# Push a HTML Partial | |
Scales.push :html => @partial_html, :to => "navigation" | |
# Push a XML Partial | |
Scales.push :xml => @partial_xml, :to => "islandary.xml" |
# Destroy URLs | |
Scales.destroy "/", "/tracks", "/overview", "/overview.json", "/overview.xml" |
@html = ' | |
<html> | |
<body> | |
<div><h1>Tracks</h1></div> | |
<div id="tracks"> | |
<p id="track1">Track 1</p> | |
</div> | |
</body> | |
</html>' |