Skip to content

Instantly share code, notes, and snippets.

View malachaifrazier's full-sized avatar
🏠
Working from home

Malachai malachaifrazier

🏠
Working from home
View GitHub Profile
@malachaifrazier
malachaifrazier / sinatra_jquery_test.rb
Created June 28, 2012 19:58 — forked from mr-rock/sinatra_jquery_test.rb
An example of Sinatra working with Ajaxified JQuery based on some pieces of code published by Rafael George on the Sinatra Google Group.
require 'sinatra'
require 'dm-core'
require 'haml'
DataMapper.setup(:default, 'sqlite3::memory:')
class Message
include DataMapper::Resource
property :id, Serial
@malachaifrazier
malachaifrazier / Array confusion 2
Created June 14, 2012 05:00
undefined when checking array in Chrome?
//The USER
function User(name, role){
this.beats = []; //num of beats goes here
this.name = name;
this.role = role;
this.addBeats = function(numbeats){
return this.beats.push(numbeats);