Skip to content

Instantly share code, notes, and snippets.

kyledrake /
Created Jun 6, 2014
Verification of my PGP key on

Keybase proof

I hereby claim:

  • I am kyledrake on github.
  • I am kyledrake ( on keybase.
  • I have a public key whose fingerprint is 9C30 FA7B EA38 CBCD AB4D B12C 8BE7 2107 2E18 64BE

To claim this, I am signing this object:

kyledrake / test.js
Created Jul 31, 2014
Testing darkwallet/stealth.js
View test.js
var stealth = require('stealth.js')
var b = require('bitcoinjs-lib')
// Receiver generates a scan and spend keypair
var receiverScanPrivateKey = new b.ECKey(undefined, true)
var receiverScanPublicKey = receiverScanPrivateKey.getPub()
var receiverSpendPrivateKey = new b.ECKey(undefined, true)
var receiverSpendPublicKey = receiverSpendPrivateKey.getPub()
View gist:4cb1325461b040b07d66
# The Nginx configuration based on
http {
ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_session_timeout 15m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
View gist:3af997f6f58d4d58f728
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
# Option "OptionName" "value"
Section "InputClass"
kyledrake / paypal.rb
Last active Aug 29, 2015
A not-crazy Paypal REST API interface.
View paypal.rb
# Everything else was worse...
require 'rest_client'
require 'addressable/uri'
require 'thread'
class Paypal
SANDBOX_URI = Addressable::URI.parse ''
LIVE_URI = Addressable::URI.parse ''
View gist:1007336
require 'rubygems'
require 'sinatra'
require 'geoloqi'
enable :sessions
configure do
Geoloqi.config :client_id => 'YOUR OAUTH CLIENT ID', :client_secret => 'YOUR CLIENT SECRET'
kyledrake / gist:1128433
Created Aug 5, 2011
Rubinius day web server parallelism benchmarking tests
View gist:1128433
### TEST 1: Simple Rack app RAW AND DUMB
class HelloRubinius
def call(env)
return [
{'Content-Type' => 'text/html'},
['Hello #rbxday!']
kyledrake /
Created Aug 23, 2011
Debugging Kirk $stderr issue
require 'rubygems'
require 'sinatra/base'
require 'kirk'
require 'ruby-debug'
run {
get '/' do
# debugger
$stdout.puts 'Testing $stdout!'
$stderr.puts 'Testing $stderr!'
kyledrake / gist:1566576
Created Jan 5, 2012
Fix for AWS::S3 thread safety issues
View gist:1566576
require 'aws/s3'
class D7Obj < AWS::S3::S3Object
set_current_bucket_to "kd-test"
class S3Handler
:access_key_id => 'ID',
kyledrake / paranoid_delete.rb
Created Feb 22, 2012
Quick and dirty "paranoid delete" for Sequel
View paranoid_delete.rb
module Sequel
module ParanoidDelete
def self.included(base)
# Instead of actually deleting, we just set is_deleted to true,
# and look for it with our default dataset filter.
def delete