Skip to content

Instantly share code, notes, and snippets.

View TkTech's full-sized avatar
Converting coffee into code

Tyler Kennedy TkTech

Converting coffee into code
View GitHub Profile
using System;
namespace test
{
class MainClass
{
struct h4x {
// Fixed arrays can only be properties of structs
unsafe public fixed ushort test[512];
};
void Client::io_callback (ev::io &watcher, int revents) {
// Size to expand the buffer on each run
static const short buffer_run = 1024;
// Data to read
if (revents & ev::READ) {
// Remember the size of the vector before we change it
int old_size = _read_buffer.size();
// Expand the vector
{% extends "base.html" %}
{% block body %}
<h1>{{ msg }}</h1>
<p>{{ _("Go") }} <a href="{{ link }}">{{ label }}.</a></p>
{% end %}
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
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
# Table of types for packet definitions as well as their size
smp_fields = {
# Standard types
'byte' : ['b', 1],
'bool' : ['?', 1],
'short' : ['h', 2],
'int' : ['i', 4],
'float' : ['f', 4],
'double' : ['d', 8],
'long' : ['q', 8],
//
// Author:
// Tyler Kenendy <tk@tkte.ch>
//
// Copyright (c) 2010, Tyler Kennedy
//
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//