Skip to content

Instantly share code, notes, and snippets.

/* @flow */
function identity<T>(x: T): T {
return x;
}
function fmapArray<T, U>(fn: (t: T) => U): (a: ?Array<T>) => Array<U> {
return function(x) {
if (!x) {
return [];
p = [(599, 247), (835, 202), (526, 176), (558, 156), (655, 131), (630, 133), (646, 183), (877, 187), (750, 523), (936, 227), (995, 320), (590, 146), (730, 110), (540, 141), (612, 192), (602, 308), (590, 195), (675, 156), (545, 162), (870, 232), (550, 184), (859, 188), (610, 234), (625, 184), (520, 188), (870, 179), (735, 204), (635, 155), (621, 182), (687, 164), (670, 179), (520, 109), (570, 172), (799, 270), (845, 284), (873, 179), (579, 192), (840, 211), (769, 177), (658, 178), (525, 185), (855, 141), (930, 236), (789, 258), (1000, 281), (850, 188), (516, 171), (525, 158), (562, 161), (650, 203), (880, 146), (521, 168), (975, 208), (560, 176), (535, 280), (642, 241), (955, 192), (775, 183), (545, 177), (660, 176), (810, 231), (626, 137), (586, 157), (608, 310), (500, 118), (600, 219), (521, 124)]
#!/usr/bin/env python2.7
def query(c):
return sum(c.itervalues())
def merge(c1, c2):
return {k: max(c1.get(k, 0), c2.get(k, 0)) for k in set(c1).union(c2)}
class tx(object):
def __init__(self, id):
package logout
var (
logoutQuery = bson.D{
bson.DocElem{Name: "logout", Value: 1},
}
)
type logoutResponse struct {
Ok bool `bson:"ok,omitempty"`
start on runlevel [2345]
respawn
script
/dvara/dvara \
--port_start=28000 \
--port_end=28020 \
--addrs=127.0.0.1:27000 \
--key_file=$(ls -1 /dvara/*.key) \
--cert_file=$(ls -1 /dvara/*.crt) \
--username=dvara \
@shutej
shutej / artifacts.sh
Last active August 29, 2015 14:10
Cross-compiling Go on Drone.io
dist/*/*
{
"asteroids": [
{
"angles": 3,
"offset": 0
},
{
"angles": 4,
"offset": 3
},