Skip to content

Instantly share code, notes, and snippets.

View junkdog's full-sized avatar
🐥

Adrian Papari junkdog

🐥
  • Stockholm
View GitHub Profile
package com.artemis.generated;
import com.artemis.ComponentMapper;
import com.artemis.EntityTransmuter;
import com.artemis.World;
import com.artemis.annotations.AspectDescriptor;
import com.artemis.component.CompA;
import com.artemis.component.CompB;
import com.artemis.component.CompC;
import com.artemis.component.ComponentX;
  • checkbox
  • hmm
@junkdog
junkdog / BitsetBenchmark.java
Last active August 16, 2016 10:49
decoding bits to IntBag, benchmarking artemis-odb's BitVector
@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Warmup(iterations = 3, time = 1, timeUnit = SECONDS)
@Measurement(iterations = 5, time = 1, timeUnit = SECONDS)
@Fork(1)
@Threads(1)
@State(Scope.Thread)
/*
# Run complete. Total time: 00:04:08
@junkdog
junkdog / sed-and-stuff.md
Last active July 26, 2016 00:11
sed amd stuff

find . -type f -name '*.md' -print0 | xargs -0 sed -i 's/0.12.0/0.12.2/g'

replace component path

find . -type f -name '*.json' -print0 | xargs -0 sed -i 's/map.component.(InheritScale)/urizen.component.\1/g'

reset pulse (maybe)

rm -r ~/.config/pulse; pulseaudio -k

<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="severity" value="error"/>
<property name="fileExtensions" value="java"/>
@junkdog
junkdog / note-to-self.sh
Created January 19, 2016 20:19
note to self
find . -type f -name '*.md' -print0 | xargs -0 sed -i 's/0\.12\.0/0.12.2/g'
@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;