This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Minimal singleton router - good enoughfor our needs | |
* 654 bytes using Google Closure Compiler and gzipping | |
* | |
* @see http://krasimirtsonev.com/blog/article/A-modern-JavaScript-router-in-100-lines-history-api-pushState-hash-url | |
* | |
* @example | |
* // configuration | |
* Router.config({ mode: 'history'}); | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); // Used to stream bundle for further handling | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var gulpif = require('gulp-if'); | |
var uglify = require('gulp-uglify'); | |
var streamify = require('gulp-streamify'); | |
var notify = require('gulp-notify'); | |
var concat = require('gulp-concat'); | |
var cssmin = require('gulp-cssmin'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Helper functions to validate Rescue Time stats | |
// Copy paste into the console or add to Code Snippets in Chrome => run | |
// run in the console by running `printStats()` | |
function findElems() { | |
return $('.report-table tr td:nth-child(2)'); | |
} | |
function t(time) { | |
var tmp, min, sek; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* How to create a Promise I can control | |
* when and if it resolves | |
* @returns {promise, resolve, reject} | |
*/ | |
function promiseStub(){ | |
var result = {}; | |
result.p = new Promise(function(res,rej){ | |
result.resolve = res; | |
result.reject = rej; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 'connected' | |
5007 'getting key' | |
5881 'ended' | |
5882 'reconnecting' { delay: 255, attempt: 2 } | |
6143 'error' [Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED] | |
6144 'reconnecting' { delay: 433, attempt: 3 } | |
6580 'error' [Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED] | |
6580 'reconnecting' { delay: 736, attempt: 4 } | |
7319 'error' [Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED] | |
7319 'reconnecting' { delay: 1251, attempt: 5 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Print the number of millis since the Epoch (Jan 1 1970) | |
* Compile: cc millis.cc -o millis | |
* Put in your path: mv millis /usr/local/bin | |
*/ | |
#include <stdio.h> | |
#include <sys/time.h> | |
int main(void) | |
{ | |
struct timeval time_now; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cpp/BoostParts/boost/python/detail/wrap_python.hpp b/cpp/BoostParts/boost/python/detail/wrap_python.hpp | |
index eaef784..6b367ce 100644 | |
--- a/cpp/BoostParts/boost/python/detail/wrap_python.hpp | |
+++ b/cpp/BoostParts/boost/python/detail/wrap_python.hpp | |
@@ -82,7 +82,7 @@ | |
// Some things we need in order to get Python.h to work with compilers other | |
// than MSVC on Win32 | |
// | |
-#if defined(_WIN32) || defined(__CYGWIN__) | |
+#if defined(_WIN32) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This is quite useful for front-enders, as it will launch a fresh | |
# Chrome instance with no loaded plugins or extensions that messes | |
# with your performance profiling or network debugging | |
# | |
# Install: | |
# install -m 555 ~/Downloads/chrome-fresh /usr/local/bin/ | |
# | |
# As an Application, just open the OS X script editor and type | |
# do shell script "~/bin/chrome-fresh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(n){ | |
// do something with n | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function e(t, n, r) { | |
function s(o, u) { | |
if (!n[o]) { | |
if (!t[o]) { | |
var a = typeof require == "function" && require; | |
if (!u && a) return a(o, !0); | |
if (i) return i(o, !0); | |
var f = new Error("Cannot find module '" + o + "'"); | |
throw f.code = "MODULE_NOT_FOUND", f | |
} |