Skip to content

Instantly share code, notes, and snippets.

View clonejo's full-sized avatar

Feiko Nanninga clonejo

  • Aachen / Leer, Germany
View GitHub Profile
@clonejo
clonejo / mod.rs
Last active December 24, 2015 22:29 — forked from anonymous/-
mod.rs:13:15: 13:28 error: failed to find an implementation of trait std::rt::io::Reader for &std::rt::io::Reader<no-bounds>
mod.rs:13 return r.read_u8_();
@clonejo
clonejo / gist:4515639
Created January 12, 2013 01:53
tagged Minecraft packets
Keep Alive - two-way, login, per-client
Login Request - s2c, login
Handshake - c2s, login
Chat Message - two-way, chat, broadcast
Time Update - s2c, broadcast
Entity Equipment - s2c, entity, broadcast
Spawn Position - s2c, login
Use Entity - c2s, player, entity
Update Health - s2c, player, per-client
Respawn - s2c, player, per-client
@clonejo
clonejo / english
Last active December 10, 2015 15:38
Basic structure of mc-erl's plugin protocol
The server will start the plugin (Unix) process and connect to it's stdin and stdout.
basic format: [length: 4 Bytes] [Payload]
payload: [Token: 4 Bytes] [Opcode: 2 Bytes] <depends on packet type>
Token:
first bit sent by the server = 1 (event)
first bit sent by the plugin = 0 (request)
Opcodes:
[mc_erl_protocol] packet disconnect, params:
[[167,49,0,49,0,49,46,52,46,53,0,97,32,46,46,46,101,114,114,46,46,46,32,108,
97,110,103,32,115,101,114,118,101,114,33,0,48,0,49,48,49]], binary:
ff 0 29 0 a7 0 31 0 0 0 31 0 0 0 31 0 ..)...1...1...1.
2e 0 34 0 2e 0 35 0 0 0 61 0 20 0 2e 0 ..4...5...a.....
2e 0 2e 0 65 0 72 0 72 0 2e 0 2e 0 2e 0 ....e.r.r.......
20 0 6c 0 61 0 6e 0 67 0 20 0 73 0 65 0 ..l.a.n.g...s.e.
72 0 76 0 65 0 72 0 21 0 0 0 30 0 0 0 r.v.e.r.!...0...
31 0 30 0 31 1.0.1
$ xbuild
XBuild Engine Version 2.10.8.1
Mono, Version 2.10.8.1
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Build started 07.12.2012 22:12:31.
__________________________________________________
Project "/home/clonejo/Downloads/SuperLauncher/SuperLauncher.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
npm ERR! error installing [email protected]
npm ERR! Error: ENOENT, no such file or directory '/home/clonejo/programs/Eunomia/node_modules/js-yaml/bin/js-yaml.js'
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/clonejo/programs/Eunomia/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.2.0-32-generic
npm ERR! command "node" "/usr/bin/npm" "install" "express" "socket.io" "js-yaml" "sqlite3"
$ npm install js-yaml
npm http GET https://registry.npmjs.org/js-yaml
npm http 304 https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/argparse
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/underscore.string
npm ERR! error installing [email protected]
@clonejo
clonejo / wallpaper-changer
Created November 14, 2012 19:13
Wallpaper changer script for use with Mate Desktop
#!/bin/sh
dir="/path/to/your/wallpaper/folder/"
change() {
PIC=$(find $dir -type f \( ! -regex '.*/\..*' \) | shuf -n1)
echo $PIC >> "/path/to/your/log/file"
mateconftool-2 -t string -s /desktop/mate/background/picture_filename $PIC
}
@clonejo
clonejo / Campus-Office-Session-Longer.user.js
Created October 30, 2012 14:03
Campus-Office-Session-Longer
// ==UserScript==
// @name Campus-Office-Session-Longer
// @namespace campus-office-session-longer
// @description Stops session expiration in Campus Office by regularly loading a page in background.
// @include https://www.campus.rwth-aachen.de/office/views/*
// @version 1
// @require http://code.jquery.com/jquery-1.8.2.min.js
// ==/UserScript==
interval = 10*60*1000;
@clonejo
clonejo / mc-erl
Created October 16, 2012 18:30
mc-erl 0xFD
[mc_erl_protocol] packet encryption_key_request, params:
["-",
[48,129,137,2,129,129,0,200,18,80,76,132,7,47,160,219,251,54,85,125,185,89,
146,109,28,98,99,148,231,19,139,250,135,238,59,35,195,207,139,246,21,25,82,
243,210,179,76,187,69,241,51,32,47,24,146,247,163,181,240,196,163,166,112,
134,152,77,126,48,116,214,1,71,149,172,203,97,49,174,244,69,59,187,196,19,
226,63,55,44,222,205,11,0,237,37,194,140,99,137,137,124,46,154,211,155,233,
3,76,239,37,46,123,129,189,234,65,136,202,170,211,89,1,47,40,230,230,163,
153,166,48,239,142,88,97,114,97,2,3,1,0,1],
[70,230,21,210]], binary: