Skip to content

Instantly share code, notes, and snippets.

Jens Rantil JensRantil

Block or report user

Report or block JensRantil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
JensRantil / go.mod
Last active May 8, 2019
TopK implementation with filtering from dictionary.
View go.mod
require ( v0.0.0-20180314131852-90d4905c1961 // indirect v0.0.0-20190502144155-8358a9778bd1 // indirect v1.0.0 v0.8.1 v0.0.0-20190312162104-788fe5ffcd8c // indirect v0.0.0-20190423024810-112230192c58
JensRantil / go.mod
Last active May 3, 2019
Demonstrating potential memory leak.
View go.mod
require ( v0.0.0-20190423201044-2801d9688273 // indirect v1.4.1 // indirect v1.2.1 // indirect v0.5.4 // indirect v1.0.1 // indirect v1.1.0 // indirect v1.4.1 // indirect
JensRantil / go.mod
Last active Apr 25, 2019
A tiny application that connects to NATS and measure latencies to NATS.
View go.mod
require ( v1.4.1 // indirect v1.7.2 v0.0.2 // indirect v1.0.1 // indirect v1.3.1 v0.9.2 v0.0.0-20190425045458-9f0b1ff7b46a // indirect
JensRantil /
Last active Oct 17, 2018
Script that inform Github users of removal of a Github team. Modify for your organization and copy-paste the generated text into your favourite mail client!
# -*- coding: utf-8 -*-
import requests
import os
import pprint
def request(url):
return requests.get(url, auth=('JensRantil', os.environ['APIKEY']), headers={"Accept": "application/vnd.github.hellcat-preview+json"})
teams = dict([(e['id'], e['name']) for e in request('').json()])
JensRantil /
Created Feb 23, 2018
Test of running multiple HTTP listeners.
bash-3.2$ curl -v http://localhost:8080/bar && echo
* Trying ::1...
* Connected to localhost (::1) port 8080 (#0)
> GET /bar HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
< HTTP/1.1 200 OK
JensRantil /
Last active Feb 16, 2018
Make IAP requests from credentials JSON file.
# Copyright 2016 Google Inc. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
JensRantil /
Last active Aug 25, 2017
Masterless CI of Salt.
set -eu
# `--force-color` below is needed since we are writing output to a file.
JensRantil / nsqd-without-heartbeat.txt
Created Mar 5, 2017
Stacktrace from when nsqd stops sending heartbeats. See
View nsqd-without-heartbeat.txt
$ ./nsqd -lookupd-tcp-address localhost:4160
[nsqd] 2017/03/05 19:59:58.009064 nsqd v0.3.8 (built w/go1.6.2)
[nsqd] 2017/03/05 19:59:58.009214 ID: 219
[nsqd] 2017/03/05 19:59:58.010869 TOPIC(testtopic): created
[nsqd] 2017/03/05 19:59:58.011079 NSQ: persisting topic/channel metadata to nsqd.219.dat
[nsqd] 2017/03/05 19:59:58.011626 DISKQUEUE(testtopic): readOne() opened testtopic.diskqueue.000000.dat
[nsqd] 2017/03/05 19:59:58.013017 TCP: listening on [::]:4150
[nsqd] 2017/03/05 19:59:58.013208 HTTP: listening on [::]:4151
[nsqd] 2017/03/05 19:59:58.013216 LOOKUP(localhost:4160): adding peer
[nsqd] 2017/03/05 19:59:58.013269 LOOKUP connecting to localhost:4160
JensRantil /
Created Jan 22, 2017
Keybase verification.

Keybase proof

I hereby claim:

  • I am JensRantil on github.
  • I am jensrantil ( on keybase.
  • I have a public key whose fingerprint is 4371 E7ED 3A3D DBB4 12B5 C68F BA63 2DB6 91DA 03B8

To claim this, I am signing this object:

You can’t perform that action at this time.