Skip to content

Instantly share code, notes, and snippets.

<?php
/*
** Converts HSV to RGB values
** –––––––––––––––––––––––––––––––––––––––––––––––––––––
** Reference: http://en.wikipedia.org/wiki/HSL_and_HSV
** Purpose: Useful for generating colours with
** same hue-value for web designs.
** Input: Hue (H) Integer 0-360
** Saturation (S) Integer 0-100
#Main
vbell off
escape ``
startup_message off
autodetach on
mousetrack on
#Caption
caption always "%{kw}%-w%{wr}%n %t %{-}%+w"
@joshrp
joshrp / Node Pal.md
Last active December 23, 2015 13:09
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;
@live_panel = Css[entry.downcase.gsub(' ', '_')]
live_panel_data.should have_css @live_panel
@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
#!/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 / 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
@joshrp
joshrp / Colour-Interpolation.markdown
Created December 21, 2014 13:39
Colour Interpolation
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;