- shrinking size
- increasing power
- MicroProcessor (Tiny)
| /* | |
| Heroku Office Status Monitor | |
| What it is: Arduino + Ethernet Shield | |
| What it does: Networked device that provides status monitoring. | |
| Components: | |
| - Status site monitor | |
| HTTP GET to http://outage-lights.herokuapp.com/status to consume current Heroku Platform status. |
| #include <stdio.h> | |
| #include "zhelpers.h" | |
| int main(void) | |
| { | |
| void *context = zmq_ctx_new(); | |
| void *reciever = zmq_socket(context, ZMQ_PULL); | |
| zmq_bind(reciever, "tcp://127.0.0.1:5557"); | |
| puts("reciever on tcp://127.0.0.1:5557"); |
| var logfmt = require('./logfmt'); | |
| myTimelyFunction = function(done) { | |
| logfmt.log({ "foo": "bar", "a": 14, baz: 'hello kitty'}) | |
| done('timely_function'); | |
| } | |
| logfmt.time(myTimelyFunction); | |
| var logfmt = require('./logfmt'); | |
| myTimelyFunction = function() { | |
| logfmt.log({ "foo": "bar", "a": 14, baz: 'hello kitty'}) | |
| } | |
| logfmt.time(function(done){ | |
| myTimelyFunction(); | |
| done('timely_function'); | |
| }); |
| exports.logger = logfmt.requestLogger( | |
| elapsed: "measure#http.#{req.method.toLowerCase()}", | |
| (req, res) -> | |
| ns: "app-state" | |
| source: req.url | |
| status: res.statusCode | |
| from: req.socket && (req.socket.remoteAddress || (req.socket.socket && req.socket.socket.remoteAddress)) | |
| "agent": req.headers["user-agent"] | |
| "request_id": req.headers["x-request-id"] |
| var split = require('split'); | |
| var logfmt = require('logfmt'); | |
| var through = require('through'); | |
| var _ = require('underscore'); | |
| var list = [] | |
| var parseLine = function(line){ | |
| if(/INFO/.test(line)) return; |
| #set-option -g default-terminal "screen-256color" | |
| # command prefix (like screen) | |
| set -g prefix C-a | |
| bind C-a send-prefix | |
| #bind tab select-pane -t :.+ | |
| # quit \ | |
| unbind \ |
| -- don't rollback the entire fucking transaction | |
| -- if you typo a sql command, but only in interactive mode | |
| \set ON_ERROR_ROLLBACK interactive | |
| -- a prompt wtih transaction information | |
| \set PROMPT1 '%[%033[33;1m%]%x%[%033[0m%]%[%033[1m%]%/%[%033[0m%]%R%# ' | |
| -- automatically switch between extended and normal | |
| -- depending on how wide the output is | |
| \x auto |