Skip to content

Instantly share code, notes, and snippets.

View donat's full-sized avatar

Donát Csikós donat

View GitHub Profile
* What went wrong:
Could not create an instance of type init_etnif236mbjh7zgbfu8lwpvtz.
> Could not generate a decorated class for type init_etnif236mbjh7zgbfu8lwpvtz.
> _BuildScript_
* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Exception is:
diff --git a/old b/newdynamic
index a51f973..fbd7ec4 100644
--- a/old
+++ b/newdynamic
@@ -1,6 +1,4 @@
-// old code
-
-methodVisitor = classWriter.visitMethod(ACC_PUBLIC | ACC_STATIC, "main", "()V", null, null);
+methodVisitor = classWriter.visitMethod(ACC_PUBLIC | ACC_STATIC, "foo", "()V", null, null);
methodVisitor.visitCode();
@donat
donat / build.gradle
Created December 22, 2020 13:30
Gradle task to ASMify a Gradle class
plugins {
id 'java-library'
}
dependencies {
implementation 'org.ow2.asm:asm-util:7.3.1'
implementation gradleApi()
}
repositories {
@donat
donat / gist:f697ed27e4af5f03779a
Last active August 29, 2015 14:05
Eclipse: wait in UI unit test
private void delay(long waitTimeMillis) {
Display display = Display.getCurrent();
// if UI thread then process input
if (display != null) {
long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
while (System.currentTimeMillis() < endTimeMillis) {
if (!display.readAndDispatch())
display.sleep();
}
display.update();
# This file operates on every file within the current directory and below, recursively.
# The original command is from http://rushi.vishavadia.com/blog/find-replace-across-multiple-files-in-linux
# but has been modified to not mess with end of line characters (-b option in sed) according to http://stackoverflow.com/a/11508669
find . -name "*.html" -print | xargs sed -i -b 's/find/replacewith/g'
# This example command searches only .html files. This can be changed to anything.
# You need to specify what to find and what to replace it with (find/replacewith). These are regular expressions, so be careful of special characters.