Skip to content

Instantly share code, notes, and snippets.

@dustin
dustin / zen_stories.org
Created January 27, 2011 08:08
101 Zen Stories in org-mode

A Cup of Tea

Nan-in, a Japanese master during the Meiji era (1868-1912), received a university professor who came to inquire about Zen.

Nan-in served tea. He poured his visitor’s cup full, and then kept on pouring.

The professor watched the overflow until he no longer could restrain himself. “It is overfull. No more will go in!”

@dustin
dustin / gist:3251445
Created August 3, 2012 20:55
Refining Health Insurance Plans
(let [plans '(
"BS-CA PPO 1500 CA"
"BS-CA PPO 700 CA"
"BS-CA HMO 20 CA"
"Kaiser HMO 30/Copay CA North"
"BS-CA PPO 500 CA"
"Kaiser HMO 30 CA North"
"BS-CA HMO 30 CA"
"BS-CA PPO 250 CA"
"Kaiser HMO 20 CA North"
@dustin
dustin / aoc.hsfiles
Last active December 1, 2021 02:16
Template for AoC
{-# START_FILE stack.yaml #-}
resolver: lts-18.18
packages:
- '.'
extra-deps:
- astar-0.3.0.0@sha256:8bf6350542e9db9451490e8993560ee843dc48a61d46a206985430f9b62461c8,967
- git: https://github.com/dustin/aoc.git
commit: 60b4a01f9c09863d16833bcd766daf8855281d26
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RecordWildCards #-}
module Main where
import Data.List (intercalate, sortOn)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import GHC.RTS.Events
import System.Environment (getArgs)
@dustin
dustin / Starlink.json
Created February 28, 2021 01:22
Starlink Dashboard
@dustin
dustin / Dockerfile
Last active February 7, 2021 17:07
How I built couchbase 2.2 for docker
FROM ubuntu
MAINTAINER Dustin Sallings "dustin@spy.net"
ADD http://cbfs-ext.hq.couchbase.com/couchbase-dist/couchbase-server-enterprise_2.2.0_x86_64.deb /tmp/couchbase-server-enterprise_2.2.0_x86_64.deb
RUN apt-get update
RUN apt-get install -y librtmp0 python-httplib2
RUN dpkg -i /tmp/couchbase-server-enterprise_2.2.0_x86_64.deb
RUN rm /tmp/couchbase-server-enterprise_2.2.0_x86_64.deb
RUN /etc/init.d/couchbase-server stop
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import Criterion (bench, bgroup, whnf)
import Criterion.Main (Benchmark)
import qualified Data.ByteString as BS
import Data.ByteString.Builder (toLazyByteString)
import Data.ByteString.Lazy (toStrict)
[profile]
layer_height = 0.2
wall_thickness = 1.2
retraction_enable = True
solid_layer_thickness = 0.9
fill_density = 15
print_speed = 40
print_temperature = 200
print_temperature2 = 0
print_temperature3 = 0
@dustin
dustin / sample-eventd-script-for-twisted
Created January 6, 2009 05:44
Sample upstart script for a twisted project.
# This is a sample script for upstart to keep a twisted project running.
# Place it in /etc/event.d/[projectname]
description "useful description"
author "Dustin Sallings <dustin@spy.net>"
start on runlevel 2
start on runlevel 3
stop on runlevel 0
@dustin
dustin / dps-box.stl
Created May 15, 2018 05:16
DPS Enclosure
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.