Skip to content

Instantly share code, notes, and snippets.

View roykolak's full-sized avatar

Roy Kolak roykolak

  • Detective.io
  • Chicago, IL USA
View GitHub Profile
@roykolak
roykolak / object_class.js
Created October 6, 2011 21:37 — forked from dkordik/object_class.js
Ruby's .class for Javascript... kinda
Object.prototype.class = function () {
return "8th Grade";
}
@roykolak
roykolak / gist:942774
Created April 26, 2011 18:11
Just a simple method to switch capybara to a different driver and then change back to the default
feature 'viewing the webpage' do
switch_driver :webkit
scenario 'viewing from a webkit browser' do
...
end
end
@roykolak
roykolak / README.md
Created February 11, 2011 20:33 — forked from tmm1/README.md

Screenshots

Use it

Propane 1.1.0

Install

(function($){
jQuery.fn.mouseyDialog = function() {
// Classic Class Structure (note: no var, it's exposed for TDD)
MouseyDialog = function(anchor) {
this.anchor = $(anchor);
this.dialog = $(this.anchor.attr('href'));
this.button = $('<a href="#" class="mouseyDialog_close">close</a>');
};
MouseyDialog.prototype = {
var Person = Micro.extend(function(name) {
this.name = name;
});
Person.include({
greet: function() {
print('Hello, ' + this.name + '!');
}
});
var Micro = (function() {
var proxy = function() {};
var wrap = function(zuper, fn) {
return function() {
var saved = this.zuper;
this.zuper = zuper;
try {
return fn.apply(this, arguments);
} finally {
this.zuper = saved;