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
/** | |
* Javascript port of Clojure's flavor of Murmur3. | |
* See https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Murmur3.java | |
* | |
* Find at: https://gist.github.com/favila/9088146 | |
* By favila (Francis Avila) 2014-02-19 | |
*/ | |
goog.provide('cljs.lang.murmur3'); | |
goog.require('cljs.core'); |
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
-- Related blog post to this Gist: | |
-- https://torsten.io/stdout/expanding-json-arrays-to-rows | |
-- Run these commands on a interactive RedShift session: | |
CREATE TEMP TABLE clusters AS ( | |
SELECT 1 AS id, '[1, 2]' AS node_sizes UNION ALL | |
SELECT 2 AS id, '[5, 1, 3]' AS node_sizes UNION ALL | |
SELECT 3 AS id, '[2]' AS node_sizes | |
); |
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
VIM and Clojure: | |
The current steps might be (intended for vim beginners). | |
0A. Install Pathogen for easy vim installation (optional) | |
- https://github.com/tpope/vim-pathogen | |
- http://www.vim.org/scripts/script.php?script_id=2332 | |
0B. Install new version of static runtime editing (optional, only if latest version is needed) | |
- https://github.com/guns/vim-clojure-static |
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
#!/bin/bash -ex | |
# Paste this into ssh | |
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex | |
# When forking, you can get the URL from the raw (<>) button. | |
### Set some command variables depending on whether we are root or not ### | |
# This assumes you use a debian derivate, replace with yum, pacman etc. | |
aptget='sudo apt-get' | |
chsh='sudo chsh' |
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 | |
# coding=utf8 | |
# author=evi1m0 | |
# website=linux.im | |
''' | |
12306 Captcha Picture: | |
author: Evi1m0@20150316 | |
1. Download Captcha | |
2. Pic Conver Text |
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
def shellout(template, **kwargs): | |
""" | |
Takes a shell command template and executes it. The template must use | |
the new (2.6+) format mini language. `kwargs` must contain any defined | |
placeholder, only `output` is optional. | |
Raises RuntimeError on nonzero exit codes. | |
Simple template: | |
wc -l < {input} > {output} |
- Homebrew
- Python 2.7
- Git
There's an issue with cairo 14.x that results in the axis fonts on the graphs being HUUUUUGE. Downgrading to 12.6 helps: