Skip to content

Instantly share code, notes, and snippets.

@grum
grum / bs.pl
Created December 20, 2014 19:50
#!env perl -l
use strict;
use warnings;
my @words = map { chomp; s/\s//; $_ } <DATA>;
print join '', map { splice @words, rand @words, 1 } (1 .. shift || 10);
__DATA__
Strategy
erikbroes@db-int:~$ mkdir master; cd master; git init; echo hello > README; git add .; git commit -m "first commit"; cd ..
Initialized empty Git repository in /home/erikbroes/master/.git/
[master (root-commit)]: created 71ca0f6: "first commit"
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 README
erikbroes@db-int:~$ git clone master clone; cd clone; echo world >> README; git commit -a -m"second commit"; git push; cd ..
Initialized empty Git repository in /home/erikbroes/clone/.git/
[master]: created 9ccb052: "second commit"
1 files changed, 1 insertions(+), 0 deletions(-)
Counting objects: 5, done.
@grum
grum / gist:655810
Created October 30, 2010 22:31
Mappings i found sofar
aa -> ac
as -> av
as -> av
ba -> be
bg -> bn
bn -> bw
bs -> cd
cb -> cm
c -> c
ce -> cp
@grum
grum / gist:655781
Created October 30, 2010 21:49
Lines added to eo.java (from ea.java)
+ if (!paramel.q.c) {
+ i += this.V.nextInt(20) - 10;
+ k = paramel.e(i, j);
+ j += this.V.nextInt(20) - 10;
+ }
@grum
grum / gist:716973
Created November 26, 2010 17:17
Eating an apple
java.lang.Exception
at jy.a(jy.java:282)
at er.a(er.java:108)
at kd.a(SourceFile:17)
at hl.a(SourceFile:79)
at jt.a(SourceFile:98)
at jg.a(jg.java:300)
at fz.a(SourceFile:36)
at bi.a(SourceFile:218)
at jg.a(jg.java:43)
public boolean a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, boolean paramBoolean)
{
// type of block given
int i1 = a(paramInt2, paramInt3, paramInt4);
// actual material object
ga localga1 = ga.m[i1];
// material object of the type which is to be placed.
ga localga2 = ga.m[paramInt1];
public void a(fz paramfz) {
// hMod: Is admin?
boolean bool = this.d.e.B = (this.d.f.g(getPlayer().getName()) || getPlayer().isAdmin());
if (paramfz.e == 255) {
hl localhl1 = paramfz.a >= 0 ? new hl(paramfz.a) : null;
this.e.c.a(this.e, this.d.e, localhl1);
} else {
// hMod: what are we doing here if we can't build!
if (!getPlayer().canBuild()) {
this.d.e.B = false;
public class bt extends fu {
private int a;
public bt(int paramInt) {
super(paramInt);
this.a = (paramInt + 256);
a(ga.m[(paramInt + 256)].a(2));
}
@Override
import java.util.List;
public class jm extends dx implements kc {
private hl[] ak = new hl[36];
public int a = 0;
public int b = 0;
public int c = 1;
private boolean al = false;
public int d;
private void f(eo parameo, int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
// if what (eo, x, y, z )
if (l(parameo, paramInt1, paramInt2, paramInt3)) {
// blockId = eo.getBlockId(x,y,z)
int i = parameo.a(paramInt1, paramInt2, paramInt3);
// if not air
if (i > 0) {
// if this is lava
if (this.bs == jw.g) {
// make lava noises! (where does it set to obsidian/cobble?