Skip to content

Instantly share code, notes, and snippets.

🍌
Work and stuff

Oscar Godson OscarGodson

🍌
Work and stuff
Block or report user

Report or block OscarGodson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@OscarGodson
OscarGodson / netflix_categories.json
Last active Aug 29, 2015
An ongoing list of all the netflix categories. These are generated with JS
View netflix_categories.json
{
"1":"African-American Crime Documentaries",
"2":"Scary Cult Movies from the 1980s",
"4":"Tearjerkers from the 1970s",
"5":"Gay & Lesbian Psychological Movies",
"7":"Showbiz Movies based on real life",
"10":"Movies starring Pradeep Kumar",
"11":"Military Dramas",
"15":"Suspenseful British Independent Movies",
"16":"Understated Biographical Documentaries",
View atomic-spec-building.js
#!/usr/bin/env node
var fs = require('fs');
var glob = require("glob");
var browserify = require('browserify');
var watchify = require('watchify');
var watch = require('watch');
var exec = require('child_process').exec;
var manifestFilePath = './spec/built/manifest.js';
View how_do_i_stub_requires.js
var Foo = require('../foo/index.js');
var someClass = new SomeClass({
someMethod: function () {
// How do I stub this without requiring it to be set on the prototype?
// ex: w/o having it set on someClass.baz = Foo.bar();
var baz = Foo.bar();
if (baz == 'hello') {
return 1
}
View my-favorite-not-corny-horror-films.md

My fave "not corny" horror films

Bedevilled

My all time favorite revenge horror, and one of my all time favorite movies in general.

Netflix

View for-fun.py
def sum(a, b): return a + b
def stringSum(s):
numArray = list(str(s))
return reduce(sum, map(lambda s: int(s), numArray))
print stringSum(2**1000)
View clone.js
function clone(obj) {
// Handle the 3 simple types, and null or undefined
if (null == obj || "object" != typeof obj) return obj;
// Handle Date
if (obj instanceof Date) {
var copy = new Date();
copy.setTime(obj.getTime());
return copy;
}
View os-x-apps.md

Apps that aren't included that I suggest checking out and ones I use all the time. Ones with * I use all day.

  • iTerm2 *
  • Twitter for Mac *
  • Spotify *
  • Alfred *
  • Caffiene
  • Monosnap
  • Flux (F.lux)
  • OneNote
@OscarGodson
OscarGodson / README.md
Created Dec 31, 2013
Window swapping in vim
View README.md

To use (assuming your mapleader is set to ) you would:

  1. Move to the window to mark for the swap via ctrl-w movement
  2. Type \mw
  3. Move to the window you want to swap
  4. Type \pw
View test.js
$('parent').addEvent('click:relay(#child)', function () {
alert('test');
});
$('parent').fireEvent('click', { target: $('child') });
View quote.md

As pictured by philosophers, science is a supremely rational activity. Yet the history of science shows scientists flouting the rules of scientific method. Not only the origins but the progress of science comes from acting against reason.

- John Gray

You can’t perform that action at this time.