Skip to content

Instantly share code, notes, and snippets.

Recurly.buildSubscriptionForm({
beforeInject: function(form) {
$(form).find('.coupon input').hide().val('thecouponcode').change();
}
});
@em
em / gist:1125933
Created August 4, 2011 18:54
my usual interview questions for html/css
HTML
============================
1) Meaning of design vs intent bad/good uses of some elements
2) How do you mark up navigation
3) When is it appropriate to use divs
4) Some HTML5 elements and how you could use them
CSS
============================
// This is a hack that makes IE6 act almost as if overflow:hidden worked
// Empty clearfix divs are injected into every div by recuryjs, and this mixin
// overrides 'overflow' so that if you pass 'hidden', it adds a clear:both to the
// first descendent. IE also doesn't support the > selector so we emulate that
// with a further nesting inverting to clear:none
overflow(v)
overflow v
if v == 'hidden'
.clearfix
function Car() {
this.beep = function() {
alert('beep');
};
}
function Factory() {
this.createCar = function(properties) {
Car.apply(properties);
return properties;
i something something
0. somethingbleh
1. somethingasdff
2. asdfsomethingasdf
rm i1
@em
em / vinow
Created March 26, 2011 17:37
Simple utility that takes a list of keywords and recursively searches the current working directory opening the file in vim if it can infer a unique desired file.
#!/usr/bin/env ruby
require 'find'
# Take the first file if it's this much better than the alternatives:
InferenceIndex = 0.1 # 10%
results = []
(function($){
var $current = null;
var start_x = 0;
var start_y = 0;
var start_w = 0;
var start_h = 0;