A lightweight node port of websocketd, originally written in go.
node-websocketd --port=8080 ./count.shA lightweight node port of websocketd, originally written in go.
node-websocketd --port=8080 ./count.sh| var ansi = require("ansi"); | |
| var cursor = ansi(process.stdout); | |
| var colors = [ | |
| "white", "black", "blue", "cyan", "green", "magenta", "red", "yellow", "grey", | |
| "brightBlack", "brightRed", "brightGreen", "brightYellow", "brightBlue", "brightMagenta", "brightCyan", "brightWhite" | |
| ]; | |
| var styles = [ "bold", "italic", "underline", "inverse" ]; | |
| colors.forEach( function (color) { |
| var amqpconnection = amqp.createConnection({url: config.CLOUD_AMQP}, connOptions); | |
| amqpconnection.on('ready', function() { | |
| // dead letter exchange for rejected messages | |
| amqpconnection.exchange( | |
| deadLetterExchange, | |
| options = {durable: true, autoDelete: false, type: 'topic'}, | |
| function (ex) { | |
| #!/bin/bash | |
| # Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
| # Install stuff # | |
| ################# | |
| # Install development tools and some misc. necessary packages | |
| yum -y groupinstall "Development tools" | |
| yum -y install zlib-devel # gen'l reqs |
http://wiki.nginx.org/HttpLuaModule#Installation
install LuaJIT
$ brew install luajit
download ngx_devel_kit
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| #!/bin/bash | |
| # | |
| # This script will make a webcam snapshot every commit. The jpg file will have | |
| # the commit id as the filename. | |
| # | |
| # This script requires imagesnap. Install with: 'brew install imagesnap' | |
| # | |
| # Put this file in the '.git/hooks/' name it 'post-commit' and chmod it by: | |
| # 'chmod +x .git/hooks/post-commit' | |
| # |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| This playbook has been removed as it is now very outdated. |