Skip to content

Instantly share code, notes, and snippets.

#![feature(test)]
extern crate rand;
extern crate test;
#[macro_use]
extern crate nom;
use nom::*;
import java.awt.*;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.*;
import javax.imageio.ImageIO;
import javax.swing.JComponent;
@BurntPizza
BurntPizza / CoffeeGrinder.java
Last active August 29, 2015 14:16
Java source minifer
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.*;
import java.util.*;
import java.util.regex.*;
public class CoffeeGrinder {
public static void main(String[] args) throws IOException {
if (args.length == 0) {
package pl.warlander.terraingen.core;
import java.util.Random;
public class FractalLayer {
private final float value;
private final int size;
private final int width;
private final int height;
@BurntPizza
BurntPizza / Project Setup
Last active August 29, 2015 14:08
Eclipse git clone -> general project -> java project
File > Import
Git > Projects from Git
Clone URI
Enter info, icl. clone URL from GitHub. If it's in your clipboard most should already be entered.
Select branches, local repo directory, etc.
If eclipse project file is not present in repo: (likely and troublesome scenario)
Import as general project
Name > Finish
Now you have the project, linked with a local git repo and the remote repo (presumably on GitHub).
@BurntPizza
BurntPizza / StupidDSL
Last active August 29, 2015 14:07
Just what the name says...
package stupid;
import java.util.*;
import java.util.function.Consumer;
/**
* A very broken FORTH-like embedded Java DSL
*/
@SuppressWarnings("unchecked")
public enum StupidDSL implements Consumer<ArrayDeque<Object>> {