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
josephholsten / fib.js
Created Jul 21, 2017
Fibonacci for Webtask.io
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(context.data.q)
switch (x) {
case 0:
@josephholsten
josephholsten / fasd-fzf.sh
Last active Jun 21, 2017
fasd with fzf for interactive selection
View fasd-fzf.sh
# same default aliases as fasd, but with fzf(1) for interactive selection
# fzf(1)
export FZF_DEFAULT_COMMAND='ag -g ""'
FZF_PATH="/usr/local/opt/fzf"
if [ -f "$COMPLETION_PATH" ]; then
source "$FZF_PATH/shell/completion.bash"
source "$FZF_PATH/shell/key-bindings.bash"
fi
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('this.attribute.here')
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)
else
default
View keybase.md

Keybase proof

I hereby claim:

  • I am josephholsten on github.
  • I am josephholsten (https://keybase.io/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
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
README.md
scripts/bootstrap
_shared/cloud-init-template.sh
common_variables.tf.json
modules/reporting_hadoop/gateway.tf.json
modules/reporting_hadoop/main.tf.json
modules/reporting_hadoop/manager.tf.json
modules/reporting_hadoop/master.tf.json
modules/reporting_hadoop/slaves.tf.json
You can’t perform that action at this time.