It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
(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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import hashlib | |
import optparse | |
import paramiko | |
from Crypto.PublicKey import RSA | |
def insert_char_every_n_chars(string, char='\n', every=64): | |
return char.join( |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
-mode(compile). | |
epoch() -> | |
{Mega,Sec,Mili} = os:timestamp(), | |
(Mega * 1000000) + Sec + (Mili / 1000000). | |
measure(F) -> | |
Ini = epoch(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
epoch() -> | |
{Mega,Sec,Mili} = now(), | |
(Mega * 1000000) + Sec + (Mili / 1000000). | |
measure(F) -> | |
Ini = epoch(), | |
F(), | |
epoch() - Ini. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------- | |
# installing dnsmasq and enable daemon | |
# ---------------------- | |
brew install dnsmasq | |
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
# ---------------------- | |
# adding resolver for vbox domain | |
# ---------------------- | |
[ -d /etc/resolver ] || sudo mkdir -v /etc/resolver | |
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/vbox' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReloaderEventHandler(FileSystemEventHandler): | |
""" | |
Listen for changes to modules within the Django project | |
On change, reload the module in the Python Shell | |
Custom logic required to reload django models.py modules | |
Due to the singleton AppCache, which caches model references. | |
For those models files, we must clear and repopulate the AppCache | |
""" | |
def __init__(self, *args, **kwargs): |
NewerOlder