This file contains hidden or 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
http://www.paulgraham.com/spam.html | |
https://queue.acm.org/detail.cfm?id=2187821 | |
https://martinfowler.com/articles/microservices.html |
This file contains hidden or 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
82 |
This file contains hidden or 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
FROM python:3 | |
RUN pip3 install papermill | |
RUN python3 -m pip install ipykernel |
This file contains hidden or 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
Securing mosquitto | |
```shell script | |
# Create certificate authority key | |
openssl genrsa -des3 -out ca.key 2048 | |
openssl req -new -x509 -days 1826 -key ca.key -out ca.crt | |
# Server key | |
openssl genrsa -out server.key 2048 | |
openssl req -new -out server.csr -key server.key | |
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 360 |
This file contains hidden or 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
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 bundleMetaData::pb* |
This file contains hidden or 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
sudo apt-get install python-pip python-dev python-virtualenv | |
virtualenv --system-site-packages ~/tensorflow | |
source ~/tensorflow/bin/activate | |
export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0rc0-cp27-none-linux_x86_64.whl | |
pip install --upgrade $TF_BINARY_URL | |
#remember to run source ~/tensorflow/bin/activate on new shell |
This file contains hidden or 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
Document Length: 46 bytes | |
Concurrency Level: 500 | |
Time taken for tests: 50.656 seconds | |
Complete requests: 1000000 | |
Failed requests: 0 | |
Write errors: 0 | |
Total transferred: 255000000 bytes | |
HTML transferred: 46000000 bytes | |
Requests per second: 19740.96 [#/sec] (mean) | |
Time per request: 25.328 [ms] (mean) |
This file contains hidden or 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
(defn jsArr | |
"Recursively converts a sequential object into a JavaScript array" | |
[seq] | |
(.array (vec (map #(if (sequential? %) (jsArr %) %) | |
seq)))) | |
(defn jsObj | |
"Convert a clojure map into a JavaScript object" | |
[obj] | |
(.strobj (into {} (map (fn [[k v]] |
This file contains hidden or 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
dwenv=$1 | |
dwenv=${dwenv:=dwdev} | |
if [[ -z "$1" ]]; then | |
echo "Setting up $dwenv (press ctrl+c to stop)" | |
read in | |
else | |
echo "Setting up $dwenv" | |
fi | |
sudo apt-get update && \ | |
sudo apt-get install -y git && \ |
This file contains hidden or 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
cat /tmp/nosetests.xml|tr '<' '\n'|grep 'testcase ' |cut -d\" -f2,6|sort -n -t\" -k2 |
NewerOlder