Skip to content

Instantly share code, notes, and snippets.

$ /tmp/docker-machine -D create -d virtualbox -virtualbox-disk-size 50000 --virtualbox-memory 2048 dev
[terminal truncated]
[--product <string>] (null)
[--remote yes|no] (null, VM filters only)
[--serialnumber <string>] (null)
[--maskedinterfaces <XXXXXXXX>]
usbfilter modify <index,0-N>
--target <uuid|vmname>|global
[--name <string>]
kalbasit@cratos ~/code/src/github.com/gmuch/gmuch [master] ± % glide tree
github.com/gmuch/gmuch
github.com/gmuch/gmuch/model (/Users/kalbasit/code/src/github.com/gmuch/gmuch/model)
github.com/gmuch/gmuch/server (/Users/kalbasit/code/src/github.com/gmuch/gmuch/server)
github.com/gmuch/gmuch/model (/Users/kalbasit/code/src/github.com/gmuch/gmuch/model)
github.com/go-kit/kit/log (/Users/kalbasit/code/src/github.com/gmuch/gmuch/vendor/github.com/go-kit/kit/log)
gopkg.in/logfmt.v0 (/Users/kalbasit/code/src/github.com/gmuch/gmuch/vendor/gopkg.in/logfmt.v0)
gopkg.in/stack.v1 (/Users/kalbasit/code/src/github.com/gmuch/gmuch/vendor/gopkg.in/stack.v1)
github.com/go-kit/kit/endpoint (/Users/kalbasit/code/src/github.com/gmuch/gmuch/vendor/github.com/go-kit/kit/endpoint)
golang.org/x/net/context (/Users/kalbasit/code/src/github.com/gmuch/gmuch/vendor/golang.org/x/net/context)
kalbasit@cratos ~/code/src/github.com/gmuch/gmuch [master] ± % glide pin
package: github.com/gmuch/gmuch
import:
- package: gopkg.in/logfmt.v0
ref: c50dc9aa845e681529d8e49d3dc11ec0195aacac
- package: gopkg.in/stack.v1
ref: 0585967eab0016c8e4e2d55ac20585b469574cec
- package: golang.org/x/net
ref: c2528b2dd8352441850638a8bb678c2ad056fd3e
- package: github.com/zenhack/go.notmuch
kalbasit@cratos ~/code/src/github.com/zenhack/go.notmuch [finish_message *] ± % make test
=== RUN TestOpenNotFound
Error opening database at /not-found/.notmuch: No such file or directory
--- PASS: TestOpenNotFound (0.00s)
=== RUN TestCreate
--- PASS: TestCreate (0.02s)
=== RUN TestOpen
--- PASS: TestOpen (0.00s)
=== RUN TestLastStatus
--- PASS: TestLastStatus (0.00s)
kalbasit@cratos ~/code/src/github.com/gmuch/gmuch [master *] ± % go run cmd/gmuch/main.go --db-path=/Users/kalbasit/.mail
listen=:7080 caller=main.go:72 msg=HTTP addr=:7080
listen=:7080 caller=log.go:43 method=thread id=0000000000020ab3 took=30.917227ms
listen=:7080 caller=log.go:26 method=query query=tag:inbox offset=0 limit=100 took=483.272983ms
listen=:7080 caller=log.go:43 method=thread id=0000000000020c5c took=22.619513ms
SIGABRT: abort
PC=0x7fff9589a0ae m=7
signal arrived during cgo execution
goroutine 19 [syscall, locked to thread]:
@kalbasit
kalbasit / CGO.md
Created October 2, 2015 05:54 — forked from dwbuiten/CGO.md

Problems & Solutions for Interaction Between C and Go

At Vimeo, on the transcoding team, we work a lot with Go, and a lot with C, for various tasks such as media ingest. This means we use CGO quite extensively, and consequently, have run into bits that are perhaps not very well documented, if at all. Below is my effort to document some of the problems we've run into, and how we fixed or worked around them.

Many of these are obviously wrong in retrospect, but hindsight is 20/20, and these problems do exist in many codebases currently.

Some are definitely ugly, and I much welcome better solutions! Tweet me at @daemon404 if you have any, or have your own CGO story/tips, please! I'd love to learn of them.

Table of Contents

@kalbasit
kalbasit / main.go
Last active October 19, 2015 17:52
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"regexp"
"time"
@kalbasit
kalbasit / photo-station-custom-domain.patch
Last active July 20, 2021 17:58
DSM Allow custom domain for Photo Station
diff --git a/usr/syno/share/nginx/Photo.mustache b/usr/syno/share/nginx/Photo.mustache
new file mode 100644
index 0000000..54043ff
--- /dev/null
+++ b/usr/syno/share/nginx/Photo.mustache
@@ -0,0 +1,19 @@
+server {
+ listen 80;
+ listen [::]:80;
+ listen 443 ssl;
@kalbasit
kalbasit / .cvimrc
Last active March 9, 2017 08:34
kalbasit's cvimrc
"""""""""""""""""""
" Settings
let mapleader = ","
let barposition = "top"
let hintcharacters = "arstneio"
let completionengines = ["google", "google-image", "amazon", "imdb", "youtube"]
" blacklists prefixed by '@' act as a whitelist
let blacklists = ["https://inbox.google.com/*", "https://mail.google.com/*", "https://kapollo.us.quickconnect.to/*", "https://apollo.nasreddine.com:56902/*"]
let searchalias g = "google" " Create a shortcut for search engines.
@kalbasit
kalbasit / debug info
Last active July 8, 2018 09:04
Nginx Reverse Proxy
$ docker --version
Docker version 1.11.1, build 5604cbe
$ uname -a
Linux hermes 4.5.1-1-ARCH #1 SMP PREEMPT Thu Apr 14 19:19:32 CEST 2016 x86_64 GNU/Linux
$ cat /etc/os-release
NAME="Arch Linux"
ID=arch
PRETTY_NAME="Arch Linux"
ANSI_COLOR="0;36"
HOME_URL="https://www.archlinux.org/"