Skip to content

Instantly share code, notes, and snippets.

View colindean's full-sized avatar
🏆
Helping others find happiness and serenity

Colin Dean colindean

🏆
Helping others find happiness and serenity
View GitHub Profile
@colindean
colindean / abstractions2016cfpgraph.rb
Last active February 5, 2019 20:04
Abstractions 2016 CFP submission graph
#!/usr/bin/env ruby
q = [['2016-02-09', 0], ['2016-02-10', 23], ['2016-02-11', 3], ['2016-02-12', 11], ['2016-02-13', 3], ['2016-02-14', 7], ['2016-02-15', 6], ['2016-02-16', 7], ['2016-02-17', 0], ['2016-02-18', 7], ['2016-02-19', 1], ['2016-02-20', 2], ['2016-02-21', 0], ['2016-02-22', 8], ['2016-02-23', 11], ['2016-02-24', 4], ['2016-02-25', 3], ['2016-02-26', 4], ['2016-02-27', 0], ['2016-02-28', 4], ['2016-02-29', 9], ['2016-03-01', 3], ['2016-03-02', 4], ['2016-03-03', 5], ['2016-03-04', 6], ['2016-03-05', 6], ['2016-03-06', 2], ['2016-03-07', 16], ['2016-03-08', 7], ['2016-03-09', 5], ['2016-03-10', 3], ['2016-03-11', 6], ['2016-03-12', 0], ['2016-03-13', 1], ['2016-03-14', 2], ['2016-03-15', 0], ['2016-03-16', 4], ['2016-03-17', 6], ['2016-03-18', 5], ['2016-03-19', 7], ['2016-03-20', 6], ['2016-03-21', 0], ['2016-03-22', 7], ['2016-03-23', 8], ['2016-03-24', 6], ['2016-03-25', 8], ['2016-03-26', 7], ['2016-03-27', 6], ['2016-03-28', 18], ['2016-03-29', 12], ['2016-03-30', 24], ['2016-03-31', 50], ['2
@colindean
colindean / ListDatabaseTablesWithLookup.groovy
Last active September 25, 2018 23:46
An attempt at an ExecuteGroovyScript to fill in for ListDatabaseTables until NIFI-5519 is implemented
/********
* ListDatabaseTablesWithLookup
*
* by Colin Dean <colin.dean@arcadia.io>
*
* It it a cobbled-together attempt at implementing something to workaround
* ListDatabaseTables' inability to take incoming FlowFiles, which prevents
* that processor from using DBCPConnectionPoolLookup as its controller service
* instead of DBCPConnectionPool. This affects NiFi 1.7.0+.
*
@colindean
colindean / change_emails.bash
Created March 10, 2018 21:07
Git user.email mass changer
#!/usr/bin/env bash
# Did your company change its email domain?
# Use this handy script to change all of your git repos quickly and easily!
# Don't worry, it'll only the change the repos where user.email was set to the old one!
# Usage: change_emails.bash username old_domain new_domain
# Example: change_emails.bash maxine.mustermann boringdomain.com exciting.io
EMAIL_USER="$1"
@colindean
colindean / getquote-coinmarketcap.sh
Created December 13, 2017 06:16
ledger price database "getquote" tool for cryptocurrencies using coinmarketcap
#!/bin/bash
# by colindean
# unlicensed, public domain: https://unlicense.org
# invocation:
# getquote-coinmarketcap.sh crypto-transactions.ledger
#
# This tool may try to look up any commodity that is in the commodity list.
# I recommend tracking cryptocurrencies in a separate ledger file that is
@colindean
colindean / SEI_Issue_Classifcation_Quadrants.svg
Created November 7, 2017 21:40
SEI Issue Classification Quadrants
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@colindean
colindean / get_users_ordered_by_score.js
Last active October 18, 2017 22:14
Lobsters user list fun
// drop this into your console while on the users page
// https://lobste.rs/u
var pattern = /\((\d*)\)/;
var users_by_score_desc = Array.from(users).map(function(e){
var score_match = pattern.exec(e.children[0].nextSibling.textContent.trim());
var score = score_match === null ? NaN : parseInt(score[1]);
var name = e.children[0].getAttribute("name");
return {name: name, score: score }
}).sort(function(ths,that){
#!/usr/bin/env bash
# nodes.json has JSONP crap on it so you have to remove
# the first and last line of the file before parsing it as JSON.
curl http://www.pittmesh.net/node-data/nodes.json | tail -n +2 | sed '$d' | jq -s '.[] | { type: "FeatureCollection", features: [ .[] | {type: "Feature", id: .name, properties: { address, hood, status, device_count }, geometry: { type: "Point", coordinates: [ .lon, .lat] } } ] }'
@colindean
colindean / MonitorApi.scala
Last active August 12, 2017 19:10
Multiple errors on Scalatra startup when attempting to integrate Atmosphere
import org.json4s.{DefaultFormats, Formats}
import java.util.Date
import org.json4s.JsonDSL._
import org.json4s._
import org.scalatra._
import org.scalatra.atmosphere._
import org.scalatra.json.JValueResult
import org.scalatra.scalate.ScalateSupport
@colindean
colindean / Makefile
Created May 18, 2017 18:09
A workflow diagram for describing who is responsible for fixing problems in an office space
all:
dot -Tpng -o building-issue-workflow.png building-issue-workflow.dot