This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Video: http://rubyhoedown2008.confreaks.com/08-chris-wanstrath-keynote.html | |
Hi everyone, I'm Chris Wanstrath. | |
When Jeremy asked me to come talk, I said yes. Hell yes. Immediately. But | |
then I took a few moments and thought, Wait, why? Why me? What am I supposed | |
to say that's interesting? Something about Ruby, perhaps. Maybe the | |
future of it. The future of something, at least. That sounds | |
keynote-y. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo sysctl -w net.inet.ip.portrange.first=32768 | |
sudo sysctl -w net.inet.ip.portrange.first=12000 | |
sudo sysctl -w net.inet.tcp.msl=1000 | |
sudo sysctl -w kern.maxfiles=1000000 kern.maxfilesperproc=1000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple, scrappy UDP DNS server in Ruby (with protocol annotations) | |
# By Peter Cooper | |
# | |
# MIT license | |
# | |
# * Not advised to use in your production environment! ;-) | |
# * Requires Ruby 1.9 | |
# * Supports A and CNAME records | |
# * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance | |
# * All records get the same TTL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select user from mysql.user; | |
create user 'USER_NAME'@'localhost' identified by 'PASSWORD'; | |
show databases; | |
create database DATABASE_NAME; | |
grant all on DATABASE_NAME.* to 'USER_NAME'@'localhost' identified by 'PASSWORD'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http') | |
, formidable = require('formidable') | |
, fs = require('fs') | |
, qs = require('querystring') | |
, util = require('util') | |
, uploads = {}; | |
http.createServer(function(req, res){ | |
if(req.method == 'GET') { | |
if(req.url != '/favicon.ico') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Change the columns for the releases list screen | |
function change_columns( $cols ) { | |
$cols = array( | |
'cb' => '<input type="checkbox" />', | |
'featimg' => 'Featured Image', | |
'excerpt' => 'Excerpt?', | |
'title' => 'Title', | |
'artist' => 'Artist', | |
'catno' => 'Cat#', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bitmerchant.wallet import Wallet | |
from mnemonic import Mnemonic | |
# put in whatever Trezor generates for you here (or backup from this empty/insecure one as a test) | |
mnemonic = 'clean health food open blood network differ female lion eagle rough upon update zone antique defense venture uncover mobile charge actress film vocal enough' | |
passphrase = '' # empty string or whatever you actually choose | |
path = "m/44'/0'/0'/0/0" # whatever shows up on the UI for that account (everything will start with m/44'/0' since it's bip44) | |
child = Wallet.from_master_secret(Mnemonic('english').to_seed(mnemonic, passphrase)).get_child_for_path(path) | |
child.to_address() # '18K9axbPpwqZgngB58nuwsYevL2z6ey4YG' (confirm this matches what Trezor is showing you) |