- most of my new code is on bitbucket
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
function MorseNode(ac, rate) { | |
// ac is an audio context. | |
this._oscillator = ac.createOscillator(); | |
this._gain = ac.createGain(); | |
this._gain.gain.value = 0; | |
this._oscillator.frequency.value = 750; | |
this._oscillator.connect(this._gain); |
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 script fixed the ordering in carousel of may snapjoy files. | |
# works on OSX | |
require 'date' | |
Dir.glob("./**/*.jpeg").each do |f| | |
next if f =~ /nknown/ | |
m = /(?<serial>\d{0,6})-(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{2})/.match(f) | |
d = DateTime.new(m['year'].to_i, m['month'].to_i, m['day'].to_i) + Rational(m['serial'].to_i, 86400) |
OlderNewer