Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dustMason
dustMason / time.go
Created August 18, 2022 21:56
Parse internal go time.Time wall
package main
import (
"fmt"
"time"
)
const (
secondsPerMinute = 60
secondsPerHour = 60 * secondsPerMinute
@dustMason
dustMason / todo.md
Created November 17, 2021 17:21
Todo List
  • bike about
  • synth jam
  • play an rpg
  • just hang out
  • make weird things
  • eat a pizza
  • make pupusas
  • leave alameda
  • throw bottles on the rocks
  • yank tablecloths from tables full of vases
@dustMason
dustMason / gray.go
Last active December 31, 2019 07:10
Gray Codes
package main
import (
"fmt"
"math"
)
func main() {
fmt.Printf("%010b", gray(10))
}
require 'rubygems'
require 'gpx'
require 'httparty'
require 'pstore'
class Api
include HTTParty
base_uri 'https://atlas-obscura-api.herokuapp.com'
CACHE = PStore.new("cache.pstore")
@dustMason
dustMason / makefile
Created December 7, 2018 06:29
Makefail
.PHONY .NOTPARALLEL : B K F I T U R Z N S X Y L J G W A H Q M P V O D E C
A : W
@echo "A"
A : U
@echo "A"
A : J
@echo "A"
@dustMason
dustMason / svgreader.js
Last active October 3, 2018 05:40
SVG Tools
/**
SVG parser for the Lasersaur.
Converts SVG DOM to a flat collection of paths.
Copyright (c) 2011 Nortd Labs
Open Source by the terms of the Gnu Public License (GPL3) or higher.
Code inspired by cake.js, canvg.js, svg2obj.py, and Squirtle.
Thank you for open sourcing your work!
Sarah, Alice, John, Bob
Sarah -400
---
Sarah -300
Alice 100
John 100
Bob 100
John -100
require 'io/console'
class Game
attr_reader :playing
def initialize
@width = 50
@height = 30
@board = [].tap { |s| @width.times { |x| @height.times { |y| s << [x, y] } } }
@snake = []
require 'io/console'
class Game
attr_reader :playing
def initialize
@width = 50
@height = 30
@snake = []
@score = 0
https://gist.github.com/dustMason/487eabfa2cafd2e2b0c4814903c21772