Skip to content

Instantly share code, notes, and snippets.

Dashing BART Widget

Description

A Dashing widget to display your BART's next arrival time using real-time BART data from The Real BART API.

Preview

Screen Shot

Dashing Visualization Widget

Description

A Dashing widget to display visualizations for any audio your microphone can detect. This widget uses the totally awesome APEXvj for basically everything.

Preview

Screen Shot

22:15 ~/Desktop $ prop up bagels
/Users/nathanielwroblewski/.rvm/gems/ruby-2.0.0-p247/gems/ffi-1.9.1/lib/ffi/struct_layout_builder.rb:207: [BUG] Segmentation fault
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.3.0]

-- Crash Report log information --------------------------------------------
   See Crash Report log file under the one of following:
     * ~/Library/Logs/CrashReporter
     * /Library/Logs/CrashReporter
     * ~/Library/Logs/DiagnosticReports
@NathanielWroblewski
NathanielWroblewski / parser.rb
Created December 3, 2013 08:06
Dan's import challenge
class Parser
attr_accessor :row
def initialize(row)
@row = row
end
def question_ids
row.headers.first.gsub('q', '').split(' ')[1..-1].map(&:to_i)
end
@NathanielWroblewski
NathanielWroblewski / dump.sh
Created December 24, 2013 02:21
Copy a production database locally
#!/bin/bash
#import the latest dump from production
heroku pgbackups:capture --expire --app <YOUR APP NAME HERE>
curl -o latest.dump `heroku pgbackups:url --app <YOUR APP NAME HERE>`
pg_restore --verbose --clean --no-acl --no-owner -h <DATABASE HOST> -U <DATABSE USERNAME> -d <DATABASE NAME> latest.dump
@NathanielWroblewski
NathanielWroblewski / while.rb
Last active January 1, 2016 13:39
Ruby while loop example
#original
# DEF ask question
# puts question
# reply = gets.chomp.downcase
# WHILE (reply != 'yes' OR reply != 'no')
# puts 'Please answer with a yes or a no.'
# reply = gets.chomp.downcase
@NathanielWroblewski
NathanielWroblewski / gist:8499102
Created January 19, 2014 01:15
Postgres start-up
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
brew install postgres
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
ARCHFLAGS="-arch x86_64" gem install pg
initdb /usr/local/var/postgres9.3 -E utf8
pg_ctl -D /usr/local/var/postgres9.3 -l logfile start