Skip to content

Instantly share code, notes, and snippets.

Joseph Anthony Pasquale Holsten josephholsten

Block or report user

Report or block josephholsten

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
josephholsten / fib.js
Created Jul 21, 2017
Fibonacci for
View fib.js
var request = require('request')
// Fib takes an integer from the query param q, recursively calculates the fibonacci function and returns its value
var Fib = function (context, callback) {
// apiURI should be set to the URI for this webtask
var api = context.secrets.apiURI
// fib(x) is provided by the query param "q"
var x = parseInt(
switch (x) {
case 0:
josephholsten /
Last active Jun 21, 2017
fasd with fzf for interactive selection
# same default aliases as fasd, but with fzf(1) for interactive selection
# fzf(1)
export FZF_DEFAULT_COMMAND='ag -g ""'
if [ -f "$COMPLETION_PATH" ]; then
source "$FZF_PATH/shell/completion.bash"
source "$FZF_PATH/shell/key-bindings.bash"
View gist:a0b41dd718f753249608ca15fc587296
class Chef::Node
# dig takes a node or databag and traverses through node/hash attributes according to the provided path
# databagitem.dig('')
def dig(path, default=nil)
# works fine in chef 10
path.split(".").inject(self) do |l,k|
if l.respond_to?(:keys)
(l.to_hash[k] || l.to_hash[k.to_sym] || default)

Keybase proof

I hereby claim:

  • I am josephholsten on github.
  • I am josephholsten ( on keybase.
  • I have a public key whose fingerprint is 7E72 3E2A 5F1F 457B 74F4 D581 6E32 20D0 113E F38D

To claim this, I am signing this object:

josephholsten / check-http-json.rb
Created Jan 4, 2016
Simplest HTTP+JSON sensu plugin
View check-http-json.rb
#! /usr/bin/env ruby
# check-simple-http-json - show how to check a url, grab its json, and
require 'sensu-plugin/check/cli'
require 'json'
require 'net/http'
require 'uri'
class CheckSimpleHttpJson < Sensu::Plugin::Check::CLI
option :url,
View gist:cea0f01d9d571065c5b8
You can’t perform that action at this time.