Skip to content

Instantly share code, notes, and snippets.

View vorburger's full-sized avatar
💭
I may be slow to respond.

Michael Vorburger vorburger

💭
I may be slow to respond.
View GitHub Profile
package org.opendaylight.netvirt.aclservice.tests.utils.tests.inject;
import static org.junit.Assert.assertEquals;
import dagger.Component;
import javax.inject.Inject;
import javax.inject.Provider;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.opendaylight.netvirt.aclservice.tests.utils.inject.InstanceProvidedBy;
@vorburger
vorburger / dmesg
Last active August 20, 2016 17:31
Raspberry Pi v3 Raspian WiFi Driver "crash" (?) with WiFi as AP using hostapd, only when HDMI plugged in
https://bugzilla.kernel.org/show_bug.cgi?id=153471
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=143972&p=1021341
[Sat Aug 20 18:14:53 2016] Booting Linux on physical CPU 0x0
[Sat Aug 20 18:14:53 2016] Initializing cgroup subsys cpuset
[Sat Aug 20 18:14:53 2016] Initializing cgroup subsys cpu
[Sat Aug 20 18:14:53 2016] Initializing cgroup subsys cpuacct
[Sat Aug 20 18:14:53 2016] Linux version 4.4.18-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611) ) #905 SMP Fri Aug 19 19:11:00 BST 2016
[Sat Aug 20 18:14:53 2016] CPU: ARMv7 Processor [410fd034] revision 4 (ARMv7), cr=10c5383d
@vorburger
vorburger / FindAllSlf4jLoggersOnClasspathTest.java
Created January 12, 2017 12:04
Find all org/slf4j/Logger available on the classpath
public class FindAllSlf4jLoggersOnClasspathTest {
@Test
public void testSlf4jMess() throws IOException {
Enumeration<URL> urls = getClass().getClassLoader().getResources("org/slf4j/Logger.class");
while (urls.hasMoreElements()) {
URL url = urls.nextElement();
System.out.println(url);
}
}
@vorburger
vorburger / MANIFEST.MF
Created January 20, 2017 20:18
gradle-tooling-api JAR OSGi MANIFEST generated by BND, for https://github.com/gradle/gradle/issues/1216
Manifest-Version: 1.0
Bnd-LastModified: 1484882151529
Bundle-ManifestVersion: 2
Bundle-Name: org.gradle.tooling
Bundle-SymbolicName: org.gradle.tooling
Bundle-Version: 3.3.0
Created-By: 1.8.0_111 (Oracle Corporation)
Export-Package: org.gradle.api;version="3.3.0",org.gradle.api.artifact
s;uses:="org.gradle.api";version="3.3.0",org.gradle.api.logging;versi
on="3.3.0",org.gradle.api.logging.configuration;uses:="org.gradle.api
@vorburger
vorburger / latest.log
Created February 1, 2017 01:51
SpongePowered/LaunchWrapperTestSuite NPEs
This file has been truncated, but you can view the full file.
[02:44:00 INFO] [mixin]: SpongePowered MIXIN Subsystem Version=0.6 Source=file:/home/vorburger/.gradle/caches/modules-2/files-2.1/org.spongepowered/spongevanilla/1.10.2-5.1.0-BETA-369/81c9e5493f4c3af8a6bdec69f2208f3d40b0048c/spongevanilla-1.10.2-5.1.0-BETA-369.jar Env=UNKNOWN
[02:44:00 INFO] [mixin]: Compatibility level set to JAVA_8
[02:44:00 WARN] [mixin]: Failed to select mixin config: mixins.common.refmap.json
java.lang.NullPointerException
at org.spongepowered.asm.mixin.transformer.MixinConfig.onSelect(MixinConfig.java:371) ~[spongevanilla-1.10.2-5.1.0-BETA-369.jar:1.10.2-5.1.0-BETA-369]
at org.spongepowered.asm.mixin.transformer.MixinTransformer.selectConfigs(MixinTransformer.java:593) [spongevanilla-1.10.2-5.1.0-BETA-369.jar:1.10.2-5.1.0-BETA-369]
at org.spongepowered.asm.mixin.transformer.MixinTransformer.select(MixinTransformer.java:567) [spongevanilla-1.10.2-5.1.0-BETA-369.jar:1.10.2-5.1.0-BETA-369]
at org.spongepowered.asm.mixin.transformer.MixinTransformer.transform(MixinTransformer.java:478)
@vorburger
vorburger / InetAddressLocalHostUtil.java
Last active April 7, 2017 16:35
Improve the JDK's somewhat broken InetAddress#getLocalHost()
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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
*
@vorburger
vorburger / OpenDaylight-bumpCheckstyle-carbon.txt
Last active April 19, 2017 17:54
List of new Checkstyle violations appearing on projects when bumping Checkstyle from 6.16 to 7.6.1
==> https://wiki.opendaylight.org/view/EvolvingCheckstyle/6.16-to-7.6.1
@vorburger
vorburger / gist:0479be76f9cd3d10aa5ef86d4034a090
Created October 2, 2017 17:37
eclipse.jdt.core/org.eclipse.jdt.annotation Release Notes
From 2.0.0 to 2.1.0
054b03ab2c Bug 511310: API Analysis Builder broken for multi-version bundles (2)
8202fec6b6 Bug 511310: API Analysis Builder broken for multi-version bundles (2)
eafed8504a update require bundle versions and remove outdated API filters
5d48893dd6 Bug 496465 - Updating parent pom version
ed815ac91a Bug 490012 - Remove the "strictly compatible JRE" per-project override from all projects in the Eclipse SDK
741a692ac3 [Bug 489718] Compile warning in official build in org.eclipse.jdt.annotation_2.1.0<U+200B>
7ae02327b3 [Bug 489718] Compile warning in official build in org.eclipse.jdt.annotation_2.1.0<U+200B>
aad74c786a Bug 489684: API Analysis Builder broken for multi-version bundles
@vorburger
vorburger / ThreadExplosion.java
Created November 2, 2017 23:39
Java class which creates A LOT of threads
/*
* Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package test;
/**
@Test
public void testBasicWait() throws InterruptedException, ExecutionException {
long millis = 500;
final AtomicReference<Future<?>> futureRef = new AtomicReference<>();
testAndVerifyTimeBounds(executorService ->
futureRef.set(executorService.submit(() -> {
try {
Thread.sleep(millis);
} catch (InterruptedException e) {
// Ignored