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 deepThought = new Promise(function (resolve, reject) { | |
setTimeout(function () { resolve(42); }, 1000); | |
}); | |
deepThought.then(function (answer) { | |
console.log(answer); | |
}); |
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
myApp.filter('agoFilter', function() { | |
return function(date, scope) { | |
return Math.round((new Date() - new Date(date))/(1000*60*60*24)) + ' days ago'; | |
} | |
}); | |
myApp.directive('ngBold', function() { | |
return function(scope, element) { | |
element.setAttribute('style', 'font-weight:bold'); | |
}; |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import hashlib | |
import os | |
import sys | |
import imp | |
import distutils.dir_util | |
import threading | |
import optparse | |
import time |