Skip to content

Instantly share code, notes, and snippets.

Enjoying the summer

Daniel Compton danielcompton

Enjoying the summer
Block or report user

Report or block danielcompton

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
danielcompton / gist:6724333
Created Sep 27, 2013
Excel formula for calculating NZ tax paid on annual income.
View gist:6724333
View SketchSystems.spec
billing_success -> Active
billing_failed -> Past Due
cancel -> Cancelled
billing_success -> Active
billing_failed -> Past Due
cancel -> Cancelled
Past Due
danielcompton / Clojure 1.10.0-beta5 stack trace
Last active Nov 8, 2018
Stack traces in Clojure 1.9 and Clojure 1.10 when you have compile errors in your user namespace
View Clojure 1.10.0-beta5 stack trace
$ lein test
Exception in thread "main" java.lang.ExceptionInInitializerError
at clojure.main.<clinit>(
Tests failed.
danielcompton /
Created Mar 14, 2012
Shell script to convert hex encoded XML to cleanly formatted XML
#! /bin/sh
xxd -revert -plain $1 > /tmp/hexmltemp.xml
xmllint --format /tmp/hexmltemp.xml > $1
danielcompton / gist:5582392
Last active Jun 5, 2018
List directory with up to 8 million files. Script taken from Download the file, compile it: gcc listdir.c -o listdir And use it like this: ./listdir [target dir] > target-ls.txt
View gist:5582392
#define _GNU_SOURCE
#include <dirent.h>
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#define handle_error(msg) \
danielcompton / backblaze.crash
Created Jan 7, 2018
Backblaze crash when opening Exclusions panel
View backblaze.crash
Process: System Preferences [767]
Path: /Applications/System Preferences
Version: 14.0 (14.0)
Build Info: SystemPrefsApp-360000000000000~1
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: System Preferences [767]
User ID: 503
danielcompton / ext.clj
Last active Mar 12, 2018
Extended attributes in Clojure
View ext.clj
(defn supports-extended-attributes?
"Not all filesystems suport Java's UserDefinedFileAttributes (a.k.a. extended attributes),
notably HFS+ and APFS on macOS.
Waiting for to add macOS support."
[^Path path]
(Files/getFileStore path)
^Class UserDefinedFileAttributeView))
danielcompton /
Created Dec 12, 2017
GCP and DNSimple dual DNS records with Terraform
module "deps_dns_app_v6" {
source = "../modules/dns_record"
name = "app"
type = "AAAA"
value = "${google_compute_global_address.deps-ipv6.address}"
module "deps_return_path" {
source = "../modules/dns_record"
name = "return-path"
danielcompton / gist:9719633
Created Mar 23, 2014
Data Science Learning
View gist:9719633
- [ ] Math
- [ ] Linear Algebra
- [ ] Lay - Linear Algebra
- [ ] 18.06 Linear Algebra
- [ ] Burke Lecture Notes
- [ ] Coding The Matrix
- [ ] Quantifying Uncertainty
danielcompton / .block
Last active Nov 14, 2016
re-frame trace
View .block
license: mit
border: yes
scrolling: no
You can’t perform that action at this time.