Skip to content

Instantly share code, notes, and snippets.

View grahamcrowell's full-sized avatar

Graham Crowell grahamcrowell

  • Toronto ON Canada
View GitHub Profile
@grahamcrowell
grahamcrowell / README.md
Created July 14, 2022 23:40
Dev Env Setup

Prerequisites

Dual boot Ubuntu

Steps

utilities

sudo apt update
@grahamcrowell
grahamcrowell / Tree.java
Created June 4, 2020 23:24
Java Hierarchy Fluent Builder
package org.foo;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class Node {
@grahamcrowell
grahamcrowell / tmux.conf
Created February 7, 2020 01:49
tmux config
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf \; display-message "Configuration reloaded"
# act like vim
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
@grahamcrowell
grahamcrowell / custom.postfixTemplates.txt
Last active August 31, 2019 05:58
Postfix Template Pycharm python
.print : Print something
ANY → print(f"$expr$={repr($expr$)}")
.debug : log with debug
ANY → $END$.debug(f"$expr$={repr($expr$)}")
.info : log with info
ANY → $END$.info(f"$expr$={repr($expr$)}")
.error : log with error
@grahamcrowell
grahamcrowell / ETL_testing.md
Last active September 7, 2018 15:24
ETL Testing

ETL Testing Framework

Goals

  • fail early
  • automated
  • reproducible
  • quantifiable coverage
  • quantify data accuracy and completeness
  • readible and accessable results
@grahamcrowell
grahamcrowell / .gitignore
Last active June 6, 2018 02:22
ubuntu development environment bootstrap script
.vscode
@grahamcrowell
grahamcrowell / colorlog.py
Last active March 1, 2024 05:29
python snippet for coloured logging
def config_color_logging():
"""Configure and return a colored console logger.
see https://github.com/borntyping/python-colorlog#usage
see https://docs.python.org/3/library/logging.html#logrecord-attributes
:return: logger
"""
import colorlog
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@grahamcrowell
grahamcrowell / readme.md
Last active April 29, 2018 02:41
Intro to pipenv

Intro to pipenv

How To

Initialize a new project

  • open vscode in the root of the project
  • open terminal in vscode
  • type pipenv shell
@grahamcrowell
grahamcrowell / gdiff.md
Last active March 29, 2018 05:08
Graph data structure diff