Skip to content

Instantly share code, notes, and snippets.

View Frontrider's full-sized avatar

Frontrider

  • Deutsche Telekom AG@telekom
  • Somewhere, far away
View GitHub Profile
@Frontrider
Frontrider / CPU.java
Created October 30, 2018 17:30 — forked from unnikked/CPU.java
Tiny RISC Virtual Machine - Read README first!
import java.util.HashMap;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CPU {
public String[] ram;
private HashMap<String, Instruction> rom;
private double accumulator;
private int instructionPointer;
@Frontrider
Frontrider / Git.java
Created December 2, 2019 16:27 — forked from Crydust/Git.java
run git commands from java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
@Frontrider
Frontrider / autotiler.gd
Created June 28, 2021 15:23 — forked from jules-goose/autotiler.gd
a proof of concept (and limited in functionality) gridmap autotiler for godot
tool
extends GridMap
#based on https://gamedevelopment.tutsplus.com/tutorials/how-to-use-tile-bitmasking-to-auto-tile-your-level-layouts--cms-25673 tutorial
# and using a 47 tile meshlibrary like this one : https://imgur.com/yuprM0n
var tilebitmask = { "254": 45, "90": 22, "22": 7, "0": 47, "10": 3, "2": 1, "94": 24, "120": 29, "11": 4, "208": 34, "107": 28, "82": 19, "216": 37, "86": 20, "223": 41, "214": 36, "104": 26, "222": 40, "74": 16, "18": 6, "8": 2, "248": 42, "255": 46, "127": 33, "123": 31, "66": 14, "16": 5, "219": 39, "75": 17, "80": 18, "122": 30, "30": 11, "126": 32, "31": 12, "250": 43, "88": 21, "64": 13, "95": 25, "251": 44, "91": 23, "24": 8, "27": 10, "218": 38, "72": 15, "106": 27, "26": 9, "210": 35 }
var bitmask = [
[1,2,4],