Skip to content

Instantly share code, notes, and snippets.

View jaw6's full-sized avatar

Joshua Wehner jaw6

View GitHub Profile
package main
import (
"github.com/codegangsta/martini"
"github.com/codegangsta/martini-contrib/binding"
"github.com/codegangsta/martini-contrib/render"
"labix.org/v2/mgo"
)
type Wish struct {
@javan
javan / gist:3237348
Created August 2, 2012 14:10
Sublime Text 2: Preferences > Key Bindings - User
[
// Make paste-and-indent the default paste behavior
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
]
class ApplicationController < ActionController::Base
extend AttributeViewable
end
@jcasimir
jcasimir / Rakefile
Created March 22, 2012 14:54
Rake Instead of Rails
#!/usr/bin/env rake
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
JsbloggerCodemash::Application.load_tasks
[:generate, :destroy, :server, :console].each do |command|
desc "Proof-of-concept proxy to the rails CLI"
class NullLogger < Logger
def initialize(*args); end
def write(*input); true; end
end
Rails.application.assets.logger = NullLogger.new
class Rails::Rack::Logger
alias_method :standard_call, :call
@brianmario
brianmario / config.ru.rb
Created April 21, 2011 06:11
minimal rails3 app
# minimal rails3 app
require 'action_controller'
Router = ActionDispatch::Routing::RouteSet.new
Router.draw do
root :to => 'site#index'
end
class SiteController < ActionController::Metal