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
log syslog all; | |
router id **MY_IP**; | |
protocol bgp vultr { | |
local as 395409; | |
source address **MY_IP**; | |
import none; | |
export all; | |
graceful restart on; |
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 'tempfile' | |
require 'openssl' | |
require 'escape' # gem install escape | |
class CommandFailError < StandardError; end | |
def p12_to_pem_text(p12, pass='') | |
pass = '' if pass.nil? | |
# Use shell command for JRuby (see https://github.com/jruby/jruby-ossl/issues/8) |
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
### Keybase proof | |
I hereby claim: | |
* I am kyledrake on github. | |
* I am kyledrake (https://keybase.io/kyledrake) on keybase. | |
* I have a public key whose fingerprint is B128 E73F A18D ABCB 88D4 087B D184 D8CD DCE6 F6D4 | |
To claim this, I am signing this object: |
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
/* npm install -g https://github.com/afk11/bitcoinjs-lib/tarball/opt-in-bitcoincash-sighash */ | |
/* | |
This script spends from a 2 of 3 multisig to a pubkeyhash using Bitcoin Cash | |
*/ | |
var bitcoin = require('bitcoinjs-lib') | |
var network = bitcoin.networks['bitcoin'] | |
var outputValue = 4500000 // How much to send (remainder is the miner fee) | |
var inputValue = 4600000 // utxo value is required for bitcoin cash signature |
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
# df -h /dev/rbd0 | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/rbd0 1.5T 1.5T 557M 100% /mnt/media | |
# rbd info media/media01 | |
rbd image 'media01': | |
size 1536 GB in 393216 objects | |
order 22 (4096 kB objects) | |
block_name_prefix: rb.0.1098.74b0dc51 | |
format: 1 |
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
log syslog all; | |
router id **MY_IP**; | |
protocol bgp vultr { | |
local as 395409; | |
source address **MY_IP**; | |
import none; | |
export all; | |
graceful restart on; |
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
# NOTE: Both of these would have best been served by the server in Seattle. | |
traceroute to 198.51.233.1 (198.51.233.1), 30 hops max, 60 byte packets | |
1 192.168.1.1 0.444 ms 0.408 ms 0.396 ms | |
2 * * * | |
3 xe-3-0-2-sur04.troutdale.or.bverton.comcast.net (68.87.217.233) 12.892 ms 13.820 ms 13.823 ms | |
4 ae-52-ar01.troutdale.or.bverton.comcast.net (68.87.216.253) 13.816 ms 14.033 ms 13.788 ms | |
5 ae-2-ar01.beaverton.or.bverton.comcast.net (68.85.146.77) 15.029 ms * * | |
6 be-33490-cr01.sunnyvale.ca.ibone.comcast.net (68.86.92.205) 28.049 ms 27.238 ms 27.161 ms | |
7 be-10915-cr02.losangeles.ca.ibone.comcast.net (68.86.86.98) 35.109 ms 34.202 ms 31.920 ms |
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
# This is Neocities' Rainbows! config file. We are using this in production to run all our web apps. | |
# It works really well for us and has been heavily load tested, so I wanted to share it with the community. | |
# | |
# In my opinion, this is the best way to deploy a ruby web application. Unlike EventMachine based solutions, | |
# it uses real ruby threads, which allows it to take advantage of the internal non-blocking IO pattern | |
# in MRI. | |
# | |
# Contrary to popular belief, MRI doesn't block execution to wait on IO when you are using threads, even | |
# with the GIL. The requests are done concurrently for anything that is based on the IO class. This | |
# includes things like Net::HTTP and even `system commands`. Grep the MRI Ruby source code for |
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
# A very basic HTTP server | |
require "http/server" | |
server = HTTP::Server.new(8080) do |context| | |
context.response.content_type = "text/plain" | |
context.response.print "Hello world" | |
end | |
puts "Listening on http://0.0.0.0:8080" | |
server.listen |
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
# 1. Install mplayer command line (via Brew, Macports, or APT) | |
# 2. Add the following aliases to ~/.profile | |
# 3. Type `source ~/.profile` | |
# 3. Type `news` or `current` to listen in your terminal | |
alias news="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/news.pls" # MPR News | |
alias current="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/the_current.pls" # The Current | |
alias classical="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/classical.pls" # Classical MPR | |
alias localcurrent="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/local.pls" # Local Current | |
alias heartland="mplayer -playlist http://minnesota.publicradio.org/tools/play/streams/radio_heartland.pls" # MPR Radio Heartland |