Skip to content

Instantly share code, notes, and snippets.

View zerbitx's full-sized avatar

Ryan Swanson zerbitx

  • StreamNative
  • Salt Lake City UT
View GitHub Profile
@zerbitx
zerbitx / lambarya
Created January 3, 2018 17:27
Too much effort for a joke.
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"github.com/erikdubbelboer/gspt"
)

Keybase proof

I hereby claim:

  • I am zerbitx on github.
  • I am zerbitx (https://keybase.io/zerbitx) on keybase.
  • I have a public key ASBC-lVW8MYxz67Zmh1z0WMux-qrdce2T3f6ob5-oVc1xgo

To claim this, I am signing this object:

@zerbitx
zerbitx / servedir.go
Created April 12, 2017 16:47
Little fileserver that will allow CORS by default, inspired by wanting to use the swagger ui from any directory containing a swagger.json
package main
import (
"flag"
"fmt"
"log"
"net/http"
"os"
"strings"
)
#!/bin/sh
# This solution was found at https://forums.docker.com/t/pinata-missing-in-latest-mac-beta-1-11-2-beta15/15541/22
BASEDIR=~/Library/Containers/com.docker.docker/Data/database/com.docker.driver.amd64-linux
DDIR=etc/docker
mkdir -p $BASEDIR/$DDIR
cd $BASEDIR
git reset --hard
@zerbitx
zerbitx / dijkstra.js
Created July 7, 2014 02:15
Dijkstra's in JavaScript (requires underscore)
var _ = require('underscore');
function PriorityQueue()
{
!function(pq){
var nodes = [];
function comp(a,b) {
return a.priority - b.priority;
@zerbitx
zerbitx / cherry_hop.pl
Created September 13, 2012 01:54
A script for pull --rebase, cherry-pick, push from branch to branch
#!/usr/bin/env perl
use strict;
use warnings;
# Mac specific with its use of pbcopy
# usage cherry_hop branch1 testBranch defectBranch
# cherry is another script containing....
# #!/usr/bin/env zsh