Skip to content

Instantly share code, notes, and snippets.

View simonmorley's full-sized avatar

Simon Morley simonmorley

  • London
View GitHub Profile
@simonmorley
simonmorley / README.mkd
Created December 3, 2017 16:23 — forked from blmarket/README.mkd
HBase with thrift using node.js

HBase with thrift using node.js

Install (on Mac OS X)

homebrew

Trivial

hbase

@simonmorley
simonmorley / README.mkd
Created December 3, 2017 16:23 — forked from blmarket/README.mkd
HBase with thrift using node.js

HBase with thrift using node.js

Install (on Mac OS X)

homebrew

Trivial

hbase

> curl https://api.stripe.com/v1/customers \
-u [apikey]: \
-d "card[number]=4000000000000002" \
-d "card[exp_month]=12" \
-d "card[exp_year]=2015" \
-d "card[cvc]=123" \
> -d validate=false
{
"object": "customer",
"created": 1388967139,
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)