Skip to content

Instantly share code, notes, and snippets.

View output.txt
$ ruby x.rb
Address: 1FBVmnKtjgA676Xbatqx42dcGzaaPV4BU4 contains 4 transactions.
Address: 17j92xE73rEyexJSB4gwavd2YkpTKZWfAv contains 7 transactions.
View q.sql
select txn_summary(data) from txns limit 1;
@ryandotsmith
ryandotsmith / index.html
Last active Aug 29, 2015
An example for how to authenticate against Chain using CORS
View index.html
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
</head>
<body>
<p>Balance: <span id="balance"></span></p>
</body>
@ryandotsmith
ryandotsmith / index.js
Last active Aug 29, 2015
Chain - Send Transactions API
View index.js
var chain = require('chain-node');
var bitcoin = require('bitcoinjs-lib');
// The Chain API will never accept your private key.
// Keep the private key stored in a safe place alongside
// your program.
var key = new bitcoin.ECKey.fromWIF("Your private key in WIF format.")
var txn = new bitcoin.Transaction()
View keybase.md

Keybase proof

I hereby claim:

  • I am ryandotsmith on github.
  • I am ryandotsmith (https://keybase.io/ryandotsmith) on keybase.
  • I have a public key whose fingerprint is 2D60 72AC 8048 3B96 6F2E 5211 EC2F C28B D8ED AF6F

To claim this, I am signing this object:

@ryandotsmith
ryandotsmith / crafty.patch
Created Dec 20, 2013
Crafty: remove listener which prevents touchmove events
View crafty.patch
From 3bfcdec1cfbf155fade70afbb0a8aee91a46d5e3 Mon Sep 17 00:00:00 2001
From: Eric Rykwalder <e.rykwalder@gmail.com>
Date: Thu, 19 Dec 2013 18:38:23 -0800
Subject: [PATCH] fix disableTouch issue on crafty
---
static/libs/crafty.js | 9 ++++++---
static/systems/home.js | 2 ++
2 files changed, 8 insertions(+), 3 deletions(-)
View gist:7835702
def s2c(x)
case x
when Hash then Hash[*x.flatten(1).map{|x| s2s(x)}]
when Array then x.map{|x| s2s(x)}
when Symbol then String(x).camelcase
else x
end
end
View slope.rb
require 'ostruct'
require 'minitest/autorun'
class P
attr_reader :x, :y
def initialize(x,y)
@x, @y = x, y
end
end
@ryandotsmith
ryandotsmith / policy.json
Created Sep 20, 2013
AWS IAM Read Only
View policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"autoscaling:Describe*",
"cloudformation:DescribeStacks",
"cloudformation:DescribeStackEvents",
"cloudformation:DescribeStackResources",
"cloudformation:GetTemplate",
@ryandotsmith
ryandotsmith / Dockerfile
Last active Dec 13, 2016
EC2 Docker Setup
View Dockerfile
FROM ubuntu
MAINTAINER "Bobby Wilson"
RUN apt-get update
RUN apt-get install curl -y
RUN cd /usr/local; curl -O http://nodejs.org/dist/v0.10.16/node-v0.10.16-linux-x64.tar.gz
RUN cd /usr/local; tar xzf node-v0.10.16-linux-x64.tar.gz
ENV PATH /usr/local/bin:/usr/sbin:/bin:/usr/local/node-v0.10.16-linux-x64/bin
ADD . /app
EXPOSE 8000:8000
ENV PORT 8000