Install the OpenSSL on Debian based systems
sudo apt-get install openssl
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "CoreOS on EC2: http://coreos.com/docs/running-coreos/cloud-providers/ec2/", | |
"Mappings" : { | |
"RegionMap" : { | |
"eu-central-1" : { | |
"AMI" : "ami-487d4d55" | |
}, |
The idea is based on a gist by @jimbojsb.
You can use Pygments or Highlight.
brew install python
(defn dopar | |
"Given a (potentially infinite) sequence `coll`, uses core.async to | |
run `f` for side effects against each value in the collection. | |
Performs at most `concur` operations in parallel, and never enqueues | |
more than `lead` items ahead of the ones being consumed. If any call | |
to `f` throws an exception, it will be rethrown from this function. | |
Otherwise, returns nil. Optional timeout value is number of | |
milliseconds to wait for all operations to complete." | |
([coll f concur lead] (dopar coll f concur lead nil)) | |
([coll f concur lead timeout-ms] |
(require '[clojure.core.async :as async]) | |
(let [l (Object.)] | |
(defn log | |
[fmt & args] | |
(locking l | |
(apply printf fmt args) | |
(flush)))) | |
(let [req (async/chan 10) |
#!/usr/bin/env bash | |
# fresh-chrome | |
# | |
# Use this script on OS X to launch a new instance of Google Chrome | |
# with its own empty cache, cookies, and user configuration. | |
# | |
# The first time you run this script, it will launch a new Google | |
# Chrome instance with a permanent user-data directory, which you can | |
# customize below. Perform any initial setup you want to keep on every |
set -g default-terminal "xterm-256color" # More colors | |
set-option -g xterm-keys on # Work more nicely with odd key combos (emacs) | |
set -g base-index 1 # Tabs start at '1', not '0' | |
set -s escape-time 0 # Faster activation | |
# Bind <C-q> to leader | |
# Make sure to update status-right to include your leader! | |
unbind C-b | |
set -g prefix C-q | |
bind-key q send-prefix |
/** | |
* Converts an RGB color value to HSL. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes r, g, and b are contained in the set [0, 255] and | |
* returns h, s, and l in the set [0, 1]. | |
* | |
* @param Number r The red color value | |
* @param Number g The green color value | |
* @param Number b The blue color value | |
* @return Array The HSL representation |
(ns stats) | |
(defn mode [vs] | |
(let [fs (frequencies vs)] | |
(first (last (sort-by second fs))))) | |
(defn quantile | |
([p vs] | |
(let [svs (sort vs)] | |
(quantile p (count vs) svs (first svs) (last svs)))) |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)