Skip to content

Instantly share code, notes, and snippets.

View jschoolcraft's full-sized avatar

Jeff Schoolcraft jschoolcraft

View GitHub Profile
* trunk *
break with true value [Kaspar Schiess]
* 2.1 *
After actions [Saimon Moore]
* 2.0 * (2006-01-20 15:26:28 -0500)
Enter / Exit actions
Transition guards
Guards and actions can be a symbol pointing to a method or a Proc
@jschoolcraft
jschoolcraft / migration.rb
Created February 11, 2011 17:51
not what you want to see
def self.up
change_table :users do |t|
t.remove :crypted_password
t.remove :salt
t.string :password, :limit=>50
end
end
development:
jmx_port: 9990
log_dir: logs/development
data_dir: data/development
rsync_port: 8993
replicate_as_master: false
replicate_as_slave: false
search_master_hostname: not_used_in_dev_or_test
search_master_port: not_used_in_dev_or_test
hostname: localhost
@jschoolcraft
jschoolcraft / backup.rb
Created February 4, 2011 12:23
my astrails-safe backup (part of it anyway)
mysqldump do
options "-ceKq --single-transaction --create-options"
username = "root"
pass = "redacted"
user username
password pass
socket "/var/run/mysqld/mysqld.sock"
NoMethodError in Admin/refinery_settings#edit
Showing /Volumes/Master/jschoolcraft/.rvm/gems/ruby-1.9.2-p0@qrefinery/bundler/gems/refinerycms-c63150025862/vendor/refinerycms/settings/app/views/admin/refinery_settings/_form.html.erb where line #24 raised:
undefined method `form_value_type' for #<RefinerySetting:0x000001053e95a8>
Extracted source (around line #24):
21: <%= f.label :form_value_type %>
22: <%= f.select :form_value_type, RefinerySetting::FORM_VALUE_TYPES -%>
23: </div>
[~/c/t/apidoc] ∴ ./docgen.py (ree-1.8.7-2010.02) ± (master) [13:35]
Crap, you don't have mako!
Easy install that bitch:
> easy_install Mako
user app;
worker_processes 2;
error_log /home/app/logs/nginx.error.log info;
events {
worker_connections 1024;
}
@jschoolcraft
jschoolcraft / .gems
Created October 1, 2010 00:21 — forked from rmanalan/.gems
rack-contrib
rack-rewrite
* keep people working on internal projects, assign and schedule the work
* dont look desperate, dont have immediate availability
* can tell a client you can 'shuffle internal projects' to accomodate them
* online ads dont work well
* referrals instead
* do a great job every single time
* voice calls important
* when people call you call them back
SELECT
favorites.id,
drink_id,
count(*) as times
FROM
favorizations,
favorites
where
favorites.id = favorite_id
group by