Skip to content

Instantly share code, notes, and snippets.

View KevinGreene's full-sized avatar

Kevin Greene KevinGreene

View GitHub Profile
(ns gitfun.core
(:require [planck.shell :refer [sh]]
[clojure.string :refer [split-lines split]]))
(def relevant-regex #"changed, |^commit")
(def stat-regex #"(\d+) files? changed, (\d+) insert.+, (\d+) delet.+")
(def deletion-regex #"(\d+) files? changed, (\d+) delet")
(def insertion-regex #"(\d+) files? changed, (\d+) insertions?\(\+\)$")
(defn is-relevant [s]
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:52016,suspend=y,server=n -ea -javaagent:/Users/kevingreene/Library/Caches/IntelliJIdea2016.3/groovyHotSwap/gragent.jar -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/ext/localedata.jar:
@KevinGreene
KevinGreene / Main.elm
Created June 23, 2016 13:16
Select Troubles in Elm
import Debug
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Html.App as Html
import Http
import Json.Decode as Json
import Task
import String
import Char
@KevinGreene
KevinGreene / clojure_thoughts.md
Last active December 29, 2023 04:51
Thoughts on Clojure after introductory talk

Hey all,

Thanks for coming out and talking about Clojure and ClojureScript! I'm not going to be posting the source code for the project, as I'm still not 100% if it will end up monetized at all, but it will probably make it's way to GitHub eventually.

If you want to learn more about Clojure, ClojureScript, and how they can help you, you have a ton of options:

Intro:

Living Clojure by Carin Meier - http://www.amazon.com/Living-Clojure-Carin-Meier/dp/1491909048 - Also available at GRPL

@KevinGreene
KevinGreene / README.md
Created March 30, 2015 23:09
Fair and Square

Requirements

Usage

➜  ~  ./fair-and-square.clj 10
(0 1 4 9 121 484 10201 12321 14641 40804)%
@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
@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 / 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 / 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 / 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 ''