Skip to content

Instantly share code, notes, and snippets.

View bloudermilk's full-sized avatar

Brendan Loudermilk bloudermilk

View GitHub Profile
def input_get
input = gets.chomp
sum[i] = input.to_i
end
def sum
sum = []
i = 0
puts input_get

N.B. Things that are starred with * are local variable

  • Ok, first generate a new rails app using this format:
    • rails new app_name
    • rails new amit_test_blog
  • Ok, next sketch out your models.
    • We're going to have two models for this blog: User and Post
    • One users can have many posts and many posts can belong to one users
    • Figure out the fields in each model.
    • Users will have these: field:type
class Analyzer
class << self
include ActionView::Helpers::NumberHelper
end
CACHE_NAMESPACE = "analyzer"
CACHE_LIFESPAN = 10.minutes
class_attribute :items_to_analyze
@bloudermilk
bloudermilk / fb_init.coffee
Created August 24, 2012 21:45 — forked from patbenatar/fb_init.coffee
Initialize Facebook JS SDK in Coffeescript
@FBootloader = new class FBootloader
callbacks: []
isReady: false
ready: ->
callback() for callback in @callbacks
bind: (callback) ->
if @isReady
callback()