Skip to content

Instantly share code, notes, and snippets.

View vorburger's full-sized avatar

Michael Vorburger vorburger

View GitHub Profile
@vorburger
vorburger / gist:8868ecae9418d8bfe16cdeb9c3bcbbb9
Created January 7, 2024 12:12
Enola.dev bazel query --output=build //...
# /home/vorburger/git/github.com/enola-dev/enola/cli/BUILD:19:12
java_binary(
name = "enola",
tags = ["__JAVA_RULES_MIGRATION_DO_NOT_USE_WILL_BREAK__"],
generator_name = "enola",
generator_function = "java_binary",
generator_location = "cli/BUILD:19:12",
deps = ["//common/common:common", "//common/markdown:markdown", "//common/protobuf:protobuf", "//core/impl:impl", "//core/lib:core_java_grpc", "//core/lib:core_java_proto", "//core/lib:lib_java", "//web/api:api", "//web/rest:rest", "//web/sun:sun", "//web/ui-soy:ui-soy", "@maven//:com_google_guava_guava", "@maven//:com_google_protobuf_protobuf_java", "@maven//:info_picocli_picocli", "@maven//:org_slf4j_slf4j_api", "@maven//:org_slf4j_slf4j_jdk14"],
srcs = ["//cli:src/main/java/dev/enola/cli/CLI.java", "//cli:src/main/java/dev/enola/cli/CheckedRunnable.java", "//cli:src/main/java/dev/enola/cli/CommandWithEntityID.java", "//cli:src/main/java/dev/enola/cli/CommandWithModel.java", "//cli:src/main/java/dev/enola/cli/DocGen.java", "//cli:src/main/java
@vorburger
vorburger / Techn
Created February 19, 2022 17:36
Minecraft https://www.technicpack.net Technic Launcher Add Microsoft Account deadlock
2022-02-19 18:35:41
Full thread dump OpenJDK 64-Bit Server VM (11.0.13+8 mixed mode, sharing):
Threads class SMR info:
_java_thread_list=0x00007fe558000c30, length=17, elements={
0x00007fe5a8152000, 0x00007fe5a8154000, 0x00007fe5a8159800, 0x00007fe5a815b800,
0x00007fe5a815d800, 0x00007fe5a815f800, 0x00007fe5a8161800, 0x00007fe5a81b5000,
0x00007fe5a8338800, 0x00007fe5a8384800, 0x00007fe5a89a5000, 0x00007fe5a89a6800,
0x00007fe510006000, 0x00007fe5a8017000, 0x00007fe510193000, 0x00007fe510199800,
0x00007fe558001000
@vorburger
vorburger / keybase.md
Created March 14, 2021 11:11
Keybase.io proof

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 October 21, 2020 23:04
OkHttp okhttp3.MultipartBody.Part transcribed from Kotlin to 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 February 4, 2019 16:25
OpenDaylight GitHub PR to Gerrit
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)
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 September 5, 2018 13:31
odl-etcd-demo-restconf missing org.apache.commons.text
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 August 22, 2018 13:47 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

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 August 13, 2018 15:41
git config -l --show-origin | grep vorburger
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 August 9, 2018 16:56
minishift wget minishift-centos7.iso struggle
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