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
JensRantil / go.mod
Last active May 8, 2019
TopK implementation with filtering from dictionary.
View go.mod
module github.com/JensRantil/topk-challenge
require (
github.com/funkygao/golib v0.0.0-20180314131852-90d4905c1961 // indirect
github.com/google/pprof v0.0.0-20190502144155-8358a9778bd1 // indirect
github.com/hashicorp/go-multierror v1.0.0
github.com/pkg/errors v0.8.1
golang.org/x/arch v0.0.0-20190312162104-788fe5ffcd8c // indirect
golang.org/x/sync v0.0.0-20190423024810-112230192c58
)
@JensRantil
JensRantil / go.mod
Last active May 3, 2019
Demonstrating potential memory leak.
View go.mod
module github.com/tink-ab/tink-backend/src/nats-streaming-pinger
require (
github.com/armon/go-metrics v0.0.0-20190423201044-2801d9688273 // indirect
github.com/go-sql-driver/mysql v1.4.1 // indirect
github.com/gogo/protobuf v1.2.1 // indirect
github.com/hashicorp/go-msgpack v0.5.4 // indirect
github.com/hashicorp/raft v1.0.1 // indirect
github.com/lib/pq v1.1.0 // indirect
github.com/nats-io/gnatsd v1.4.1 // indirect
@JensRantil
JensRantil / go.mod
Last active Apr 25, 2019
A tiny application that connects to NATS and measure latencies to NATS.
View go.mod
module github.com/tink-ab/tink-backend/src/nats-checker
require (
github.com/nats-io/gnatsd v1.4.1 // indirect
github.com/nats-io/go-nats v1.7.2
github.com/nats-io/nkeys v0.0.2 // indirect
github.com/nats-io/nuid v1.0.1 // indirect
github.com/oklog/ulid v1.3.1
github.com/prometheus/client_golang v0.9.2
golang.org/x/sys v0.0.0-20190425045458-9f0b1ff7b46a // indirect
@JensRantil
JensRantil / inform_github_users.py
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!
View inform_github_users.py
# -*- 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('https://api.github.com/orgs/tink-ab/teams').json()])
pprint.pprint(teams)
@JensRantil
JensRantil / exeuction.sh
Created Feb 23, 2018
Test of running multiple HTTP listeners.
View exeuction.sh
bash-3.2$ curl -v http://localhost:8080/bar && echo
* Trying ::1...
* TCP_NODELAY set
* 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
JensRantil / make_iap_request.py
Last active Feb 16, 2018
Make IAP requests from credentials JSON file.
View make_iap_request.py
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@JensRantil
JensRantil / salt-dry-run-single.sh
Last active Aug 25, 2017
Masterless CI of Salt.
View salt-dry-run-single.sh
#!/bin/bash
set -eu
MINIONID="$1"
SYNCMODULESLOG=$(mktemp)
SHOWTOPLOG=$(mktemp)
PILLARITEMSLOG=$(mktemp)
SHOWHIGHSTATELOG=$(mktemp)
# `--force-color` below is needed since we are writing output to a file.
@JensRantil
JensRantil / nsqd-without-heartbeat.txt
Created Mar 5, 2017
Stacktrace from when nsqd stops sending heartbeats. See https://github.com/nsqio/nsq/issues/859.
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
JensRantil / keybase.md
Created Jan 22, 2017
Keybase verification.
View keybase.md

Keybase proof

I hereby claim:

  • I am JensRantil on github.
  • I am jensrantil (https://keybase.io/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.