This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Compiles to: | |
* | |
* public class BoolTest { | |
* public com.atex.onecms.ws.filedelivery.BoolTest(); | |
* Code: | |
* 0: aload_0 | |
* 1: invokespecial #1 // Method java/lang/Object."<init>":()V | |
* 4: return | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.artemis; | |
import java.lang.invoke.MethodHandle; | |
import java.lang.invoke.MethodHandles; | |
import java.lang.invoke.MethodType; | |
import java.lang.reflect.Constructor; | |
import java.util.concurrent.TimeUnit; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.BenchmarkMode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xmodmap -e "keysym ISO_Level3_Shift = Mode_switch" | |
xmodmap -e "keycode 34 = bracketleft braceleft aring Aring" | |
xmodmap -e "keycode 47 = semicolon colon odiaeresis Odiaeresis" | |
xmodmap -e "keycode 48 = apostrophe quotedbl adiaeresis Adiaeresis" | |
xmodmap -e "keycode 59 = comma parenleft" | |
xmodmap -e "keycode 60 = period parenright" | |
xmodmap -e "keycode 18 = 9 less" | |
xmodmap -e "keycode 19 = 0 greater" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.Graphics; | |
import java.awt.Image; | |
import java.awt.image.BufferedImage; | |
import java.util.ArrayList; | |
import java.util.List; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class Worley { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.openjdk.jmh.annotations.*; | |
import java.lang.reflect.Field; | |
import java.nio.Buffer; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; | |
import java.nio.FloatBuffer; | |
import java.util.concurrent.TimeUnit; | |
import sun.misc.Unsafe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# searches pom.xml files for $1 - skip target folders | |
alias poms="find . -name pom.xml -and -not -path '*/target/*' -print0 | xargs -0 fgrep -n --color=auto $1" | |
# copies the output of the last command to the clipboard | |
copylast() { | |
fc -s | pbcopy | |
} | |
# will show you how many commits there are that matches $1 | |
numcommits() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.junkdog.hallucinolog.component; | |
import lombok.ToString; | |
import org.apache.commons.io.input.Tailer; | |
import com.artemis.Component; | |
import com.badlogic.gdx.utils.AtomicQueue; | |
@ToString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
local C="\[\033[0;36m\]" # cyan | |
local EMC="\[\033[1;36m\]" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import static org.junit.Assert.*; | |
import com.artemis.Entity; | |
import com.artemis.World; | |
import org.junit.Test; | |
public class Test { | |
@Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class XmlUtil | |
{ | |
public static String formatXml(Document document) | |
throws Exception | |
{ | |
// the DocumentBuilderFactory can't reliably be configured to produce | |
// identical output from semantically identical documents, contrary to what | |
// its methods would suggest. Hence: | |
DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance(); | |
DOMImplementationLS impl = (DOMImplementationLS)registry.getDOMImplementation("LS"); |