Skip to content

Instantly share code, notes, and snippets.

View patmaddox's full-sized avatar
🤔
Trying to figure out how to look up comments I've left

Pat Maddox patmaddox

🤔
Trying to figure out how to look up comments I've left
View GitHub Profile
@patmaddox
patmaddox / mac-modifier.el
Created December 8, 2012 00:20
mac key modifiers
(setq mac-command-modifier 'meta)
(setq mac-function-modifier 'super)
@patmaddox
patmaddox / crash.log
Created December 2, 2012 01:22
drumspillage renoise crash
============================================================
Version : Renoise V2.8.1 (Aug 15 2012)
Date : 2012-12-01
Time : 17:12:03
OS : Mac OS X 10.7.5 (x86_64)
============================================================
CPU: Found 2 enabled unit(s) with 1 core(s) / 2 logical processor(s) per unit. 2 cores, 4 logical processors are enabled in total.
Application: Showing the splash window...
@patmaddox
patmaddox / 001_conditional.rb
Created October 21, 2012 21:25
James Ladd OO discussion
class Animal
def initialize(type)
@type = type
end
def speak
if @type == :cow
"moo"
elsif @type == :dog
"woof"
@patmaddox
patmaddox / setup.md
Created May 9, 2012 21:59 — forked from karlstolley/setup.md
Computer Prep Instructions for End-to-End Agile Web Application Development from Basically Nothing

The workshop will require a number of technologies, which time will not permit us to set up on site. So, find your operating system below (Windows or Mac; if you're on Linux, let me know), and follow the steps to get your computer set up ahead of time. If you have any problems, email karl.stolley@gmail.com

At the request of some participants, I've also provided links to some reading material at the very bottom of this page. Look through that stuff if you have the time or interest.

You can find more detailed installation instructions at http://installfest.railsbridge.org/installfest/installfest and a curriculum for building and deploying a rails application from the ground up at http://curriculum.railsbridge.org/curriculum/curriculum

Windows

First, you'll want to have a good editor on hand for the workshop. You can't do much better than Notepad++; just download and unzip this file: http://download.tuxfamily.org/notepadplus/6.1.2/npp.6.1.2.bin.zip Unzip the file; there will be

class RoleUser < Refinery::Core::BaseModel
belongs_to :role
belongs_to :user
end
@patmaddox
patmaddox / PatsProblem.coffee
Created November 8, 2011 23:11
Trying to get a collection to pass through events from collections contained inside its models
class Seminar extends Backbone.Model
initialize: ->
@configureBubbleChildEvents()
bubbleEvent: (eventName, object) =>
@trigger eventName, object
configureBubbleChildEvents: ->
@get('students').bind('all', @bubbleEvent)
model = new ModelWithCollection() # add some stuff to a collection
child = model.collection().at(0)
child.set foo: 'bar'
model.save() # this doesn't trigger a save because the model doesn't know it's dirty
class UserMigration < Migratrix::Migration
set_extractor :mongo, :db => "funky"
end
class MongoExtractor
def do_the_work
end
class Migratrix::Migration
def self.mongo
$ webby build
WARNING: Global access to Rake DSL methods is deprecated. Please include
... Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method Webby::Apps::Main#import called at /Users/padillac/.rvm/gems/ruby-1.8.7-p352@rspec-website/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/padillac/.rvm/gems/ruby-1.8.7-p352@rspec-website/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/padillac/.rvm/gems/ruby-1.8.7-p352@rspec-website/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/padillac/.rvm/gems/ruby-1.8.7-p352@rspec-website/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/padillac/.rvm/gems/ruby-1.8.7-p352@rspec-website/gems/webby-0.9.4/lib/webb
@patmaddox
patmaddox / application_controller.rb
Created October 10, 2011 19:04
A little helper to allow logging in via URL param
class ApplicationController < ActionController::Base
def login_as_user_param
return unless Rails.env.development? || Rails.env.test?
sign_in(User.find(params['_current_user'])) if params['_current_user']
end
end