First, install the gist
command using brew install gist
, then add this to your .zshrc (or whatever).
By default this will:
- create all gists as secret (
-p
) - copy the gist url to the clipboard (
-c
) - open the browser to the gist (
-o
)
{run} = require '@cycle/core' | |
{Observable} = require 'rx' | |
{div, input, h2, makeDOMDriver} = require '@cycle/dom' | |
intent = (domSource) => | |
changeWeight$ = domSource | |
.select('#weight').events('input') | |
.map((ev) => ev.target.value) | |
changeHeight$ = domSource | |
.select('#height').events('input') |
git remote prune origin | |
git branch -r --merged master | egrep -iv '(master|develop)' | sed 's/origin\///g' | xargs -n 1 git push --delete origin |
Service Worker - offline support for the web
Progressive apps - high-res icon, splash screen, no URL bar, etc.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
var gulp = require('gulp') | |
var browserify = require('browserify') | |
var watchify = require('watchify') | |
var babelify = require('babelify') | |
var source = require('vinyl-source-stream') | |
var buffer = require('vinyl-buffer') | |
var merge = require('utils-merge') |
In your repo's root directory, check in a requirements.txt with
boto==2.30.0
Then, from the project's Project Settings > Environment Variables page, add the two env vars: AWS_ACCESS_KEY_ID and AWS_SECRET_KEY, with an IAM key that can deploy to eb.
Then create a bash script to set up eb:
(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.
#!/bin/zsh | |
# | |
# Highlight a given file and copy it as RTF. | |
# | |
# Simon Olofsson <simon@olofsson.de> | |
# | |
set -o errexit | |
set -o nounset |