Skip to content

Instantly share code, notes, and snippets.

@davidaurelio
davidaurelio / create.js
Created February 22, 2011 14:48
Constructor-less inheritance for ECMAScript 5
var BaseObject = {
create: function create() {
var instance = Object.create(this);
instance._construct.apply(instance, arguments);
return instance;
},
extend: function extend(properties, propertyDescriptors) {
propertyDescriptors = propertyDescriptors || {};
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@alexeygolev
alexeygolev / controllersSpec.js
Created August 14, 2012 01:47
angular.js jasmine test spec for controller defined inside a module
'use strict';
/* jasmine specs for controllers go here */
describe('PhoneCat controllers', function() {
describe('PhoneListCtrl', function() {
beforeEach(module('phonesCat.controllers'));
@joshearl
joshearl / blank-sublime-text-snippet.xml
Created December 1, 2012 13:21
Sublime Text 2 Recruiter Response Snippet
<snippet>
<content><![CDATA[]]></content>
<tabTrigger></tabTrigger>
<scope></scope>
<description></description>
</snippet>