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 / .gitignore
Last active Jul 2, 2021
MOVED TO https://github.com/colindean/wilkinsburg_pittsburgh_merger_analysis! -> Heat Map Chart reflecting percent change in municipal and school tax if Wilkinsburg and Pittsburgh merge (WORK IN PROGRESS)
View .gitignore
*.png
*.svg
*.idx
wilkinsburg*.csv
assessments.csv
@colindean
colindean / interviews2019.rb
Created Jun 14, 2021
Some things I did for an interview once
View interviews2019.rb
# require "rspec/autorun"
# require "minitest/autorun"
# You're running a pool of servers where the servers are numbered sequentially starting from 1. Over time, any given server might explode, in which case its server number is made available for reuse. When a new server is launched, it should be given the lowest available number.
# Write a function which, given the list of currently allocated server numbers, returns the number of the next server to allocate.
# For example:
# >> next_server_number([5, 3, 1])
@colindean
colindean / Brewfile
Created Apr 1, 2021
A Pythonic Makefile, Brewfile, and Poetry config
View Brewfile
# basic build tool, get the latest version
# if you want to ensure use, use 'gmake' instead on macOS
# or follow caveats in `brew info make` to make make brew's make
brew 'make'
# python version and environment management
brew 'pyenv'
# python dependency manager
# a version from pypi instead of homebrew may be installed when running make deps
brew 'poetry'
@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+.
*