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
# 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 |
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
$ curl -kvv --tlsv1.2 https://sni.nakamura.io:4567/ | |
* Trying 127.0.0.1... | |
* Connected to sni.nakamura.io (127.0.0.1) port 4567 (#0) | |
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH | |
* TLSv1.2 (OUT), TLS handshake, Client hello (1): | |
* TLSv1.2 (IN), TLS handshake, Server hello (2): | |
* TLSv1.2 (IN), TLS handshake, Certificate (11): | |
* TLSv1.2 (IN), TLS handshake, Server key exchange (12): | |
* TLSv1.2 (IN), TLS handshake, Server finished (14): | |
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16): |
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
# The Nginx configuration based on https://coderwall.com/p/rlguog | |
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; |
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
decode_raw_tx = do -> | |
{ Transaction, TransactionIn, TransactionOut } = Bitcoin | |
{ bytesToBase64 } = Crypto.util | |
# Parse an bytearray of length `size` as an integer | |
# Works for numbers up to 32-bit only | |
parse_int = (size) -> (bytes) -> | |
n = 0 | |
n += (bytes.shift() & 0xff) << (8 * i) for i in [0...size] |
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 'rubygems' | |
require 'bundler' | |
Bundler.require | |
require './application' | |
namespace :assets do | |
desc 'compile assets' | |
task :compile => [:compile_js, :compile_css] do | |
end |