Skip to content

Instantly share code, notes, and snippets.

View jacquescrocker's full-sized avatar

Jacques Crocker jacquescrocker

View GitHub Profile
@jacquescrocker
jacquescrocker / gist:1318784
Created October 27, 2011 04:35 — forked from mattetti/gist:1318670
google cloud print pointers
# this works with oauth 0.5.1
client = OAuth2::Client.new(CLIENT_ID, CLIENT_SECRET,
:authorize_url => "/o/oauth2/auth",
:token_url => "/o/oauth2/token",
:site => 'https://accounts.google.com/')
redirect_uri = "#{SERVER_URL}/oauth2callback"
get '/auth' do
#!bash
#
# bash completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/).
# Distributed under the GNU General Public License, version 2.0.
#
# The contained completion routines provide support for completing:
#
.flash, .alert {
background: #ffffdd;
padding: 10px;
position: absolute;
width: 500px;
margin: 0 auto;
left: 0;
right: 0;
top: 0;
text-align: center;
<% if notice.present? %>
<div class="flash notice"></div>
<% end %>
<% if alert.present? %>
<div class="flash alert"></div>
<% end %>
<% if notice.present? %>
<div class="flash notice"></div>
<% end %>
<% if alert.present? %>
<div class="flash alert"></div>
<% end %>
<% if not
<div cl
<% end %>
<% if ale
<div cl
<% end %>
Sass::Engine::DEFAULT_OPTIONS[:load_paths].tap do |load_paths|
load_paths << "#{Rails.root}/app/assets/stylesheets"
load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/compass/stylesheets"
load_paths << "#{Gem.loaded_specs['compass'].full_gem_path}/frameworks/blueprint/stylesheets"
end
group 'workers' do
guard 'process', :name => 'Resque', :command => 'bundle exec rake QUEUE=* VVERBOSE=1 resque:work' do
watch(%r{^app/(.+\.rb)})
watch(%r{^config/(.+\.rb)})
watch(%r{^config/(.+\.yml)})
watch(%r{^lib/(.+\.rb)})
end
end
group 'workers' do
guard 'process', :name => 'Resque', :stop_signal => "KILL", :command => 'bundle exec rake QUEUE=* VVERBOSE=1 resque:work --trace' do
watch(%r{^app/(.+\.rb)})
watch(%r{^config/(.+\.rb)})
watch(%r{^config/(.+\.yml)})
watch(%r{^lib/(.+\.rb)})
end
end
# DEV RELOAD FOR JQUERY / UNDERSCORE
$ = jQuery
# add reloadElement to underscore
_.mixin
# reloads a particular element
reloadElement: (element) ->
if element and element.tagName
tag = element.tagName.toUpperCase()