Skip to content

Instantly share code, notes, and snippets.


Lars Wiegman namsral

View GitHub Profile
namsral /
Last active Jun 26, 2019
Contrail DNS Method set to None
# and are public nameservers
# VM attached to virtual network `lars-net-2019-06`, see `contrail-subnet.json`
# Resolving works for the first and second given nameserver
% dig @ +short
% dig @ +short
# But only the second nameserver responds to TCP queries
namsral /
Last active Mar 18, 2019
contrail-vrouter-agent core dumps
warning: core file may not match specified executable file.
[New LWP 2336796]
[New LWP 2336695]
[New LWP 2337128]
[New LWP 2336792]
[New LWP 2336794]
[New LWP 2336799]
[New LWP 2336793]
[New LWP 2336797]
View contrail.make
# This Makefile deploys OpenContrail on Kubernetes
# Start with a Kubernetes cluster and run `make`on the master node.
all: clean patch build/values.yml build/contrail-docker helm
mkdir -p ./build
build/contrail-docker: build
git clone --depth=1 -b R4.0 ./build/contrail-docker
namsral /
Last active Nov 14, 2017
Running OpenContrail on Kubernetes with OpenStack-Helm
# kubectl get pods --all-namespaces -o wide |grep contrail
kube-system contrail-agent-b0lgc 0/1 CrashLoopBackOff 1 26s k8s-node2
kube-system contrail-agent-mqtqb 0/1 CrashLoopBackOff 1 26s k8s-node3
kube-system contrail-agent-wv64l 0/1 PodInitializing 0 26s k8s-node1
kube-system contrail-analytics-2kcw0 0/1 CrashLoopBackOff 2 27s k8s-node1
kube-system contrail-analyticsdb-v7kk5 0/1 CrashLoopBackOff 1 27s k8s-node1
kube-system contrail-controller-l5zhf 0/1 CrashLoopBackOff 1 26s k8s-node1
kube-system contrail-kube-manager-v6dbx 0/1 CrashLoopBackOff 1 26s k8s-node1

Keybase proof

I hereby claim:

  • I am namsral on github.
  • I am namsral ( on keybase.
  • I have a public key ASCgpD3lowV8y1LOOsihBEmW089Dl-vTPn8jAe2G02ekgQo

To claim this, I am signing this object:

View mach_absolute_time.s
// Source from the xnu kernel used in macOS
// source
.globl _mach_absolute_time
pushq %rbp // set up a frame for backtraces
movq %rsp,%rbp
movl _NT_GENERATION(%rsi),%r8d // get generation
testl %r8d,%r8d // if 0, data is being changed...
View gist:c535fd258ddf94c272c4824244065986
Control group /:
├─624 /sbin/cgmanager -m name=systemd
│ └─machine-rkt\x2d6ff19b11\x2d0075\x2d48c6\x2d95e1\x2dc632da796d4e.scope
│ ├─init.scope
│ │ └─13469 /usr/lib/systemd/systemd --default-standard-output=tty --log-target=null --show-status=0
│ └─system.slice
│ ├─nginx.service
│ │ ├─13490 nginx: master process /usr/sbin/nginx -g daemon off
namsral / go.snippets
Created Oct 5, 2016
Go table-driven tests snippets for vim ultisnips
View go.snippets
snippet tt "table-driven tests"
func Test${1:Func}(t *testing.T) {
testCases := []struct {
${2:input} ${3:Type}
want ${4:Type}
{$2: ${5:""}, want: ${6:""}},${0: // comment}
for _, tc := range testCases {
if got := $1(tc.$2); got != tc.want {
namsral / person.go
Last active Sep 6, 2016
Example of a getter and setter in a single method
View person.go
package person_test
import (
// Person is a modern human with a name.
type Person struct {
name string
namsral / ziphttpd.go
Last active Oct 16, 2017
Deploy and serve assets from a zip archive
View ziphttpd.go
package main
import (
You can’t perform that action at this time.