Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/usr/bin/env python | |
| """ | |
| PIP can stand for PIP Installs packages Programmatically, too! | |
| (and here's how) | |
| Requires: | |
| * Python 2.6 or higher (for print-as-a-function) | |
| * PIP 0.8.2 | |
| """ |
| # ======================================== | |
| # Testing n-gram analysis in ElasticSearch | |
| # ======================================== | |
| curl -X DELETE localhost:9200/ngram_test | |
| curl -X PUT localhost:9200/ngram_test -d ' | |
| { | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { |
| .DS_Store | |
| Gemfile.lock | |
| *.pem | |
| node.json | |
| tmp/* | |
| !tmp/.gitignore |
| $ redis-cli --csv subscribe '__keyevent@0__:expired' | |
| Reading messages... (press Ctrl-C to quit) | |
| "subscribe","__keyevent@0__:expired",1 | |
| "message","__keyevent@0__:expired","key:rand:000000006649" | |
| "message","__keyevent@0__:expired","key:rand:000000000492" | |
| "message","__keyevent@0__:expired","key:rand:000000002777" | |
| "message","__keyevent@0__:expired","key:rand:000000006915" | |
| "message","__keyevent@0__:expired","key:rand:000000008335" | |
| "message","__keyevent@0__:expired","key:rand:000000005386" | |
| "message","__keyevent@0__:expired","key:rand:000000001421" |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| #!/bin/bash | |
| # | |
| # this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe | |
| # mounted at /mnt. It should be run early on the first boot of the system. | |
| # | |
| # Beware, This script is NOT fully idempotent. | |
| # | |
| METADATA_URL_BASE="http://169.254.169.254/2012-01-12" |
| aptitude install -y build-essential | |
| wget "http://downloads.sourceforge.net/project/e1000/ixgbevf stable/2.11.3/ixgbevf-2.11.3.tar.gz" | |
| tar -zxf ./ixgbevf-* | |
| cd ixgbevf*/src | |
| make install | |
| modprobe ixgbevf | |
| sudo update-initramfs -c -k all | |
| echo "options ixgbevf InterruptThrottleRate=1,1,1,1,1,1,1,1" > /etc/modprobe.d/ixgbevf.conf |
| #cloud-config | |
| coreos: | |
| etcd: | |
| # generate a new token for each unique cluster from https://discovery.etcd.io/new | |
| discovery: https://discovery.etcd.io/<token> | |
| # multi-region deployments, multi-cloud deployments, and droplets without | |
| # private networking need to use $public_ipv4 | |
| addr: $private_ipv4:4001 | |
| peer-addr: $private_ipv4:7001 |
| import asyncio | |
| def call_periodic(interval, callback, *args, **kwargs): | |
| # get loop as a kwarg or take the default one | |
| loop = kwargs.get('loop') or asyncio.get_event_loop() | |
| # record the loop's time when call_periodic was called | |
| start = loop.time() | |
| def run(handle): |