Skip to content

Instantly share code, notes, and snippets.

Steven Fusco reklis

Block or report user

Report or block reklis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@reklis
reklis / task.js
Created Mar 24, 2017
example of tj style task library
View task.js
const fs = require('fs')
function task(fn) {
const gen = fn()
function step(err, res) {
const ret = gen.next(res)
if (ret.done) return
ret.value(step)
}
@reklis
reklis / docker.sh
Created Sep 28, 2016
docker shell profile stuff
View docker.sh
function docker-start() {
machine_status=$(docker-machine status)
if [ "Stopped" == $machine_status ]
then
docker-machine start default
fi
eval "$(docker-machine env default)"
}
@reklis
reklis / sw.txt
Created Sep 3, 2016
programming languages => characters in the Star Wars universe
View sw.txt
Assembly. R2-D2
Asm.js. BB8
Basic. Mouse Droid
Visual Basic 6. GNK Droid
C. Yoda
D. Light Saber
C++. Yoda with a Light Saber
Objective-C. Old Obi-Won
C#. Jedi Luke
Delphi. Lando Calrissian
@reklis
reklis / mkvocore.sh
Last active Dec 3, 2015
vocore mac install
View mkvocore.sh
#!/usr/bin/env bash
################################################################################
## docs
##
## http://vocore.io/wiki/index/id:13
## https://wiki.openwrt.org/easy.build.macosx
## https://wiki.openwrt.org/doc/howto/buildroot.exigence.macosx
################################################################################
@reklis
reklis / Example.cpp
Created Sep 15, 2015
reliability-and-flow-control
View Example.cpp
/*
Reliability and Flow Control Example
From "Networking for Game Programmers" - http://www.gaffer.org/networking-for-game-programmers
Author: Glenn Fiedler <gaffer@gaffer.org>
*/
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
@reklis
reklis / post-update
Last active Aug 29, 2015
git hooks example
View post-update
#!/bin/bash
# server-side post-update deployment hook
# https://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin
set -e # exit immediately if anything is non-zero return
set -m # enable background jobs
set -u # undefined variables are an error
set -x # echo the commands while they are executed
@reklis
reklis / make_positive_graph.sh
Last active Aug 29, 2015
twitter sentiment analysis graph
View make_positive_graph.sh
# brew install jshon
# npm i -g json
# npm i -g underscore-cli
json -g -c 'this.tweet.in_reply_to_screen_name' < sample.json | underscore process '_.map(data, function(value) { return {
valence: value.valence,
polarity: value.polarity,
user: value.tweet.user.screen_name,
mentions: _.map(value.tweet.entities.user_mentions, function(mention) { return mention.screen_name })
}})' | underscore filter 'value.mentions.length' | underscore process '_.groupBy(data, "valence")' | jshon -e positive | underscore process '_.map(data, function(d) {
@reklis
reklis / spiral.itermcolors
Created Apr 1, 2015
spiral iterm2 colors
View spiral.itermcolors
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.29803922772407532</real>
<key>Green Component</key>
<real>0.29803922772407532</real>
@reklis
reklis / .zprofile
Last active May 17, 2016
zsh profile baseline
View .zprofile
for f (~/.zshrc.d/**/*.sh) {
source $f
}
source ~/.zsh-keybindings
source ~/.zsh-prompt
View addressparser.regex
(?:(?P<name>[^,]+)\W+)??(?P<number>(?:(?:\p{Alpha})?\d+(?:[- ][\p{Alpha}&&[^NSEW]](?!\s+(?:st|street|ave|aven|avenu|avenue|blvd|boulv|boulevard|boulv|plz|plaza|plza)))?|\d+-?\d*(?:-?\p{Alpha})?|zero|one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen)(?:\W+\d+\/\d+)?)\W+(?:(?:(?P<predir>NORTHWEST|SOUTHEAST|SOUTHWEST|NORTHEAST|NORTH|SOUTH|WEST|EAST|N[ ]?E|S[ ]?E|S[ ]?W|N[ ]?W|N|S|E|W)\W+)?(?:(?P<street>[^,]+)(?:[^\w,]+(?P<type>EXTENSIONS|TRAFFICWAY|THROUGHWAY|EXPRESSWAY|UNDERPASS|EXTENSION|CROSSROAD|JUNCTIONS|STRAVENUE|BOULEVARD|MOUNTAINS|CROSSING|MOTORWAY|VILLIAGE|TURNPIKE|MOUNTAIN|VILLAGES|CAUSEWAY|OVERPASS|CRESCENT|PARKWAYS|JUNCTION|CORNERS|SPRINGS|STATION|MISSION|CRSSING|GARDENS|VALLEYS|HOLLOWS|CRECENT|CENTERS|MOUNTIN|HARBORS|EXPRESS|RANCHES|ISLANDS|ORCHARD|HIGHWAY|STRVNUE|SQUARES|GATEWAY|TERRACE|STRAVEN|ESTATES|LANDING|HEIGHTS|PRAIRIE|PLAINES|MEADOWS|PARKWAY|FREEWAY|TUNNELS|JUNCTON|FORESTS|VILLAGE|WALKWAY|CIRCLES|CRESENT|VIADUCT|PASS
You can’t perform that action at this time.