Skip to content

Instantly share code, notes, and snippets.

View spikeheap's full-sized avatar

Ryan Brooks spikeheap

View GitHub Profile
@spikeheap
spikeheap / README.md
Last active October 8, 2015 08:31
Git Flow start the day

Add this function to your ZSH/BASH init to do a sane update of develop and master. Handy when you come back to a project after a couple of days.

Note that this doesn't merge develop into your current branch, but I'll leave that to you to add if you need it :).

@spikeheap
spikeheap / README.md
Last active May 24, 2017 07:59
The most basic ES6-polyfilled test setup I can come up with

Karma, Browserify & Babelify

Do you need Promises and other ES6 goodness. This will give you polyfills for your tests, and a working Karma, Browserify & Babelify setup.

Caveats

This example has been drawn up for this StackOverflow question. You probably want to polyfill Promises, etc. unless all your supported browsers already contain it. You probably also want to keep your compilation/babelification/browserification process the same between build and test. Fortunately you can (hint: common config can live in package.json), but that's outside of the scope of this Gist.

Keybase proof

I hereby claim:

  • I am spikeheap on github.
  • I am spikeheap (https://keybase.io/spikeheap) on keybase.
  • I have a public key whose fingerprint is 48ED EC4E F283 D4D3 EAD3 9236 F3B7 4711 D033 CD1B

To claim this, I am signing this object:

@spikeheap
spikeheap / PageAlerts.html
Last active August 29, 2015 14:17
Angular global user bootstrap alerts
<div>
<alert ng-repeat="alert in alerts" type="{{alert.type}}" close="alert.close()">{{alert.message}}</alert>
</div>
@spikeheap
spikeheap / gitflow_clean_merged.sh
Created September 19, 2014 13:02
Prune the Git origin of merged feature branches
git branch -r --merged | grep -v master | grep -v develop | grep -v release | sed 's/origin\///' | xargs -n 1 git push --delete origin
@spikeheap
spikeheap / soapAddMemberToGroup.groovy
Last active December 20, 2016 16:39
A Groovy SOAP client which connects to Mirth and adds a subject to a subject group. This was created as a proof-of-concept of the SOAP interface for a 3rd-party integration project.
@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='1.1.0')
import groovy.xml.*
import wslite.soap.*
import wslite.http.auth.*
def client = new SOAPClient('https://dummy:11443/ClinicalDocumentWSService/ClinicalDocumentWS?wsdl')
client.authorization = new HTTPBasicAuthorization("mirth", "password")
// Grab the latest member list
@spikeheap
spikeheap / subdir_git_status.rb
Last active August 29, 2015 14:04
Get the Git status of all subdirectories of a directory. Prints a simple summary. Not recursive...
#!/usr/bin/env ruby
ARGV.each do |arg|
not_repo = []
unstaged = []
untracked = []
puts "Looking in #{arg}"
all_dirs = Dir.entries(arg).select {|entry| File.directory? File.join(arg,entry) and !(entry =='.' || entry == '..') }
@spikeheap
spikeheap / arrayContains.js
Created July 5, 2014 16:11
Stupid JavaScript
// The tests.
it('test', function() {
var a1 = [];
a1.push({x:0, y:2});
a1.push({x:1, y:2});
a1.push({x:2, y:2});
a1.push({x:3, y:3});
@spikeheap
spikeheap / CodeRetreatCheatSheet.md
Last active August 29, 2015 14:03
Code Retreat cheat sheet

The cheat sheets in this Gist are for the Oxford Code Retreat on the 6/7/2014.

@spikeheap
spikeheap / converted-data.json
Last active August 29, 2015 14:03
Converts WildSwim.com data to GeoJSON format (part of the SusHack2 event)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.