Skip to content

Instantly share code, notes, and snippets.

⌨️
ENOTTY

Luna Nova nallar

⌨️
ENOTTY
Block or report user

Report or block nallar

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
View Fernflower.java
//TODO: Look into caching the metadata grabbed from the context info?
//Also test on J9 JRE to see if gathering of the classpath is the same.
private void addAllClasspath() {
// TODO: maybe makes sense just to get the filesystem and root paths here and structcontext
// should have a method for loading from a Path
try {
FileSystem fileSystem = FileSystems.getFileSystem(URI.create("jrt:/"));
for (Path path : fileSystem.getRootDirectories()) {
Files.walkFileTree(path, new SimpleFileVisitor<Path>() {
@Override
View test.gradle
jar {
// Shading could try to add duplicate classes
// fail instead of silently adding multiple entries with the same name
duplicatesStrategy=DuplicatesStrategy.FAIL
configurations.shade.getResolvedConfiguration().getResolvedArtifacts().each { dep ->
def id = dep.getModuleVersion().id
if (configurations.shade.dependencies.find { orig -> orig.group == id.group && orig.name == id.name }) {
// shade direct dependencies
from(project.zipTree(dep.file)) {
View BaseMethodCall.java
import lombok.val;
import org.junit.Assert;
import org.junit.Test;
import java.lang.invoke.*;
/*
Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should.
Please don't actually do this... :P
View SneakyThrowExample.java
class SneakyThrowExample {
public static void throwUncheckedExample() {
throw throwIgnoreChecked(new IOException());
}
public static RuntimeException throwIgnoreChecked(Throwable t) {
throw SneakyThrowExample.<RuntimeException>throwIgnoreCheckedErasure(t);
}
private static <T extends Throwable> T throwIgnoreCheckedErasure(Throwable toThrow) throws T {
View MixinInjectAnnotations.java
package org.minimallycorrect.mixin;
/**
* The location to inject into
*/
public @interface At {
/**
* @see Type
*/
Type type();
View Database
*** Database ***
step = 23
pings = 20
# consfn mrhb steps total
AVERAGE 0.5 1 10000
AVERAGE 0.5 12 10000
MIN 0.5 12 10000
View smokeping.log
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes
-------------------------------------
_ _ _
View lin-advance-freeze.patch
diff --git a/Marlin/stepper.cpp b/Marlin/stepper.cpp
index 4b9167b6..e3e6beb3 100644
--- a/Marlin/stepper.cpp
+++ b/Marlin/stepper.cpp
@@ -110,7 +110,19 @@ volatile uint32_t Stepper::step_events_completed = 0; // The number of step even
Stepper::advance;
#endif
- #define ADV_RATE(T, L) (e_steps[TOOL_E_INDEX] ? (T) * (L) / abs(e_steps[TOOL_E_INDEX]) : ADV_NEVER)
+ FORCE_INLINE uint16_t ADV_RATE(long steps, uint16_t t, uint16_t l) {
View TextureMapFix.xml
<patchGroups>
<minecraft>
<!--<class id="net.minecraft.client.renderer.block.model.FaceBakery">
<insertCodeBefore code="System.out.println(&quot;face bake&quot; + $1);System.out.println(&quot;face bake&quot; + $4);System.out.println(&quot;face bake&quot; + $6);System.out.println(&quot;face bake&quot; + $7);">storeVertexData</insertCodeBefore>
</class>-->
<class id="net.malisis.core.renderer.font.MinecraftFont">
<disableMethod>setFields</disableMethod>
</class>
<class id="net.minecraft.client.renderer.texture.TextureMap">
<addMethod code="public boolean setTextureEntry(^class:TextureAtlasSprite^ entry) { return setTextureEntry(entry.func_94215_i(), entry); }"/>
View .gitattributes
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto eol=lf
# These are text but must have crlf
*.bat text eol=crlf
*.cmd text eol=crlf
# These files are text and should be normalized (Convert crlf => lf)
*.c text
You can’t perform that action at this time.