Skip to content

Instantly share code, notes, and snippets.

View elijahmanor's full-sized avatar
😀

Elijah Manor elijahmanor

😀
View GitHub Profile
@eliperelman
eliperelman / laws.md
Last active August 2, 2016 05:48
appendTo Laws of Skype

Whitbeck’s Law

If it exists, there is a GIF of it.

Manor’s Law

For every message there is an equal and opposite deletion.

Cowart’s Law

All great messages will be deleted before you have a chance to read them.

Neiner’s Law

@cowboy
cowboy / isprimitive-no-strict.js
Created September 18, 2012 12:23
JavaScript: isPrimitive
var isPrimitive = function(val) {
return val !== function() { return this; }.call(val);
};
@cowboy
cowboy / stringify.js
Created September 19, 2012 13:45
JavaScript: like JSON.stringify but handles functions, good for creating arbitrary .js objects?
var stringify = function(obj, prop) {
var placeholder = '____PLACEHOLDER____';
var fns = [];
var json = JSON.stringify(obj, function(key, value) {
if (typeof value === 'function') {
fns.push(value);
return placeholder;
}
return value;
}, 2);
@domenic
domenic / promises.md
Last active May 13, 2026 13:10
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@Alligator
Alligator / gist:3960707
Created October 26, 2012 18:56
jsweekly bingo
JSWEEKLY BINGO
+-------------------------------+-------------------------------+-------------------------------+
| An atricle from someone who | | |
| just figured out | Baby's first functional | How to do this one very |
| prototype-based OO and thinks | programming | specific thing in Node.js |
| everyone else needs telling | | |
+-------------------------------+-------------------------------+-------------------------------+
| | | |
| A new jQuery release | A job in San Francisco | An introduction to an MVC |
| | | framework |
@mockee
mockee / backbone-sync.js
Created October 31, 2012 09:14
Override Backbone.sync
define('mod/bbsync', [
'underscore'
, 'mod/ajax'
], function(_, Ajax) {
function sync(method, model, options) {
var url = model.url, data
url = _.isFunction(url) ? model.url() : url
data = method === 'create' || method === 'update'
? model.toJSON() : {}
anonymous
anonymous / gist:4277230
Created December 13, 2012 15:38
Difference in fail semantics between jQuery promises and WinJS promises
// jQuery - failures persist along the chain
$.Deferred(function(d) { d.reject() })
.then(function() { console.log("Success handler 1") }, function() { console.log("Fail handler 1") })
.then(function() { console.log("Success handler 2") }, function() { console.log("Fail handler 2") });
// Output:
// Fail handler 1
// Fail handler 2
// ------------------------------------------------------------------------------------------------------
@elijahmanor
elijahmanor / images.md
Created January 18, 2013 20:54
Random Images

Animated Gifs

@DamianEdwards
DamianEdwards / gist:4958622
Created February 15, 2013 04:45
My Windows Phone 8 apps
4th & Mayor - FourSqaure client
Add to Calendar - support for ICS files attached to emails
Amazon Kindle
Amazon Mobile - can't live without this as a Seattelite
AppoinTile - more detailed upcoming appointments/meetings tile
Baconit - reddit client
Battery Level for WP8 - let's you see detailed battery status from lock screen, home screen, etc.
CrashPlan - so I can check my cloud backups
Dictionary.com - to settle arguments
Engadget - tech news
@gnarf
gnarf / ..git-pr.md
Last active May 7, 2026 13:08
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out