Skip to content

Instantly share code, notes, and snippets.

View adamburmister's full-sized avatar

Adam Burmister adamburmister

View GitHub Profile
@adamburmister
adamburmister / http streaming with backchat.io.txt
Created February 4, 2011 08:41
Curl a BackChat.io stream using your login and API key
curl -H 'Authorization: Backchat 3b43ebca5e9703bbbeb5d0f87c87c962' https://stream.backchat.io/example-stream-name
@adamburmister
adamburmister / quickstart.rb
Created February 4, 2011 08:38
Quickstart guide to connecting to a BackChat.io stream
require "rubygems"
require "backchat"
BackChat.connect("fred.dagg", "3b43ebca5e9703bbbeb5d0f87c87c962")
BackChat.stream("an-example-stream-name") do |msg|
puts "#{msg.sender.name} just posted a message"
end
#include <msp430x20x3.h>
void main(void)
{
WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer
P1DIR |= BIT6; // Set P1.6 to output direction
P1SEL |= BIT6; // P1.6 to TA0.1
CCR0 = 1000-1; // PWM Period
@adamburmister
adamburmister / Google packman.js
Created May 21, 2010 15:20
Google's pacman logo
google.pacman ||
function () {
var a = true,
e = false,
g = {},
i = [1, 4, 2, 8],
l = {
0 : {
axis: 0,
increment: 0
@adamburmister
adamburmister / hypem-crawler.rb
Created April 9, 2010 12:05
Example for crawling the music site, hypem.com, for music.
#!/usr/bin/ruby
require "rubygems"
require "hpricot"
require "open-uri"
require "builder"
require "httpclient"
require "yaml"
require "cgi"
desc "Generate and deploy assets"
task :deploy_assets, :roles => :app do
# get the previous timestamp
old_timestamp = File.read("config/deploy_timestamp").to_i rescue 0
# generate timestamp into config/deploy_timestamp
timestamp = Time.now.to_i
File.open("config/deploy_timestamp", 'w') do |f|
f.write(timestamp)
end