Skip to content

Instantly share code, notes, and snippets.

View averyvery's full-sized avatar

Doug Avery averyvery

View GitHub Profile
<!DOCTYPE HTML>
<html>
<body>
<form>
<input type="date" /><br />
<input type="number" min="5" max="15" step="3" required/><br />
<input type="month" /><br />
<input type="email" autofocus /><br />
/Library/Ruby/Site/1.8/rubygems/dependency.rb:52:in `initialize': Valid types are [:development, :runtime], not nil (ArgumentError)
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:352:in `new'
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:352:in `search'
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:346:in `gems_size'
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:179:in `resolve'
from /Library/Ruby/Site/1.8/rubygems/source_index.rb:95:in `sort_by'
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:175:in `each'
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:175:in `sort_by'
from /Users/dougavery/.rvm/gems/ruby-1.9.2-p290@opower/gems/bundler-1.0.18/lib/bundler/resolver.rb:175:in `resolve'
from /Us
@averyvery
averyvery / gist:1230799
Created September 21, 2011 00:11
aaaaawwwww shiiiiiitttttt
project_type = :rails
preferred_syntax = :scss
output_style = :expanded
http_path = "/"
relative_assets = true
line_comments = false
if Rails.env.development?
require 'ruby-growl'
@averyvery
averyvery / Guardfile
Created November 14, 2011 20:58
Resizing retina images with rmagick
guard 'process', :name => 'shrink-images', :command => 'ruby resize-mobile-images.rb' do
watch /^images\/mobileretina\/.+.png/
end
@averyvery
averyvery / Guardfile
Created November 17, 2011 18:48
Guardfile for mobile dev
guard 'compass' do
watch /^.+(\.s[ac]ss)/
end
guard 'process', :name => 'minify-screen-js', :command => 'juicer merge js/all.js -o js/all.min.js --force -s' do
watch /^js\/brianregan\/screen.js/
end
guard 'process', :name => 'minify-mobile-js', :command => 'juicer merge js/mobile.js -o js/mobile.min.js --force -s' do
watch /^js\/brianregan\/mobile.js/
@averyvery
averyvery / mobile.scss
Created November 29, 2011 22:09
Retina and non-retina backgrounds with Sass
@mixin mobile-sprite($selector, $image){
#{$selector} {
background-image: image-url('mobilenormal/' + $image);
}
@media only screen and (-webkit-min-device-pixel-ratio: 2){
#{$selector} {
$image_path: 'mobilenormal/' + $image;
background-image: image-url('mobileretina/' + $image);
background-size: image-width($image_path) image-height($image_path);
}
@averyvery
averyvery / .vimrc
Created December 13, 2011 06:20
Tweaked Vim minimap
function! ToggleMinimap()
if exists("s:isMini") && s:isMini == 0
let s:isMini = 1
else
let s:isMini = 0
end
if (s:isMini == 0)
@averyvery
averyvery / compass.rb
Created January 11, 2012 20:11
compass.rb for quanting sprites
require 'growl_notify'
GrowlNotify.config do |config|
config.notifications = ["Compass Application"]
config.default_notifications = ["Compass Application"]
config.application_name = "My Application"
end
http_path = '/'
css_dir = 'public/assets/stylesheets'
@averyvery
averyvery / index.html
Created January 13, 2012 21:27
Tracking Window Dimensions with GA
<!DOCTYPE HTML>
<html>
<head>
<title>Tracking Window Size</title>
</head>
<body>
<script type="text/javascript">
var _gaq = _gaq || [];
@averyvery
averyvery / gist:1665543
Created January 23, 2012 21:09
Trackiffer Snippets
// tracking page title and url
'a' : ['_trackEvent', 'foo', document.title, window.location.url]
// tracking a concatenated string
'a' : ['_trackEvent', 'foo', document.title + ' page', 'bar']
// tracking a non-interaction event - set the sixth value to true
'a' : ['_trackEvent', 'foo', 'bar', 'foobar', undefined, true]
// tracking a click on a JS interaction