Skip to content

Instantly share code, notes, and snippets.

View OscarGodson's full-sized avatar
:shipit:
Workin'

Oscar Godson OscarGodson

:shipit:
Workin'
  • CTO
  • Portland, OR
  • 12:31 (UTC -07:00)
View GitHub Profile

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
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;
}
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)
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
}
#!/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';
@OscarGodson
OscarGodson / netflix_categories.json
Last active August 29, 2015 14:11
An ongoing list of all the netflix categories. These are generated with JS
{
"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",
<?php if(!is_front_page()){ ?>
<script>/* the breadcrumb code */</script>
<?php } ?>
header(“Pragma: no-cache”);
header(“cache-Control: no-cache, must-revalidate”);
header(“Expires: Mon, 26 Jul 1997 05:00:00 GMT”);
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
$(window).scroll(function(e){
$fixed = $('.fixed');
if ($(this).scrollTop() > 300 && $fixed.css('position') != 'fixed'){
$fixed.css({'position': 'fixed', 'top': '0px'});
}
});