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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Programmer's Shift Keys</name> | |
<!-- | |
Author: Carwin Young (@carwin) | |
Last Updated: 2014.07.18 | |
v.1.1 | |
Programmer's Shift Keys |
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
# Convert any YouTube video into an audio file you can listen to on the go, using: | |
# http://rg3.github.com/youtube-dl/ | |
{ ~ } > brew install ffmpeg | |
{ ~ } > brew install ffprobe | |
{ ~ } > wget https://raw.github.com/rg3/youtube-dl/2012.02.27/youtube-dl | |
{ ~ } > chmod u+x youtube-dl | |
# Pick which video format you want to download.. (use any YT video link) |
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
; http://kaygun.tumblr.com/post/145269023094/conjugate-partitions | |
; version 1 | |
(defun dual (xs &aux k n r) | |
(loop while xs do | |
(setf k (reduce #'min xs) | |
n (length xs) | |
xs (sort (loop for x in xs | |
for x1 = (- x k) |
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
# two_associations_one_with_default_scope.rb | |
# Run it in your console with: `ruby two_associations_one_with_default_scope.rb` | |
# If you change the gem dependencies, run it with: | |
# `rm gemfile* && ruby two_associations_one_with_default_scope.rb` | |
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' |
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
# test-ransack-issue-608-order-of-predicate-arguments.rb | |
# This is a stand-alone test case. | |
# Run it in your console with: `ruby test-ransack-issue-608-order-of-predicate-arguments.rb` | |
# If you change the gem dependencies, run it with: | |
# `rm gemfile* && ruby test-ransack-issue-608-order-of-predicate-arguments.rb` | |
unless File.exist?('Gemfile') |
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
# test-ransack-scope-and-column-same-name.rb | |
# This is a stand-alone test case. | |
# Run it in your console with: `ruby test-ransack-scope-and-column-same-name.rb` | |
# If you change the gem dependencies, run it with: | |
# `rm gemfile* && ruby test-ransack-scope-and-column-same-name.rb` | |
unless File.exist?('Gemfile') |
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
# test-ransacker-arel-present-predicate.rb | |
# Run it in your console with: `ruby test-ransacker-arel-present-predicate.rb` | |
# If you change the gem dependencies, run it with: | |
# `rm gemfile* && ruby test-ransacker-arel-present-predicate.rb` | |
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' |
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
# test-ransack-scope-and-column-same-name.rb | |
# This is a stand-alone test case. | |
# Run it in your console with: `ruby test-ransack-scope-and-column-same-name.rb` | |
# If you change the gem dependencies, run it with: | |
# `rm gemfile* && ruby test-ransack-scope-and-column-same-name.rb` | |
unless File.exist?('Gemfile') |
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
require 'json' | |
require 'uri' | |
require 'net/http' | |
require 'net/https' | |
## | |
# Poloniex Ruby API interface | |
# | |
# Documentation text is pretty much 1:1 from the official API documentation | |
# https://www.poloniex.com/support/api |
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) |
OlderNewer