Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am MrSaints on github.
  • I am mrsaints ( on keybase.
  • I have a public key whose fingerprint is 23EB 5004 75C1 2A47 6D3E FE59 E45D 4BB2 8169 BA4F

To claim this, I am signing this object:

MrSaints / priority_tree.go
Created July 14, 2017 21:32
A radix trie inspired structure with priority queues.
package converter
import (
type ConverterPriorityQueueItem struct {
converter Converter
MrSaints / main.go
Created May 25, 2017 16:15
Coffee shop concurrency. Examining concurrency in the real world by scaling a coffee shop's efficiency.
package main
import (
const (
MrSaints / go-qthtml2pdf.go
Last active January 6, 2020 22:30
A basic HTML to PDF converter in Golang using Qt WebEngine 5.7. For a more production-ready converter, see:
package main
import (
go build -ldflags "-X =$(git rev-parse --short HEAD)"
MrSaints / command.go
Last active June 26, 2017 10:06
A wrapper around `exec.Command(...).Output()` to execute external commands / binaries with support for cancellation signals via channels (i.e. terminate the running process).
package main
import (
var (
ErrCmdCancelled = errors.New("command cancelled")
MrSaints / Docker Notes.txt
Last active May 16, 2017 11:11
Notes on initiating a Docker Machine; killing Docker processes; cleaning Docker containers, and images; and building / running / executing with Docker. Docker, Docker, Docker...
# You probably don't need this one with the new Docker for MacOS #
docker-start() {
docker-machine start ${1:-dev}
eval "$(docker-machine env ${1:-dev})"
export DOCKER_IP=$(docker-machine ip ${1:-dev})
echo The machine ip is DOCKER_IP=$DOCKER_IP
# These clean up commands are no longer necessary with `docker system prune`
MrSaints / WeeChat Notes.txt
Last active April 3, 2017 17:04
Notes on setting up, and joining a new IRC server on WeeChat using a SOCKS5 proxy.
/server add <name> <server>/<port>
/proxy add <proxy-slug> socks5 <proxy-host> <proxy-port> <proxy-user> <proxy-pass>
/set irc.server.<server-slug>.username <username>
/set irc.server.<server-slug>.realname <real-name>
/set irc.server.<server-slug>.nicks <nick1>, <nick2>, <nick3>
/set irc.server.<server-slug>.ssl on
/set irc.server.<server-slug>.ssl_verify off
MrSaints / triangle.exs
Created July 1, 2015 19:49
Pascal's triangle in Elixir (using recursion where possible).
# Author: MrSaints
# License: MIT
defmodule Factorial do
def recursive(n, acc) when n === 1 or n === 0 do
def recursive(n, acc) do
temp = n - 1
MrSaints / Package Control.sublime-settings
Last active August 29, 2015 14:10
Sublime Text Editor Backup
"Base16 Color Schemes",
"Better CoffeeScript",
"Gutter Color",