Skip to content

Instantly share code, notes, and snippets.

@schwarzeszeux
schwarzeszeux / Fernflower.java
Created April 9, 2012 22:35
Enum decompilation
package Enums;
public enum TestEnum {
WHITE("WHITE", 0),
BLACK("BLACK", 1),
RED("RED", 2),
YELLOW("YELLOW", 3),
BLUE("BLUE", 4);
@schwarzeszeux
schwarzeszeux / Fernflower.java
Created April 11, 2012 10:38
JavaMapper Decompiler
package Enums;
enum Operation {
PLUS("PLUS", 0, (Operation)null) {
double eval(double x, double y) {
return x + y;
}
},
package BlocksAndStatements;
public class SwitchStatement {
// $FF: synthetic field
private static int[] $SWITCH_TABLE$BlocksAndStatements$SwitchStatement$TestEnum;
public void TestSwitchOnString(String s) {
<?xml version="1.0" encoding="utf-8" ?>
<Packets version="73">
<Packet name="KeepAlive" id="0x00">
<Field name="KeepaliveID" type="int" note="Server-generated random id" />
<Comments>
<![CDATA[
Two-Way
The server will frequently send out a keep-alive, each containing a random ID. The client must respond with the same packet. The Beta server will disconnect a client if it doesn't receive at least one packet before 1200 in-game ticks, and the Beta client will time out the connection under the same conditions. The client may send packets with Keep-alive ID=0.
]]>
</Comments>
public class DeadManSwitch implements Runnable{
public static DeadManSwitch instance;
private Thread serverThread = null;
private MinecraftServer server = null;
private BlockingQueue<Long> queue = new ArrayBlockingQueue<Long>();
public DeadManSwitch(MinecraftServer server, Thread serverThread){
this.server = server;
this.serverThread = serverThread;
{
name: "JavaExporter",
author: "ZeuX",
version: "0.1",
script: "http://jsadas/javaexporter.js",
libraries: [],
menu: [{
text: "Import",
items: [{
icon: "http://asdasd",
public void LocalsInBlocksDifferentType(String param1)
{
{
String tmp = "first";
this.stringField = tmp;
}
{
int tmp = 32;
this.intField = tmp;
}
@schwarzeszeux
schwarzeszeux / gist:11c427ada009853e537b
Created November 10, 2014 15:21
Book club book suggestions
Current Book is "Clean Code" by Robert C. Martin
you can buy it from Amazon at http://amzn.to/1qAiUso
Future book suggestions
Don't Make Me Think
Name TotalPlays
Robbie Williams 5905
Rainhard Fendrich 5209
Queen 5195
James Blunt 4590
Elton John 4574
Falco 4534
Avicii 4396
Meghan Trainor 4320
Michael Jackson 4053
'use strict';
var tsc = require('./tsc');
var fs = require('fs');
var path = require('path');
var util = require('util');
var _ = require('lodash');
var async = require('async');
var byline = require('byline');
var temp = require('temp');