Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am joshrp on github.
  • I am joshrp (https://keybase.io/joshrp) on keybase.
  • I have a public key ASCaO2Iv1UbQM1ULDwAjbtTBc2weuX2Zr6LYMDS5yBj2Kwo

To claim this, I am signing this object:

(ns pr-stats.models.github-pr
(:require
[clj-http.client :as client]
[clojure.core.async :as a :refer [>! <! >!! <!! go chan]]
)
(:gen-class))
(defn getClientGet
[]
(defn getFetch
[]
pulls/pulls)
(defn getSomething
[id]
((getFetch) "twbs" "bootstrap")
)
var githubhook = require('githubhook');
var github = githubhook({/* options */});
github.listen();
var mergeRegex = /^Merge pull request (#\d)+ from/;
github.on('*', function (event, repo, ref, data) {
console.log('Hook received for',repo);
var head = data.head_commit;
@joshrp
joshrp / Colour-Interpolation.markdown
Created December 21, 2014 13:39
Colour Interpolation
@joshrp
joshrp / 0_reuse_code.js
Created January 24, 2014 11:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/bin/bash
$NAME=joshrp
git log --since=14.days --format='%h %cr %s' upstream/develop | grep -P "Merge pull request #\d+ from $NAME"
@joshrp
joshrp / isMerged
Last active January 2, 2016 02:19
#! /usr/bin/env bash
# check branches created from and merged to this branch
REMOTE=upstream
COMPAREBRANCH=develop
MASTER=refs/remotes/$REMOTE/$COMPAREBRANCH
git fetch $REMOTE
# for each remote branch...
for BRANCH in $(git for-each-ref --format='%(refname)' refs/heads/); do
# ...except the $MASTER branch and the current HEAD
@live_panel = Css[entry.downcase.gsub(' ', '_')]
live_panel_data.should have_css @live_panel
waitForPromise: function(defer, expectations, failureHandle, timeout) {
var fired = false,
results = false,
failure = null;
timeout = timeout === undefined ? 10000 : timeout;
defer.done(function (r) {
fired = true;
results = r;