Skip to content

Instantly share code, notes, and snippets.

View KevinGreene's full-sized avatar

Kevin Greene KevinGreene

View GitHub Profile
@KevinGreene
KevinGreene / Github export to Pivotal CSV
Created August 10, 2013 04:48
Export github issues to pivotal Some minor updates to https://gist.github.com/unbracketed/3380407 to put it in a more typical Pivotal Tracker import format
import csv
import requests
GITHUB_USER = 'REDACTED'
GITHUB_PASSWORD = 'REDACTED'
REPO = 'USER/REPO' # format is username/repo
ISSUES_FOR_REPO_URL = 'https://api.github.com/repos/%s/issues' % REPO
AUTH = (GITHUB_USER, GITHUB_PASSWORD)
@KevinGreene
KevinGreene / gist:6438133
Created September 4, 2013 14:55
Example error from setting valueTabuRatio. Looking further into the docs, it appears it is supposed to be an integer, seen here: http://docs.jboss.org/drools/release/6.0.0.CR2/optaplanner-javadoc/org/optaplanner/core/config/localsearch/decider/acceptor/AcceptorConfig.html Which contradicts the fact that it's a ratio, and the description here: ht…
:benchmarkException in thread "main" com.thoughtworks.xstream.converters.ConversionException: For input string: ".02" : For input string: ".02"
---- Debugging information ----
message : For input string: ".02"
cause-exception : java.lang.NumberFormatException
cause-message : For input string: ".02"
class : java.lang.Integer
required-type : java.lang.Integer
converter-type : com.thoughtworks.xstream.converters.SingleValueConverterWrapper
wrapped-converter : com.thoughtworks.xstream.converters.basic.IntConverter
line number : 114
@KevinGreene
KevinGreene / build.gradle
Created September 24, 2013 01:41
Sample build.gradle and gradle.properties - Comp 439 (Distributed Systems)
apply plugin: 'java'
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
compile 'org.antlr:antlr4:4.1'
compile 'org.codehaus.groovy:groovy-all:2.1.7'
@KevinGreene
KevinGreene / strangeloop.html
Created October 9, 2013 20:57
An example strangeloop private talk
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tracking Millions of Ganks in Near Real Time</title>
<meta http-equiv="pragma" content="no-cache" />
@KevinGreene
KevinGreene / image.py
Created December 31, 2013 01:30
Python Prime Number Viewer
from PIL import Image
height = 1039
width = 1039
im = Image.new("RGB", (width,height), "white")
pixels = im.load()
f = open('prime_colors', 'r')
for x in range(width):
@KevinGreene
KevinGreene / Error Output
Created January 13, 2014 16:46
Examples showing order matters in Grails bean builder
Offending resource: file [$projectPath/resources/spring/fails.groovy]; nested exception is groovy.lang.MissingPropertyException: No such property: locationHourFormat for class: grails.spring.BeanBuilder
Line | Method
->> 479 | loadBeans in grails.spring.BeanBuilder
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 441 | loadBeans in ''
| 194 | importBeans . . . . . . . in ''
| 3 | doCall in resources$_run_closure1
| 757 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
| 584 | beans in ''
| 757 | invokeBeanDefiningClosure in ''
@KevinGreene
KevinGreene / naLCS
Last active January 3, 2016 17:09
NA LCS GraphGist
= League of Legends eSports Overview
:neo4j-version: 2.0.0
:author: Kevin Greene
:twitter: @SurrealAnalysis
In the game League of Legends, teams of five players compete against one another, with each person on a team having a unique position and champion each game.
Over the past two years, http://www.riotgames.com/[Riot Games] has created multiple leagues for competitive play, known as the League Championship Series, or LCS. As with most competitions, people are very interested in the various statistics, and below is a possible representation in Neo4j.
@KevinGreene
KevinGreene / IssueTracker
Last active January 4, 2016 21:29
A GraphGist for an Issue Tracker
= Issue Tracking with Graphs
:neo4j-version: 2.0.0
:author: Kevin Greene
:twitter: @SurrealAnalysis
== Motivation
As with most tech companies, we at http://spantree.net/[Spantree Technology Group, LLC] strive to be as efficient as possible. One aspect of this is efficiently tracking issues and ownership across several projects. While there are many solutions out there, e.g. Pivotal Tracker, JIRA, etc., there is always room for improvement. This GraphGist represents a possible backend solution to the issue, using Neo4j.
@KevinGreene
KevinGreene / .zshrc
Created April 15, 2014 14:30
Custom things to add to zshrc
bindkey -e
bindkey '^[[1;9C' forward-word
bindkey '^[[1;9D' backward-word
alias rake='noglob rake'
grebase() {local GIT_BRANCH=$(git symbolic-ref --short HEAD); git checkout develop; git pull origin develop; git checkout ${GIT_BRANCH#}; git rebase develop;}
ghpr() {local GIT_BRANCH=$(git symbolic-ref --short HEAD); hub pull-request -b Spantree:develop -h Spantree:${GIT_BRANCH#};}
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
@KevinGreene
KevinGreene / index.coffee
Last active August 29, 2015 14:02
RabbitMQ Expire from NodeJS
amqp = require 'amqp'
_ = require 'underscore'
console.log 'creating connection'
connection = amqp.createConnection
host: 'rabbitmq.local'
connection.addListener 'error', (e) -> throw e