Skip to content

Instantly share code, notes, and snippets.

@lummie
lummie / generic_channel.go
Created April 27, 2017 07:47
Go Example - Channel that can receive any type
package main
import (
"log"
"reflect"
)
/*
This is an example of a channel that can receive any data type, e.g. different struct types
@lummie
lummie / GoSublime.sublime-settings
Created November 30, 2015 11:55
GoSublime User settings for build / test on Save
{
"on_save": [{
"cmd": "gs9o_run_many", "args": {
"commands":[
["clear"],
["sh", "if [ -f onsave.sh ]; then ./onsave.sh; else gofmt -s -w ./ && go build . errors && go test -i && go test && go vet && golint ; fi"]
],
"focus_view": false
}
}],
@lummie
lummie / create-ca-bundle.sh
Created November 20, 2015 15:53
SUSE Enterprise linux create a ca-bundle.pem from the certificates in /etc/ssl/certs
#!/bin/bash
if [ -f /etc/ssl/ca-bundle.pem ]
then
mv /etc/ssl/ca-bundle.pem /etc/ssl/ca-bundle.pem.old
fi
find /etc/ssl/certs -maxdepth 1 -type f -exec cat {} \; >> /etc/ssl/ca-bundle.pem