Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeremy Seitz somebox

View GitHub Profile
@somebox
somebox / osx-setup.sh
Last active Oct 14, 2020 — forked from foz/osx-setup.sh.md
Set up an OSX machine from zero to awesome. Uses Homebrew (and cask, fonts, etc). Focused on Ruby/Rails development, includes rvm, xquartz, editor fonts, sublime text, and many tools.
View osx-setup.sh
#!/bin/bash
# A script to set up a new mac. Uses bash, homebrew, etc.
# Focused for ruby/rails development. Includes many utilities and apps:
# - homebrew, rvm, node
# - quicklook plugins, terminal fonts
# - browsers: chrome, firefox
# - dev: iterm2, sublime text, postgres, chrome devtools, etc.
# - team: slack, dropbox, google drive, skype, etc
@somebox
somebox / readme.md
Created Sep 26, 2011 — forked from metaskills/gist:756111
Rails 3 Models To Export Mephisto To Octopress & Disqus
View readme.md
require 'builder'
require 'digest/md5'
class Content < ActiveRecord::Base
belongs_to :user
end
class Section < ActiveRecord::Base
has_many :assigned_sections
has_many :articles, :order => 'position', :through => :assigned_sections
@somebox
somebox / README
Created Sep 20, 2011 — forked from indirect/README
Update WebKit nightly
View README
To use this:
1. check out the gist somewhere
2. edit the plist to contain the path to the .rb file
3. run this:
chmod +x update-webkit.rb
launchctl load com.indirect.update-webkit.plist
@somebox
somebox / backbone.rails.js
Created Jun 30, 2011 — forked from trydionel/backbone.rails.js
Makes Backbone.js with Rails+CSRF
View backbone.rails.js
//
// Backbone.Rails.js
//
// Makes Backbone.js play nicely with the default Rails setup, i.e.,
// no need to set
// ActiveRecord::Base.include_root_in_json = false
// and build all of your models directly from `params` rather than
// `params[:model]`.
//
// Load this file after backbone.js and before your application JS.
@somebox
somebox / backbone.rails.js
Created Jun 30, 2011
Makes Backbone.js play nicely with default Rails setup
View backbone.rails.js
//
// Backbone.Rails.js
//
// Makes Backbone.js play nicely with the default Rails setup, i.e.,
// no need to set
// ActiveRecord::Base.include_root_in_json = false
// and build all of your models directly from `params` rather than
// `params[:model]`.
//
// Load this file after backbone.js and before your application JS.
@somebox
somebox / mysql_install.md
Created Aug 17, 2010 — forked from anonymous/snippet.txt
Installing the mysql gem on OSX
View mysql_install.md

Mysql gem under OSX:

Install:

option 1:

Try to use existing mysql under OSX.

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
View application.js
// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
$(function() {
MIN_ANSWERS = 2
MAX_ANSWERS = 10
MIN_ANSWERS_MSG = "Minimum of two(2) answers required."
MAX_ANSWERS_MSG = "Maximum of ten(10) answers only."
TOP_ANSWER_MSG = "Can't go up answer is on the top list."
You can’t perform that action at this time.