Skip to content

Instantly share code, notes, and snippets.

View duckbrain's full-sized avatar

Jonathan Duck duckbrain

View GitHub Profile
@duckbrain
duckbrain / test.go
Created June 22, 2016 15:29
Example of callbacks for andlabs/ui.Area
package main
import "github.com/andlabs/ui"
type AreaCallbacks struct {
onDraw func(a *ui.Area, dp *ui.AreaDrawParams)
onMouseEvent func(a *ui.Area, me *ui.AreaMouseEvent)
onMouseCrossed func(a *ui.Area, left bool)
onDragBroken func(a *ui.Area)
onKeyEvent func(a *ui.Area, ke *ui.AreaKeyEvent) (handled bool)
@duckbrain
duckbrain / journalizer.js
Created August 12, 2016 19:16
A quick script I used to convert my Red Notebook data files to plain Markdown (needs changes to apply elsewhere)
#!/usr/bin/node
const Promise = require('bluebird');
const fs = Promise.promisifyAll(require('fs'));
const moment = require('moment');
const YAML = require('yamljs');
let today = moment();
function readJournal(dir, date) {

Keybase proof

I hereby claim:

  • I am duckbrain on github.
  • I am duckbrain (https://keybase.io/duckbrain) on keybase.
  • I have a public key whose fingerprint is FD9E 1750 08AD 2560 4898 7351 A9DF 5988 8FBD AAB0

To claim this, I am signing this object:

@duckbrain
duckbrain / gogs.aur.patch
Created February 17, 2017 14:43
Patch to update the gogs AUR to 0.9.141
diff --git a/.SRCINFO b/.SRCINFO
index d87854e..7bdd84d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,6 @@
-# Generated by mksrcinfo v8
-# Wed Dec 28 07:40:24 UTC 2016
pkgbase = gogs
pkgdesc = Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.
- pkgver = 0.9.113