This file contains 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
// only works when there is no task running | |
// because we have a server always listening port, this handler will NEVER execute | |
process.on("beforeExit", (code) => { | |
console.log("Process beforeExit event with code: ", code); | |
}); | |
// only works when the process normally exits | |
// on windows, ctrl-c will not trigger this handler (it is unnormal) | |
// unless you listen on 'SIGINT' | |
process.on("exit", (code) => { |
This file contains 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 http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
This file contains 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(XHR) { | |
"use strict"; | |
var stats = []; | |
var timeoutId = null; | |
var open = XHR.prototype.open; | |
var send = XHR.prototype.send; | |