(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.
# 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; |
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
;by doppelganger (doppelheathen@gmail.com) | |
;This file is provided for your own use as-is. It will require the character rom data | |
;and an iNES file header to get it to work. | |
;There are so many people I have to thank for this, that taking all the credit for | |
;myself would be an unforgivable act of arrogance. Without their help this would | |
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |