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
from collections import OrderedDict as _OrderedDict | |
try: | |
from thread import get_ident as _get_ident | |
except ImportError: | |
from dummy_thread import get_ident as _get_ident | |
class ListDict(_OrderedDict): | |
def __init__(self, *args, **kwds): | |
try: |
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 app = angular.module('mainApp', []); | |
app.directive("myScroller", function ($parse, $document) { | |
var _levelReached = function(){ | |
// is it low enough to add elements to bottom? | |
var pageHeight = Math.max(document.body.scrollHeight || | |
document.body.offsetHeight); | |
var viewportHeight = window.innerHeight || | |
document.documentElement.clientHeight || |
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 require = patchRequire(require); | |
var casper = require('casper').create({ | |
verbose: true, | |
logLevel: "debug", | |
waitTimeout: 25000 | |
}); | |
var fs = require('fs'); | |
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
https://github.com/kriskowal/q | |
http://stackoverflow.com/questions/4296505/understanding-promises-in-node-js | |
https://blog.domenic.me/youre-missing-the-point-of-promises/ | |
http://strongloop.com/strongblog/promises-in-node-js-with-q-an-alternative-to-callbacks/ | |
http://stackoverflow.com/questions/23667086/why-is-my-variable-unaltered-after-i-modify-it-inside-of-a-function-asynchron | |
http://www.html5rocks.com/en/tutorials/es6/promises/ | |
https://www.youtube.com/watch?v=wc72cyYt8-c | |
https://www.youtube.com/watch?v=K6pihiILxrc |
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
"" Install a new plugin | |
Plugin 'itchyny/lightline.vim' | |
Bundle 'zhaocai/GoldenView.Vim' |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
NewerOlder