I hereby claim:
- I am psev on github.
- I am psev (https://keybase.io/psev) on keybase.
- I have a public key whose fingerprint is 3F2B 456A D058 D8A0 66BB 9BAC 7D7D 8A5D 2E2C 1C20
To claim this, I am signing this object:
#include <Python.h> | |
#include <ctype.h> | |
#include <stdbool.h> | |
#define MAX_STRING_LENGTH 500 | |
#define UPPER(c) (((c)>='a' && (c) <= 'z') ? ((c)+('A'-'a')) : (c) ) | |
char* CAP(char *txt) | |
{ | |
*txt = UPPER(*txt); |
var http = require('http'); | |
var cheerio = require('cheerio'); | |
var numeral = require('numeral')(); | |
var rsvp = require('rsvp'); | |
var _ = require('underscore'); | |
var Model = require('./model'); | |
var Scraper = function(opts) { | |
var self = this; |
db.People.aggregate({ | |
$group : { | |
_id : { street: "$STREET_NAM", area: "$AREA", ward: "$WARD", precinct: "$PRECINCT" }, | |
street_min : { $min : "$STREET_NO" }, | |
street_max : { $max : "$STREET_NO" }, | |
black : { $sum : { $cond : [ { $eq : [ "$RACE", "B" ] }, 1, 0 ] } }, | |
white : { $sum : { $cond : [ { $eq : [ "$RACE", "W" ] }, 1, 0 ] } }, | |
other : { $sum : { $cond : [ { $eq : [ "$RACE", "O" ] }, 1, 0 ] } }, | |
hispanic : { $sum : { $cond : [ { $eq : [ "$RACE", "H" ] }, 1, 0 ] } }, | |
total : { $sum : 1 } |
/** @module Auxiliary */ | |
var toString = Object.prototype.toString; | |
/** | |
* Iterates over `args` and invokes the supplied callback with an | |
* `item` and `index`. | |
* | |
* @param {array} args - The array of items to iterate over. | |
* @param {function} callback - The function to call for each index. |
package hold | |
import ( | |
"time" | |
) | |
func Hold(read chan interface{}, timeout time.Duration) interface{} { | |
var result interface{} | |
for { | |
select { |
package main | |
import ( | |
"github.com/coreos/go-etcd/etcd" | |
"log" | |
) | |
func main() { | |
client := etcd.NewClient([]string{"http://172.17.0.144:4001"}) | |
res, err := client.Set("/test", "ing", 0) |
I hereby claim:
To claim this, I am signing this object:
function isArray(obj) { | |
return toString.call(obj) === '[object Array]'; | |
}; | |
function flatten(branch, flat, max, depth) { | |
flat = flat || [ ]; max = max || 1; | |
depth = ( depth ? depth + 1 : 1); | |
for(var i in branch) { | |
if(isArray(branch[i])) { | |
if((max < 0) || (depth <= max)) { |
daemon off; | |
{{ get "/config" }} | |
http { | |
{{ $services := group (getrx "/service/.*") "^/service/([a-zA-Z0-9]+)/.*" }} | |
{{ range $service_name, $service := $services }} |
resource "aws_instance" "registry" { | |
ami = "ami-45c53d2e" | |
key_name = "psev-longsight" | |
instance_type = "t2.small" | |
associate_public_ip_address = true | |
subnet_id = "${aws_subnet.registry-b.id}" | |
vpc_security_group_ids = [ "${aws_security_group.registry.id}" ] | |
provisioner "file" { | |
source = "conf/registry.service" |