Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Vorburger ⛑️ vorburger

View GitHub Profile
@vorburger
vorburger / keybase.md
Created Mar 14, 2021
Keybase.io proof
View keybase.md

Keybase proof

I hereby claim:

  • I am vorburger on github.
  • I am vorburger (https://keybase.io/vorburger) on keybase.
  • I have a public key ASDg52VKKYQC_drfNUt19lgt2FO6ZF32GJoJHL25ylv7iQo

To claim this, I am signing this object:

@vorburger
vorburger / MultipartBody.java
Created Oct 21, 2020
OkHttp okhttp3.MultipartBody.Part transcribed from Kotlin to Java
View MultipartBody.java
// Turns out I didn't need this after all... ;-)
Headers headers = new Headers.Builder().addUnsafeNonAscii("Content-Disposition", buildContentDispositionHeader("file", file.getName())).add("Content-Type", rb.contentType().toString()).build();
return Part.create(headers, rb);
// As in okhttp3.MultipartBody.Part.createFormData(String, String, RequestBody), transcribed from Scala (?)
private static String buildContentDispositionHeader(String name, String fileName) {
StringBuilder sb = new StringBuilder("form-data; name=");
appendQuotedString(sb, name);
if (fileName != null) {
@vorburger
vorburger / github2gerrit.sh
Last active Feb 4, 2019
OpenDaylight GitHub PR to Gerrit
View github2gerrit.sh
http://blog2.vorburger.ch/2019/02/how-to-transfer-github-pull-requests-to.html
This is the documentation for how during 2018 I used to go from
the Version Bump Pull Requests proposed by Dependabot on
https://github.com/vorburger/odlparent/pulls
to https://git.opendaylight.org/gerrit/#/q/topic:dependabot
cd /home/vorburger/dev/ODL/git/odlparent
$ git remote -v
gerrit ssh://vorburger@git.opendaylight.org:29418/odlparent.git (fetch)
View irc.txt
https://github.com/fabric8io-images/s2i/issues/206
https://github.com/fabric8io-images/s2i/issues/172
(09:59:45 CET) vorburger: hello people of CentOS. I'm observing a VERY strange thing possibly related to the CentOS 7.6 container image release earlier today, full story is https://github.com/fabric8io-images/s2i/issues/206, the gist of it is:
(10:01:20 CET) vorburger: it looks to me like old stable 7.5.1804 on https://hub.docker.com/r/library/centos/tags/ got replaced with 7.6.1810 a few hours ago today, despite 7.5.1804 saying (on the UI) it hasn't changed in 2 months
(10:02:06 CET) billings: vorburger: Step 7/37 : RUN yum install -y unzip java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5
(10:02:27 CET) billings: why is it installing a specific version of openjdk? That's why it doesn't work. That version isn't in 7.6.
(10:03:03 CET) billings: https://github.com/fabric8io-images/s2i/blob/master/java/images/centos/Dockerfile this needs to be fixed, hopefully by someone who understands how to use
@vorburger
vorburger / gist:662d8b5f44c41edae2e22ca6f90ab04a
Created Sep 5, 2018
odl-etcd-demo-restconf missing org.apache.commons.text
View gist:662d8b5f44c41edae2e22ca6f90ab04a
2018-09-05T15:20:10,380 | ERROR | Time-limited test | SingleFeatureTest | 78 - PAXEXAM-PROBE-1476aac8-86ea-4d97-9ec2-62e234288c3f - 0.0.0 | installFeature() failed
org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=odl-etcd-demo-restconf; type=karaf.feature; version="[0.0.1.SNAPSHOT,0.0.1.SNAPSHOT]"; filter:="(&(osgi.identity=odl-etcd-demo-restconf)(type=karaf.feature)(version>=0.0.1.SNAPSHOT)(version<=0.0.1.SNAPSHOT))" [caused by: Unable to resolve odl-etcd-demo-restconf/0.0.1.SNAPSHOT: missing requirement [odl-etcd-demo-restconf/0.0.1.SNAPSHOT] osgi.identity; osgi.identity=odl-restconf; type=karaf.feature; version="[1.9.0.SNAPSHOT,1.9.0.SNAPSHOT]" [caused by: Unable to resolve odl-restconf/1.9.0.SNAPSHOT: missing requirement [odl-restconf/1.9.0.SNAPSHOT] osgi.identity; osgi.identity=org.opendaylight.netconf.restconf-nb-bierman02-auth; type=osgi.bundle; version="[1.9.0.SNAPSHOT,1.9.0.SNAPSHOT]"; resolution:=mandatory
@vorburger
vorburger / latency.markdown
Last active Aug 22, 2018 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 1K bytes over 1 Gbps network ....... 10,000 ns  =  10 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns  = 250 µs
@vorburger
vorburger / gist:37506778d44ff657357547c8860ae6d1
Created Aug 13, 2018
git config -l --show-origin | grep vorburger
View gist:37506778d44ff657357547c8860ae6d1
https://github.com/github/hub/issues/1708
$ git config -l --show-origin | grep vorburger
file:/home/vorburger/.gitconfig user.name=Michael Vorburger
file:/home/vorburger/.gitconfig user.email=mike@vorburger.ch
file:/home/vorburger/.gitconfig credential.helper=store
file:/home/vorburger/.gitconfig core.autocrlf=input
file:/home/vorburger/.gitconfig core.eol=native
file:/home/vorburger/.gitconfig core.excludesfile=/home/vorburger/.gitignore_global
@vorburger
vorburger / gist:0467aefc1757d2cc319adf4727e9230e
Created Aug 9, 2018
minishift wget minishift-centos7.iso struggle
View gist:0467aefc1757d2cc319adf4727e9230e
https://github.com/minishift/minishift-centos-iso/issues/259
wget --continue https://github.com/minishift/minishift-centos-iso/releases/download/v1.12.0/minishift-centos7.iso
--2018-08-09 18:34:23-- https://github.com/minishift/minishift-centos-iso/releases/download/v1.12.0/minishift-centos7.iso
Resolving github.com (github.com)... 192.30.253.112, 192.30.253.113
Connecting to github.com (github.com)|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-production-release-asset-2e65be.s3.amazonaws.com/69853246/922b03d8-8452-11e8-9dcd-92e33542c976?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20180809%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20180809T163423Z&X-Amz-Expires=300&X-Amz-Signature=839541773ed08c00400edcace7a68ad77caf9f05dc590ad76257f3138c098751&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dminishift-centos7.iso&response-content-type=application%2Foctet-stream [followin
@vorburger
vorburger / karaf.log
Created Jul 5, 2018
Weird ODL Karaf restart
View karaf.log
https://bugzilla.redhat.com/show_bug.cgi?id=1597304
Jun 27, 2018 10:00:15 AM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Jun 27, 2018 10:00:15 AM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
Jun 27, 2018 10:00:16 AM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /opt/opendaylight/lock
Jun 27, 2018 10:00:16 AM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
@vorburger
vorburger / gist:64f3e7f8695dad530a4c587c2b40a150
Created Jul 3, 2018
ODL netvirt/aclservice/impl help:effective-pom with org.eclipse.jdt.core 3.14.0
View gist:64f3e7f8695dad530a4c587c2b40a150
Re. https://github.com/eclipse/xtext-xtend/issues/493
in ODL/git/netvirt/aclservice/impl
with this changed locally:
<plugin>
<groupId>org.eclipse.xtend</groupId>
<artifactId>xtend-maven-plugin</artifactId>
<dependencies>