Skip to content

Instantly share code, notes, and snippets.

Avatar
🏆
Helping others find happiness and serenity

Colin Dean colindean

🏆
Helping others find happiness and serenity
View GitHub Profile
@colindean
colindean / README.md
Last active Dec 10, 2020 — forked from patik/osx-special-chars.ahk
AutoHotKey stuff
View README.md

macOS-like Hotkeys for Windows

See fork history for where this came from and note that I have no idea what I'm doing.

@colindean
colindean / CirceMapDecoder.scala
Created Aug 25, 2020
A Map[String, String] decoder for Circe
View CirceMapDecoder.scala
// warning: barely tested
import io.circe.Decoder.Result
import io.circe._
import io.circe.generic.extras._
object CirceMapDecoder {
type KeyVal = Map[String, String]
// using the expansion may be necessary for Circe to detect it correctly
@colindean
colindean / functional_fizzbuzz.sc
Created Jun 9, 2020
A functional, rules-based Fizzbuzz in Scala
View functional_fizzbuzz.sc
// functional, rules-based fizzbuzz
// inspired heavily by http://boston.conman.org/2020/06/08.1
def fizzbuzz(num: Int): String = {
def ifElse(matchNum: Int, ifMatch: String, otherwise: String => String): String => String = {
if (num % matchNum == 0) {
_ => ifMatch + otherwise("")
} else {
otherwise
}
}
@colindean
colindean / log.txt
Created May 12, 2020
obs-mac-virtualcam failure
View log.txt
Process: obs [80405]
Path: /Applications/OBS.app/Contents/MacOS/obs
Identifier: com.obsproject.obs-studio
Version: 25.0.8 (25.0.8)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: obs [80405]
User ID: 585895689
Date/Time: 2020-05-12 17:29:49.272 -0400
@colindean
colindean / Makefile
Last active Oct 14, 2019
Generic base Makefile for a directory with Graphviz dot files to generate PNG and SVG
View Makefile
# reusable Graphviz dot -> (PNG,SVG) makefile
DOT=dot
PNGCRUSH=pngcrush
SVGO=svgo
DOTS=$(wildcard *.dot)
PNGS=$(DOTS:.dot=.png)
SVGS=$(DOTS:.dot=.svg)
diagrams: $(PNGS) $(SVGS)
@colindean
colindean / abstractions2016cfpgraph.rb
Last active Feb 5, 2019
Abstractions 2016 CFP submission graph
View abstractions2016cfpgraph.rb
#!/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 Sep 25, 2018
An attempt at an ExecuteGroovyScript to fill in for ListDatabaseTables until NIFI-5519 is implemented
View ListDatabaseTablesWithLookup.groovy
/********
* 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 Mar 10, 2018
Git user.email mass changer
View change_emails.bash
#!/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"
View codemash_2018_schedule.md
@colindean
colindean / getquote-coinmarketcap.sh
Created Dec 13, 2017
ledger price database "getquote" tool for cryptocurrencies using coinmarketcap
View getquote-coinmarketcap.sh
#!/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
You can’t perform that action at this time.