Skip to content

Instantly share code, notes, and snippets.

View junkdog's full-sized avatar
🐥

Adrian Papari junkdog

🐥
  • Stockholm
View GitHub Profile
@junkdog
junkdog / pom.xml
Created December 28, 2015 22:26
building a patched libgdx
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.badlogicgames.gdx</groupId>
<artifactId>gdx</artifactId>
<version>1.7.0-feo</version>
<packaging>jar</packaging>
<name>libgdx-feomedia-patched</name>
@junkdog
junkdog / macs
Last active July 1, 2018 19:43
macs
27-inch iMac with Retina 5K display
32gb, quad core i7, 256gb SSD
$2,999.00
Mac Pro
32gb, quad core Xeon E5, 256gb SSD
$3,499.00
Mac mini
16gb, dual core i7, 256gb SSD
package com.github.junkdog.shamans.system.spatial;
import static com.badlogic.gdx.math.MathUtils.clamp;
import static com.github.junkdog.shamans.Constants.HEIGHT;
import static com.github.junkdog.shamans.Constants.WIDTH;
import static com.github.junkdog.shamans.system.render.NearestNeighborsRenderSystem.FIND_NEIGHBORS;
import static java.lang.Math.min;
import lombok.Getter;
import lombok.Setter;
/**
* 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
*
@junkdog
junkdog / ConstructorBenchmark.java
Last active August 29, 2015 14:06
Constructor invocation benchmark
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;
@junkdog
junkdog / xmodmap.conf
Last active August 29, 2015 14:03
xmodmap us layout with swedish altgr for åäö, and switched () with <>
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"
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 {
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;
@junkdog
junkdog / .profile
Last active August 29, 2015 13:56 — forked from vrutberg/.profile
# 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() {
@junkdog
junkdog / Tail.java
Last active July 3, 2020 16:40
AtomicQueue example.
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