Skip to content

Instantly share code, notes, and snippets.

View jaegerpicker's full-sized avatar

Shawn Campbell jaegerpicker

View GitHub Profile
#!/usr/bin/env ruby
require 'json'
require 'net/http'
challenge_result = nil
uri = URI('http://letsrevolutionizetesting.com/challenge.json')
loop do
res = Net::HTTP.get_response(uri)
challenge = JSON.parse(res.body)
if challenge.has_key?("follow")
#!/usr/bin/env ruby
# This will get a list of all the repos in an org, check if you have it cloned and if not it will clone it via ssh.
# Then it loops over the git repos in the dir and then it switches to the master branch (configuable)
# then does a `git pull --all`
require 'github_api' # gem install github_api
code_path = '' # Directory to clone all repos to
branch = 'master'
github = Github.new oauth_token: '' # Create a github OAuth token and paste it in here, DON'T reuse one, create a new one
response = github.repos.list org: '' # Org name goes here

Keybase proof

I hereby claim:

  • I am jaegerpicker on github.
  • I am jaegerpicker (https://keybase.io/jaegerpicker) on keybase.
  • I have a public key ASCIL2-4RyAZFmx5EXry_GQLnRNj7NGkKRk7d_Ei7b63jwo

To claim this, I am signing this object:

@jaegerpicker
jaegerpicker / update-rvm-rubygems.sh
Last active August 30, 2017 14:05 — forked from cschiewek/update-asdf-rubygems.sh
Update Rubygems for all rbenv rubies
#! /usr/bin/env bash --login
set -e
for version in `rvm list strings`; do
rvm use "$version"
echo "Updating rubygems for $version"
gem update --system --no-document --quiet
echo ""
done
#!/usr/bin/python3
import numbers
def find_consecutive_runs(list):
ret_list = []
list_len = len(list) - 1
for i, x in enumerate(list):
if list_len >= i + 2 and isinstance(x, numbers.Number):
if x + 1 == list[i + 1] and x + 2 == list[i + 2]:
@jaegerpicker
jaegerpicker / PatternMatchingElixirArrayFlatten
Created October 13, 2016 03:10
An example of TDD to flatten nested arrays using pattern matching, an accumulator, and recursion. Of course in production you'd just use :lists.flatten.
ExUnit.start
defmodule Jaegerpicker.Flatten do
# This uses pattern matching to pass and handle recursive functions, using an accumlator to produce
# the needed nexted array
def flatten_arr(arr) do
flatten_arr(arr, [])
end
def flatten_arr(1) do
flatten_arr(1, [])
@jaegerpicker
jaegerpicker / coverage_server.js
Created September 24, 2014 13:55
A istanbul coverage server for the testem test runner.
#!/usr/bin/env node
var http = require('http');
var connect = require('connect');
var concat = require('concat-stream');
var util = require('util');
var fs = require('fs');
var istanbul = require('istanbul');
var stdio = require('stdio');
var collector = new istanbul.Collector();
////////////////////////////////////////////////
//
// Swift and Objective-C Class Parsing
//
////////////////////////////////////////////////
import Foundation
// Class parsing

JSConf Slides, Codes and Notes

These are all the JSConf 2014 slides, codes, and notes I was able to cull together from twitter. Thanks to the speakers who posted them and thanks to @chantastic for posting his wonderful notes.

Modular frontend with NPM - Jake Verbaten (@Raynos)

@jaegerpicker
jaegerpicker / keybase.md
Last active August 29, 2015 13:59
Keybase.io github proof

Keybase proof

I hereby claim:

  • I am jaegerpicker on github.
  • I am jaegerpicker (https://keybase.io/jaegerpicker) on keybase.
  • I have a public key whose fingerprint is C175 40CE F73B 7C25 05C8 86C4 3749 ED58 F0A9 12B4

To claim this, I am signing this object: