$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
#!/usr/bin/env escript | |
epoch() -> | |
{Mega,Sec,Mili} = now(), | |
(Mega * 1000000) + Sec + (Mili / 1000000). | |
measure(F) -> | |
Ini = epoch(), | |
F(), | |
epoch() - Ini. |
;; Clojure-style list comprehensions for Emacs Lisp | |
(setq lexical-binding t) | |
;; (for ((x '(1 2 3 4 5)) | |
;; (:let ((y (* x x)))) | |
;; (:while (< y 10))) | |
;; y) | |
;; => (1 4 9) |
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): |
#!/usr/bin/env escript | |
-mode(compile). | |
epoch() -> | |
{Mega,Sec,Mili} = os:timestamp(), | |
(Mega * 1000000) + Sec + (Mili / 1000000). | |
measure(F) -> | |
Ini = epoch(), |
# ---------------------- | |
# 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' |
$ npm install --save babel-cli babel-preset-es2015
$ npm install --save-dev jasmine
.babelrc:
{
"presets": ["es2015"]
# | |
# templatetags/kwacros.py - Support for macros in Django templates | |
# | |
# Based on snippet by | |
# Author: Michal Ludvig <michal@logix.cz> | |
# http://www.logix.cz/michal | |
# | |
# modified for args and kwargs by Skylar Saveland http://skyl.org | |
# |
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs | |
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center | |
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json | |
findbugs looks like a short plugin name. Did you mean 'null'? | |
# Specifying a full URL works! | |
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi | |
# Get the update center ourself |
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.
#!/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( |