Skip to content

Instantly share code, notes, and snippets.

@xogeny
xogeny / append2_test.go
Created January 27, 2015 18:12
A different append benchmark for Golang
package copy_vs_append
import (
"testing"
)
func buildArray(n int64) []int64 {
ret := make([]int64, n, n)
var i int64
for i = 0; i < n; i++ {

Codesys RPI HOWTO

This describes how you could configure your Raspberry PI to work, hopefully, better with Codesys.

Instructions

  • Based on raspbian image
@davidwindell
davidwindell / wercker.yml
Last active February 10, 2016 00:25
Build, test, cache and deploy docker images with wercker, quay.io and Elastic Beanstalk
box: wercker-labs/docker
build:
steps:
- script:
name: fix timestamps
code: |
sudo wget https://gist.githubusercontent.com/davidwindell/fbfef588c6295666c6a1/raw/c2870b13a50a7aeb4aed1e6eb4daec3a905a7fc0/git-timestamp.sh -O /usr/local/bin/git-timestamp
sudo chmod +x /usr/local/bin/git-timestamp
git-timestamp composer.json
git-timestamp composer.lock
@ChimeraCoder
ChimeraCoder / gist:8395008
Created January 13, 2014 05:00
Sample systemd script
[Unit]
Description=A phpbb-like bulletin board in Go
[Service]
ExecStart=/home/stevenleeg/go/bin/gobb
Restart=on-abort
[Install]
WantedBy=multi-user.target
@kisom
kisom / mydaemon
Created April 28, 2013 06:10
Sample Upstart and sysvinit script for Go daemons.
#! /bin/sh
### BEGIN INIT INFO
# Provides: mydaemon
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mydaemon does stuff
# Description: this is an actual executable script, and should be saved in
# /etc/init.d/mydaemon.