Skip to content

Instantly share code, notes, and snippets.

@korenyushkin
korenyushkin / akshell.py
Created May 13, 2011 19:19
Akshell Tool
#!/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
@korenyushkin
korenyushkin / solution_for_exercise_6.js
Created February 4, 2016 17:04
Solution for Exercise 6
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');
};
@korenyushkin
korenyushkin / answer.js
Created February 5, 2016 14:25
Solution for Exercise 4
var deepThought = new Promise(function (resolve, reject) {
setTimeout(function () { resolve(42); }, 1000);
});
deepThought.then(function (answer) {
console.log(answer);
});