(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.
| <!doctype html> | |
| <html style="margin: 0; padding: 0; border: 0; width: 100%; height: 100%;"> | |
| <head> | |
| <meta charset="utf-8"> | |
| </head> | |
| <body style="margin: 0; padding: 0; border: 0; width: 100%; height: 100%;"> | |
| <canvas style="display: block; width: WIDTHpx; height: HEIGHTpx;" width="WIDTH" height="HEIGHT"></canvas> | |
| <script> | |
| // shim... | |
| var a = canvas; | 
| # Accepted formats are 0-3 alpha, 9 digits, and 1-3 alpha-numeric with or without spaces and dashes: | |
| # * AAA-000-00-0000-AAA | |
| # | |
| # http://survivinghealthinsurance.com/2010/medicare-id-numbers-suffixes-and-prefixes/ | |
| /^([a-z]{0,3})[-\s]?(\d{3})[-\s]?(\d{2})[-\s]?(\d{4})[-\s]?([0-9a-z]{1,3})$/i | 
| # Tests for antialiasing a high-frequency image in various ways | |
| # Nathan Reed, July 2014 | |
| # Written for Python 3.4; requires numpy and Pillow to be installed | |
| import concurrent.futures | |
| import math | |
| import multiprocessing | |
| import numpy as np | |
| import optparse | |
| import random | 
(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.
This is inspired (or basically copied) from How To Merge Github Wiki Changes From One Repository To Another, by Roman Ivanov, and serves to ensure that should something happen to the original article, the information remains nice and safe here.
OREPO: original repo - the repo created or maintained by the owner
FREPO: the forked repo that presumably has updates to its wiki, not yet on the OREPO
| /*! | |
| * color conversion | |
| * | |
| * Copyright (c) 2014 Tobias Lindig, Germany | |
| * http://tlindig.de | |
| * License: MIT | |
| */ | |
| var __rgx_strictRgbX = /^(?:rgb|rgba)\s*\(\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})(?:,\s*([0|1]|0?\.\d+))?\s*\)/i; // don't accept % values | |
| var __rgx_isHex = /^#/; | |
| var __rgx_hex3 = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; | 
Only do this if you understand the consequences: all node programs will be able to bind on ports < 1024
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/node
Important: your node location may vary. Use which node to find it, or use it directly in the command:
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| # Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
| # Can retrieve cloudflare Domain id and list zone's, because, lazy | |
| # Place at: | |
| # /usr/local/bin/cf-ddns.sh | 
| fractalModule =function(stdlib){ | |
| "use asm"; | |
| var pow = stdlib.Math.pow; | |
| var abs = stdlib.Math.abs; | |
| var atan2 = stdlib.Math.atan2; | |
| var cos = stdlib.Math.cos; | |
| var sin = stdlib.Math.sin; | |
| function mandlebrot(cx, cy, maxIter) { | |
| cx = +cx; | |
| cy = +cy; |