(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.
(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.
# Add 'source ~/.zsh_alias' to the bottom of ~/.zshrc to use | |
# Can also add to these to /Homestead/aliases for us with your Homestead VM | |
# Composer | |
alias csu="composer self-update" | |
alias cu="composer update" | |
alias ci="composer install" | |
alias cda="composer dump-autoload -o" | |
# Laravel / Artisan |
#!/bin/sh | |
remove_dangling() { | |
echo "Removing dangling images ..." | |
docker rmi $(docker images -f dangling=true -q) | |
} | |
remove_stopped_containers() { | |
echo "Removing stopped containers ..." | |
docker rm $(docker ps -qa) |
/** | |
* In order to get the cursor position / selection for a contenteditable HTML element, we need to do some | |
* fancy stuff. This is necessary for the editable-text directive (and possibly others in the future). This code comes | |
* from the following stack overflow post: | |
* | |
* http://stackoverflow.com/questions/13949059/persisting-the-changes-of-range-objects-after-selection-in-html/13950376#13950376 | |
* Example here: | |
* http://jsfiddle.net/WeWy7/3/ | |
* | |
*/ |
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" | |
viewBox="0 0 1000 20" preserveAspectRatio="none" width="100%" height="20"> | |
<polygon points="0,0 1000,0 500,20" style="fill:#cc3333; stroke: lightgrey; stroke-width: 6;"/> | |
</svg> |
/* bling.js */ | |
window.$ = document.querySelector.bind(document); | |
window.$$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
const loop = (() => { | |
const recur = (callback, count, i=0) => { | |
if (i == count-1) return callback(i); | |
callback(i); | |
return recur(callback, count, i+1); | |
}; | |
return (callback, count) => { | |
if (count > 0) return recur(callback, count); | |
}; | |
})(); |
/** | |
* Created by Dmytro on 3/27/2016. | |
*/ | |
var browserify = require('browserify'), | |
gulp = require('gulp'), | |
sourcemaps = require('gulp-sourcemaps'), | |
sass = require('gulp-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
source = require('vinyl-source-stream'), | |
buffer = require('vinyl-buffer'), |