As configured in my dotfiles.
start new:
tmux
start new with session name:
| return View.extend({ | |
| initialize: function () { | |
| this.el.attr("draggable", "true") | |
| this.el.bind("dragstart", _.bind(this._dragStartEvent, this)) | |
| }, | |
| _dragStartEvent: function (e) { | |
| var data | |
| if (e.originalEvent) e = e.originalEvent | |
| e.dataTransfer.effectAllowed = "copy" // default to copy |
| // This method gives you an easier way of calling super | |
| // when you're using Backbone in plain javascript. | |
| // It lets you avoid writing the constructor's name multiple | |
| // times. You still have to specify the name of the method. | |
| // | |
| // So instead of having to write: | |
| // | |
| // User = Backbone.Model.extend({ | |
| // save: function(attrs) { | |
| // this.beforeSave(attrs); |
As configured in my dotfiles.
start new:
tmux
start new with session name:
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
| /* | |
| http://www.reddit.com/r/dailyprogrammer/comments/2451r5/4282014_challenge_160_easy_trigonometric_triangle/ | |
| Solutions: | |
| C = 90 | |
| f(a,b) = (a**2 + b**2)**-2 = c | |
| f(a,c) = (c**2 - a**2)**-2 = b | |
| f(b,c) = (c**2 - b**2)**-2 = a | |
| */ |
| /* | |
| Annotations can only occur immediately before a variable, a function declaration or an assignment | |
| ``` | |
| @Component('position') | |
| module.exports = function (x, y) { | |
| return {x: x || 0, y: y || 0}; | |
| } |
| curl -XDELETE 'localhost:9200/test' | |
| curl -XPOST 'localhost:9200/test' -d ' | |
| { | |
| "mappings": { | |
| "test_type": { | |
| "transform": { | |
| "lang": "groovy", | |
| "script": "dynamicTransformScript" | |
| }, |
| #!/bin.sh | |
| DOCKER_COMPOSE_VERSION=1.3.0 | |
| # Download docker-compose to the permanent storage | |
| echo 'Downloading docker-compose to the permanent VM storage...' | |
| sudo mkdir -p /var/lib/boot2docker/bin | |
| sudo curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /var/lib/boot2docker/bin/docker-compose | |
| sudo chmod +x /var/lib/boot2docker/bin/docker-compose | |
| sudo ln -sf /var/lib/boot2docker/bin/docker-compose /usr/local/bin/docker-compose |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents