Skip to content

Instantly share code, notes, and snippets.


JT Zemp jtzemp

  • SF Bay Area, CA, USA
View GitHub Profile

Keybase proof

I hereby claim:

  • I am jtzemp on github.
  • I am jtz ( on keybase.
  • I have a public key whose fingerprint is 4E9F D2A3 5D30 FCB3 2E94 C5FF 0178 C998 B2A4 3B9D

To claim this, I am signing this object:

jtzemp / servefiles.rb
Created December 12, 2013 20:49 with a change to use /usr/bin/env ruby instead of /usr/local/bin/ruby
View servefiles.rb
#!/usr/bin/env ruby
require 'webrick'
include WEBrick
dir = Dir::pwd
port = 12000 + (dir.hash % 1000)
url = "http://#{Socket.gethostname}:#{port}"
puts "URL: #{url}"
jtzemp / date_dimension_builder.rb
Created November 13, 2013 21:22
Ruby-based date dimension builder using a Kimball-ish pattern.
View date_dimension_builder.rb
#!/usr/bin/env ruby
require 'date'
# create table dim_date (
# date_key int primary key not null,
# full_date date,
# unix_timestamp int,
# year int,
# month_number int,
# month_name varchar(255),
# month_name_short varchar(255),
View Ruby FFT of .wav Test.rb
#!/user/bin/env ruby
require 'rubygems'
require 'wavefile'
require 'fftw3'
require 'fastercsv'
# needs to be mono, or you'll need to discard a channel, or combine channels
w ='sample.wav')
View gist:175710
# code
class ExternalDataApi
def initialize(setup)
# do stuff to setup
def list_of_things
# grabs stuff from the api and returns an array of OStructs