Skip to content

Instantly share code, notes, and snippets.

View calmh's full-sized avatar
:bowtie:
I may be slow to respond.

Jakob Borg calmh

:bowtie:
I may be slow to respond.
View GitHub Profile
jb@zlogin5:~/s/g/i/telegraf $ make
go get github.com/sparrc/gdm
gdm restore
======= Go Dependency Manager =======
= working dir: /home/jb/src/github.com/influxdata/telegraf
= GOPATH: /home/jb
=====================================
> Restoring /home/jb/src/git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.golang.git to 617c801af238c3af2d9e72c5d4a0f02edad03ce5
> Restoring /home/jb/src/github.com/Shopify/sarama to 8aadb476e66ca998f2f6bb3c993e9a2daa3666b9
> Restoring /home/jb/src/github.com/Sirupsen/logrus to 219c8cb75c258c552e999735be6df753ffc7afdc
@calmh
calmh / Outage.md
Last active April 21, 2023 17:13
Outage report

Outage Report

So we had an outage on a couple of things. The reason was that those things live on a server of mine hosted at a place, and there was a fiber cut to that place. However it could, for the same effect, equally well have been a failure of the server hardware or the firewall that protects it. Most of the things living on that server are quite non essential:

  • The forum. I'm sad when it's down because I enjoy it, but in the end no one gets hurt and files are still synchronized all over the world.
  • The website. We make a less than optimal impression with it down, but again it's a minor inconvenience.
  • One of the three discovery servers. The discovery service is redundant for this reason, so no worry.
  • The build server. Hampers development, prevents doing an actual release in the proper way while it's unreachable. We get by.
  • The usage reporting server. We get a blip in the usage reports while it's down but that's all.
jb@syno:/V/R/test $ ../bin/syncthing -version
syncthing v0.13.0-beta.0+74-g764e3f0 "Copper Cockroach" (go1.5.2 darwin-amd64) jb@syno 2016-02-03 07:58:14 UTC
jb@syno:/V/R/test $ go test -v -tags "integration benchmark" -run e2G
=== RUN TestBenchmarkTransferLargeFile2G
2016/02/04 00:40:41 Cleaning...
2016/02/04 00:40:41 Generating files...
2016/02/04 00:40:45 Total 2048.0 MiB in 1 files
2016/02/04 00:40:45 Starting instance 1...
2016/02/04 00:40:57 Starting instance 2...
2016/02/04 00:40:58 {9 2016-02-04 00:40:58.229436178 +0100 CET StateChanged map[to:scanning folder:default from:idle]}
#!/bin/bash
set -euo pipefail
src=$1
dst=$2
tags=$(GIT_DIR="$1/.git" git tag | grep -E '^v\d+\.\d+\.\d+$')
for tag in $tags ; do
date=$(GIT_DIR="$1/.git" git log --pretty=format:%aI -n1 "$tag")
if ! GIT_DIR="$2/.git" git rev-parse -q --verify $tag >/dev/null ; then
@calmh
calmh / -
Created December 17, 2015 12:03
root@ddceb8b7-3834-4af2-92d1-bb8f1f129645:~# ps auxwf
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 80766 0.0 0.3 6852 3544 ? Ss 05:02 0:00 /bin/login -h zone:global -f
root 80929 0.0 0.4 8788 4380 ? S 05:02 0:00 \_ -bash
root 81180 0.0 0.2 6928 2580 ? R 05:03 0:00 \_ ps auxwf
root 1 0.0 0.3 6428 3788 ? S 05:02 0:00 init
16 80742 0.0 0.2 4028 2768 ? Ssl 05:02 0:00 ipmgmtd
root 80854 0.0 0.1 5268 1792 ? S 05:02 0:00 upstart-udev-bridge --daemon
root 80860 0.0 0.2 11968 2576 ? Ss 05:02 0:00 /lib/systemd/systemd-udevd --daemon
message+ 80943 0.0 0.2 6608 2440 ? Ss 05:02 0:00 dbus-daemon --system --fork
package main
import (
"fmt"
"runtime"
"time"
)
func main() {
// One million slices
@calmh
calmh / compiled with -N -S
Created November 4, 2015 20:47
builds with go version devel +3bc0601 Tue Oct 20 03:16:09 2015 +0000 darwin/amd64 of syncthing v0.12.0-rc6-13-g9df7019
"".(*Model).Completion t=1 size=2032 value=0 args=0x40 locals=0x190
0x0000 00000 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) TEXT "".(*Model).Completion(SB), $400-64
0x0000 00000 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) MOVQ (TLS), CX
0x0009 00009 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) LEAQ -272(SP), AX
0x0011 00017 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) CMPQ AX, 16(CX)
0x0015 00021 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) JLS 2018
0x001b 00027 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) SUBQ $400, SP
0x0022 00034 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) FUNCDATA $0, gclocals·621c01eb3bfd828ed6dddd720d7e58a0(SB)
0x0022 00034 (/Users/jb/src/github.com/syncthing/syncthing/lib/model/model.go:330) FUNCDATA $1, gclocals·323c374e00803fa8bd43cb2b623a955c(SB)
0x0022 00034 (/Users/jb/src/github.com/syncthing/syn
@calmh
calmh / -
Created November 3, 2015 18:06
[root@relays ~]# pkgin up -y
reading local summary...
processing local summary...
pkg_info: cannot read meta data file +CONTENTS of package solaris_amd64: No such file or directory
processing remote summary (http://pkgsrc.joyent.com/packages/SmartOS/2014Q4/x86_64/All)...
pkg_summary.bz2 100% 2110KB 703.3KB/s 125.9KB/s 00:03
[root@relays ~]# pkgin in nginx
calculating dependencies... done.
nothing to upgrade.
@calmh
calmh / http_proxy.txt
Last active October 15, 2015 01:34
proxy traces
jb@syno:~/src/github.com/syncthing/syncthing git:(master) $ git checkout syncthing/pr/2375
Note: checking out 'syncthing/pr/2375'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
@calmh
calmh / -
Created September 26, 2015 11:22
jb@syno:~/src/github.com/AudriusButkevicius/gohashcompare git:(master 1↑) 1M 7A $ go run main.go
Build: go1.5.1 darwin-amd64
testing: warning: no tests to run
PASS
SHA256-8 5000 731164 ns/op 179.26 MB/s 32 B/op 1 allocs/op
SHAKE256-8 5000 598993 ns/op 218.82 MB/s 64 B/op 1 allocs/op
FNV64-8 10000 213811 ns/op 613.03 MB/s 16 B/op 1 allocs/op
murmur3-128-8 100000 30360 ns/op 4317.24 MB/s 16 B/op 1 allocs/op
jb@syno:~/src/github.com/AudriusButkevicius/gohashcompare git:(master 1↑) 1M 7A $