Skip to content

Instantly share code, notes, and snippets.

View eddyb's full-sized avatar

Eduard-Mihai Burtescu eddyb

View GitHub Profile
class Auth(object):
"""Provides an interface to services provided by minecraft.net"""
def __init__(self, username, password):
self.username = username
self.password = password
self.launcher_ver = 999999999
def _get_version(self):
from urllib import urlopen
@eddyb
eddyb / Makefile
Created November 29, 2011 14:21 — forked from lauriro/Makefile
Makefile
#
# Makefile for Project
#
#
# Tags:
# =====
#
# Certain tags are used in comments to assist in indexing common issues:
# - TODO to indicate planned enhancements.
# - FIXME to mark potential problematic code that requires special
@eddyb
eddyb / yR5EBMrj.js
Created April 22, 2012 09:48 — forked from anonymous/yR5EBMrj
a guest on Apr 22nd, 2012 - pastebin.com/yR5EBMrj
var TWEEN = TWEEN || ( function () {
var _tweens = [];
return {
REVISION: '6',
getAll: function () {
@eddyb
eddyb / AHLMkzeT.js
Created April 22, 2012 16:48 — forked from anonymous/AHLMkzeT
antgel - employee prototype
function Employee(name, id, level) {
"use strict";
this.data = {};
this.data.title = name;
this.data.attr = {
"class" : "tree-employee",
};
this.data.icon = "/img/employee_by_id/" + id + ".png";
this.metadata = {
@eddyb
eddyb / AHLMkzeT.js
Created April 22, 2012 17:02 — forked from anonymous/AHLMkzeT
antgel - employee prototype
function Employee(name, id, level) {
"use strict";
this.data = {};
this.data.title = name;
this.data.attr = {
class : "tree-employee",
};
this.data.icon = "/img/employee_by_id/" + id + ".png";
this.metadata = {};
@eddyb
eddyb / N-Queens.cc
Created July 17, 2012 16:44 — forked from anonymous/N-Queens
N-Queens implementaion. Needs a new algo.
#include <iostream>
#include <fstream>
#include <vector>
#include <set>
using namespace std;
set<vector<int> > answers;
int answers_count = 0;
@eddyb
eddyb / browser.js
Created November 18, 2012 16:06 — forked from atsuya/browser
websocket binary data test - socket.io
var socket = null;
$(function() {
socket = io.connect();
socket.on('message', function(data) {
receiveBinary(data);
});
setTimeout(sendBinary, 1000);
});
console.log('Running "'+job.data.title+'"');
var s = progman.spawn('java', ['-Xmx512M', '-Xms512M', '-jar', 'minecraft_server.jar', 'nogui'], {cwd: 'defaultServer'});
var hadWarning = false;
s.stdout.on('data', function(data) {
data = data.toString().split('\n');
for(var i = 0; i < splitData.length; i++)
if(data[i] && data[i] != "\n")
job.log(splitData[i].replace(/\n$/, ''));
@eddyb
eddyb / python.py
Created November 22, 2012 14:12 — forked from xeago/python.py
import sys
def strxor(a, b): # xor two strings of different lengths
if len(a) > len(b):
return "".join([chr(ord(x) ^ ord(y)) for (x, y) in zip(a[:len(b)], b)])
else:
return "".join([chr(ord(x) ^ ord(y)) for (x, y) in zip(a, b[:len(a)])])
def encrypt(key, msg):
c = strxor(key, msg)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.