- copy the file
commit-msgto.git/hooks/commit-msg - make sure your delete the sample file
.git/hooks/commit-msg.sample - Make commit msg executable.
chmod +x .git/hooks/commit-msg - Edit
commit-msgto better fit your development branch, commit regex and error message - Profit $$
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // Observable to Promise | |
| var promise = Rx.Observable.return(42).toPromise(RSVP.Promise); | |
| promise.then(console.log.bind(console)); | |
| // => 42 | |
| // Using config instead of argument | |
| Rx.config.Promise = RSVP.Promise; | |
| var promise = Rx.Observable.return(42).toPromise(); | |
| promise.then(console.log.bind(console)); | |
| // => 42 |
| // Minimal FRP Behaviors and Events. | |
| // An event function is any function of shape `function (next) { ... }` where | |
| // `next(value)` is a callback to be called by event function. Transformations | |
| // of event are accomplished by wrapping event with another event function, | |
| // and consuming original event within (CPS). | |
| // A behavior is any function of shape `function (time) { ... }`, where | |
| // `time` is current time. Behaviors may capture state, return value from time, | |
| // or be constant. Behaviors must always return a value, but value may |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc| // stream.ts - A TypeScript module for FRP. | |
| // - https://gist.github.com/hisui/6261547 | |
| // - tsc stream.ts -t es5 --sourcemap --noImplicitAny | |
| module sf { | |
| export class Packet<T> { | |
| constructor(private _flags:number, private _value:any=void 0) {} | |
| static next<A>(e:A):Packet<A> { |
| //MIT License | |
| //Author: Max Irwin, 2011 | |
| //Floodfill functions | |
| function floodfill(x,y,fillcolor,ctx,width,height,tolerance) { | |
| var img = ctx.getImageData(0,0,width,height); | |
| var data = img.data; | |
| var length = data.length; | |
| var Q = []; | |
| var i = (x+y*width)*4; |
| <!DOCTYPE HTML> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title></title> | |
| <script src="http://d3js.org/d3.v2.js"></script> | |
| <style> | |
| line.arrow { | |
| stroke: #666; |