One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash | |
fpath=(~/.zsh $fpath) | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ls='ls -GwF' | |
alias ll='ls -alh' | |
alias zshrc='code ~/.zshrc' |
Rx.Observable.timer(0, 10 * 1000) | |
.switchMap(_ => fetch('https://blockchain.info/ticker?cors=true') | |
.then(res => res.json()) | |
.then(parsed => parsed.EUR.buy) | |
) | |
.distinctUntilChanged() | |
.scan((acc, curr) => ({ | |
delta: Math.round((acc.value - curr || 0) * 100) / 100, | |
value: curr | |
}), {}) |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Micro Stripe Checkout</title> | |
<meta charSet='utf-8' /> | |
<meta name='viewport' content='initial-scale=1.0, width=device-width' /> | |
<script src="https://js.stripe.com/v3/"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> | |
<style> | |
* { |
get_latest_release() { | |
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api | |
grep '"tag_name":' | # Get tag line | |
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value | |
} | |
# Usage | |
# $ get_latest_release "creationix/nvm" | |
# v0.31.4 |
// load as early as possible | |
if(process.env.NOW){ | |
require('dotenv').config({path:'./.envnow', silent:true}); | |
}else{ | |
require('dotenv').config({silent:true}); | |
} | |
// now you can deploy with: | |
//$cp .env .envnow && now && rm -r .envnow |
1. Build GraphQL server using `express-graphql` package. | |
2. Configure `schema.js` file. | |
3. Query for data. |
<!-- This is the HTML element that, when clicked, will cause the popup to appear. --> | |
<button id="open-popup">Subscribe to our mailing list</button> |
// ES6 w/ Promises | |
// Note: From a React starter template - see https://t.co/wkStq8y3I5 | |
function fetchData(routes, params) { | |
let data = {}; | |
return Promise.all(routes | |
.filter(route => route.handler.fetchData) | |
.map(route => { | |
return route.handler.fetchData(params).then(resp => { | |
data[route.name] = resp; |
'use strict'; | |
define(['phaser'], function(Phaser) { | |
function Gesture(game) { | |
this.game = game; | |
this.swipeDispatched = false; | |
this.holdDispatched = false; | |
this.isTouching = false; |