Skip to content

Instantly share code, notes, and snippets.

View wwilkins's full-sized avatar

Walker Wilkins wwilkins

View GitHub Profile
From the talk (bit.ly/devbooks-nov-rum):
- Managing Humans
- Badass: Making Users Awesome
- The Mythical Man Month
- The Secrets of Consulting
- How to Win Friends & Influence People
- The Design of Everyday Things
- Peopleware
- Coders at Work
- Founders at Work
@wwilkins
wwilkins / USA-Flag.html
Created March 6, 2013 21:33
Flag of the United States of America in Html & CSS3
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>The Flag of the United States of America</title>
<style>
.stars {
background-color: #3C3B6E;
min-width: 760px;
min-height: 538px;
@wwilkins
wwilkins / gist:4253936
Created December 10, 2012 22:29
Console error build_from_params, using separate user ref, not document.user
irb(main):025:0> d.build_from_params(d.build_params, u)
SystemStackError: stack level too deep
from /home/deploy/apps/village/production/shared/bundle/ruby/1.8/gems/mongoid-2.0.2/lib/mongoid/relations/proxy.rb:111:in `method_missing'
from /home/deploy/apps/village/production/shared/bundle/ruby/1.8/gems/mongoid-2.0.2/lib/mongoid/relations/proxy.rb:111:in `send'
from /home/deploy/apps/village/production/shared/bundle/ruby/1.8/gems/mongoid-2.0.2/lib/mongoid/relations/proxy.rb:111:in `method_missing'
from /home/deploy/apps/village/production/shared/bundle/ruby/1.8/gems/mongoid-2.0.2/lib/mongoid/relations/proxy.rb:111:in `send'
from /home/deploy/apps/village/production/shared/bundle/ruby/1.8/gems/mongoid-2.0.2/lib/mongoid/relations/proxy.rb:111:in `method_missing'
from /home/deploy/apps/village/production/shared/bundle/ruby/1.8/gems/mongoid-2.0.2/lib/mongoid/relations/proxy.rb:111:in `send'
from /home/deploy/apps/village/production/shared/bundle/ruby/1.8/gems/mongoid-2.0.2/lib/mongoid/relations/proxy.rb:111
@wwilkins
wwilkins / backbone-validation-bootstrap.js.coffee
Created October 29, 2012 17:05 — forked from driehle/backbone-validation-bootstrap.js.coffee
Render error messages of Backbone.Validation for Twitter Bootstrap
_.extend Backbone.Validation.callbacks,
valid: (view, attr, selector) ->
control = view.$('[' + selector + '=' + attr + ']')
group = control.parents(".control-group")
group.removeClass("error")
if control.data("error-style") == "tooltip"
# CAUTION: calling tooltip("hide") on an uninitialized tooltip
# causes bootstraps tooltips to crash somehow...
control.tooltip "hide" if control.data("tooltip")
@wwilkins
wwilkins / gist:3875598
Created October 11, 2012 21:31 — forked from brandonb927/image-2x.less
@2x LESS CSS Mixin
I converted the SCSS mixin to LESS for the lazy coders like myself in response to this blog post (http://37signals.com/svn/posts/3271-easy-retina-ready-images-using-scss)
.image-2x(@image, @width, @height) {
@media only screen and (-webkit-min-device-pixel-ratio: 1.3),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min--moz-device-pixel-ratio: 1.3),
only screen and (min-device-pixel-ratio: 1.3),
only screen and (min-resolution: 1.3dppx) {
/* on retina, use image that's scaled by 2 */
background-image: url('@{image}');
@wwilkins
wwilkins / Gemfile
Created September 13, 2012 14:56
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin
@wwilkins
wwilkins / yoga_for_geeks.md
Created August 28, 2012 13:30
Yoga for Geeks

Yoga for Geeks

Madison Ruby Conf 2012


Yoga: Lauren Amerson

@wwilkins
wwilkins / latency.txt
Created May 31, 2012 18:11 — forked from jboner/latency.txt
Latency numbers every programmer should know
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
Round trip within same datacenter 500,000 ns
Disk seek 10,000,000 ns
@wwilkins
wwilkins / gist:1184896
Created August 31, 2011 22:21
Whoa, double recursion
(define insertL*
(lambda (new old l)
(cond
((null? l) (quote ()))
((atom? (car l))
(cond
((eq? old (car l))
(cons new (cons old (insertL* new old (cdr l)))))
(else (cons (car l) (insertL* new old (cdr l))))
(else (cons (insertL* new old (car l))