Skip to content

Instantly share code, notes, and snippets.

@dustmop
dustmop / gist:307b903b20e892ac7ee93d59c5d1102b
Created July 10, 2025 14:20
Gorilla mux can call handler based upon http method
package main
import (
"fmt"
"io"
"log"
"net/http"
"github.com/gorilla/mux"
)
package main
import (
"fmt"
)
func runFunctionThisDoesntWork(willItSucceed bool) {
rollback := func() {
fmt.Printf("rolling back...\n")
}
package main
import (
"fmt"
)
func doImportantWork() func() {
var rollback func()
rollback = func() {
defer func() {
@dustmop
dustmop / gist:865f0c4d8d7ec8b025e3
Last active August 29, 2015 14:02
FamiTone2 restrictions, taken from readme.txt - by Shiru - http://shiru.untergrund.net/code.shtml
How to create music
You can create music in FamiTracker version 0.3.6 or above, or with
Musetracker. The music should met these requirements:
- Allowed notes are C-1..D-6, Note Cut (rest note)
- Only Volume, Arpeggio, and Pitch sequences (no Pitch for noise
channel) supported
- Pitch envelope accumulate the offset at conversion time only, thus
@dustmop
dustmop / keybase.md
Created March 5, 2014 17:33
Keybase proof

Keybase proof

I hereby claim:

  • I am dustmop on github.
  • I am dustmop (https://keybase.io/dustmop) on keybase.
  • I have a public key whose fingerprint is D20B A5B3 DD09 DCA1 F5EE C0B6 4E34 CD14 4F43 C95B

To claim this, I am signing this object: