javascript:(function(){
allowCopyAndPaste = function(e){
e.stopImmediatePropagation();
return true;
};
document.addEventListener('copy', allowCopyAndPaste, true);
document.addEventListener('paste', allowCopyAndPaste, true);
document.addEventListener('onpaste', allowCopyAndPaste, true);
})();
An animated cheatsheet for smartparens using the example configuration specified here by the smartparens author. Inspired by this tutorial for paredit.
C-M-f | sp-forward-sexp |
C-M-b | sp-backward-sexp |
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
What is redash? | |
Redash is database viewer included BI tool inside. Redash has support for querying multiple databases, including: Redshift, Google BigQuery, PostgreSQL, MySQL, Graphite, Presto, Google Spreadsheets, Cloudera Impala, Hive and custom scripts. | |
Prerequisite : | |
1. Install docker | |
2. Install git | |
git clone https://github.com/getredash/redash.git | |
docker-compose -f docker-compose.production.yml run --rm server create_db | |
docker-compose -f docker-compose.production.yml up |
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 | |
echo -e "\nbenchmark.sh <title> -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..." | |
echo -e "\nEx: benchmark.sh example -n100 -c10 http://www.google.com/ http://www.bing.com/ will create benchmar-example-n100-c10.png\n" | |
## Gnuplot settings | |
echo "set terminal png | |
set output 'benchmark-${1}${2}${3}.png' | |
set title 'Benchmark: ${1} with ab ${2} ${3}' |
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
(ns freq.core | |
(:import (java.io BufferedReader FileReader)) | |
(:require [clojure.string :as string])) | |
(defn read-file-lazy | |
"Opens a file and creates a lazy-sequence to read each line" | |
[file-name] | |
(with-open [reader (BufferedReader. (FileReader. file-name))] | |
(line-seq reader))) |