I hereby claim:
- I am danreedy on github.
- I am reedy (https://keybase.io/reedy) on keybase.
- I have a public key whose fingerprint is BF04 8002 9242 1D14 869E 0689 7F1F A7D7 22DD 2BA3
To claim this, I am signing this object:
# My attempt to recreate the OSCon Keynote "The Concert Programmer" | |
# by Andrew Sorensen using Sonic-Pi. | |
use_bpm 120 | |
use_synth :fm | |
$root = 52 | |
$key = :major | |
live_loop :metro do | |
sleep 1 |
# Let it Go - Pi Version | |
use_bpm 34 | |
use_synth :pretty_bell | |
quaver = 0.125 #Eight note | |
crotchet = 0.25 #Quarter note | |
minim = 0.5 #Half note | |
semibreve = 1 #Whole note | |
in_thread(name: :rh) {rightHand} |
comment do | |
# transcribed from the MML notation here: http://www.mmlshare.com/tracks/view/403 | |
# | |
# Sonic Pi currently has a size limit of about 9k which is a known issue (#102). | |
# I've kept the comments up here to get around that as comment blocks don't get | |
# sent to the interpreter. Some of the layout here is an exercise in reducing bytes. | |
# I'm using Ruby's stabby lambda syntax ( -> { ... } ) in case you want to google it :) | |
# | |
# THIS HAS ONLY BEEN TESTED ON A MAC - on an RaspberryPi you might want to change it to | |
# use_bpm 60 |
<img id="webcam" src="https://www.webcam-4insiders.com/current/medium/14082-Webcam-Leysin-Wetter.jpg" alt="LAS Gym Construction"> | |
<script type="text/javascript"> | |
var refreshImage = function() { | |
var refreshInterval = 600000; // This is time in milliseconds; 60,000 = 10 minutes | |
var source = "https://www.webcam-4insiders.com/current/medium/14082-Webcam-Leysin-Wetter.jpg?time=" + new Date().getTime(); | |
document.getElementById('webcam').src = source; | |
setTimeout(refreshImage, 600000); | |
} | |
refreshImage(); | |
</script> |
#!/usr/bin/env ruby | |
require 'minitest/autorun' | |
Hash.class_eval do | |
def deep_fetch(*keys, default: nil) | |
keys.reduce(self) do |memo, key| | |
memo.fetch(key) | |
end | |
rescue KeyError |
#!/usr/bin/env ruby | |
class JingleBells | |
def initialize | |
@jingle_count = 0 | |
end | |
def can_jingle? | |
@jingle_count < 2 | |
end |
use_bpm 120 | |
use_synth :fm | |
$root = 52 | |
$key = :major | |
define :metro do | |
cue :tick | |
sleep 1 | |
end |
require 'facter' | |
Facter.add(:current_users) do | |
setcode do | |
output = Facter::Util::Resolution.exec(%q{/usr/bin/w -h | grep console | /usr/bin/awk -F" " '{ print $1 }'}) | |
output.gsub(/\n/,'::').split('::').uniq.join(',') # Convert the individual line output to a comma list w/ unique values | |
end | |
end |
#!/usr/bin/env python | |
# Quick and dirty demonstration of CVE-2014-0160 by | |
# Jared Stafford ([email protected]) | |
# Modified so that it finds cookies | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
I hereby claim:
To claim this, I am signing this object: