Skip to content

Instantly share code, notes, and snippets.

View brianjlandau's full-sized avatar

Brian Landau brianjlandau

  • Walnut Creek, CA
View GitHub Profile
@mackermedia
mackermedia / Gemfile
Last active August 4, 2016 19:07
Capybara + JS Testing
group :test do
gem 'capybara'
gem 'poltergeist' # gem 'capybara-webkit'
gem 'database_cleaner'
end
@jgarber623
jgarber623 / _mixins.scss
Created May 3, 2012 03:06
My collection of SASS/Compass mixins
// display: block
@mixin block( $width: 0, $height: 0 ) {
display: block;
height: $height;
width: $width;
}
// CSS3: backface-visibility
@mixin backface-visibility( $style: visible ) {
# config/initializers/asset_helpers.rb
Rails.application.assets.context_class.instance_eval do
include ActionView::Helpers::UrlHelper
include Rails.application.routes.url_helpers
end
#!/usr/bin/env bash
gem uninstall rubygems-update
gem install rubygems-update --version $1
update_rubygems
# Hi! I'am rack middleware!
# I was born for show right way to you JavaScript
# My author's name was Aleksandr Koss. Mail him at kossnocorp@gmail.com
# Nice to MIT you!
require(File.dirname(__FILE__) + '/../config/environment') unless defined?(Rails)
class RoutesJs
def initialize app, options = {}
@brianjlandau
brianjlandau / gist:176754
Created August 28, 2009 02:59 — forked from defunkt/gist:162444
Rails Capistrano deploy using git as our deployment strategy. You'll need git version >=1.5.6.6 on your server for this to work.
# you'd obviously have more settings somewhere
set :scm, :git
set :repository, "git@github.com:defunkt/github.git"
set :branch, "origin/master"
set :migrate_target, :current # this tells capistrano where to run the migration. otherwise it would try to use the latest release directory (/path/to/app/releases/2012XXXXXXXXX)
set :use_sudo, false
set :ssh_options, {:forward_agent => true} # so you can checkout the git repo without giving the server access to the repo
set :rails_env, 'production'
# These are here to override the defaults by cap