Skip to content

Instantly share code, notes, and snippets.

View csquared's full-sized avatar

Chris Continanza csquared

  • ex-stripe, ex-coinbase, ex-heroku
  • Brooklyn, NY
View GitHub Profile
@csquared
csquared / StatusMonitor.ino
Last active April 29, 2019 12:59
Heroku Status Lights Monitor - Arduino Software
/*
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.
@csquared
csquared / push_pull_broker.c
Created June 10, 2013 17:28
Push-Pull ZMQ Broker to act as a proxy/intermediary between multiple PUSH and PULL sockets.
#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");

2017-06-03 DeepTraffic

first attempt

  • crank everything! (didn't save numbers)
  • added 4 rlu layers with around 1000 neurons
  • very non-deterministic performance
  • didn't understand model
  • read the docs!
Verifying that +csquared is my blockchain ID. https://onename.com/csquared
-- 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
@csquared
csquared / talk.md
Last active December 30, 2015 12:18

Internet of Things

github.com/csquared

@em_csquared

Things == Computers

  • shrinking size

Internet of Things

Things

  • shrinking size
  • increasing power

Things

  • MicroProcessor (Tiny)
#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 \
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;
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"]