Skip to content

Instantly share code, notes, and snippets.

@b1naryth1ef
b1naryth1ef / mapper.py
Created September 13, 2011 20:34
New Gametasim Mapper
def clean(inp):
new = {}
_y = 0
for i in inp:
_y += 1
_x = 0
app = []
for n in inp[i]:
_x += 1
@b1naryth1ef
b1naryth1ef / stupidmapper.py
Created October 9, 2011 01:56
Stupid... stupid... stupid
elif self.data['BOTS'] != {}:
for m in self.data['BOTS']:
if self.data['BOTS'][m].level == self.id and self.data['BOTS'][m].pos == [_x,_y] and self.data['BOTS'][m].pr is True:
print self.data['BOTS'][m].data['char'],
else:
print self.Map[_y][_x-1],
Dump of assembler code for function _Z13check_licenseRKSs:
0x00000001000d2930 <_Z13check_licenseRKSs+0>: push %rbp
0x00000001000d2931 <_Z13check_licenseRKSs+1>: mov %rsp,%rbp
0x00000001000d2934 <_Z13check_licenseRKSs+4>: push %r14
0x00000001000d2936 <_Z13check_licenseRKSs+6>: push %rbx
0x00000001000d2937 <_Z13check_licenseRKSs+7>: sub $0x30,%rsp
0x00000001000d293b <_Z13check_licenseRKSs+11>: mov %rdi,%rbx
0x00000001000d293e <_Z13check_licenseRKSs+14>: lea -0x18(%rbp),%r14
0x00000001000d2942 <_Z13check_licenseRKSs+18>: mov %r14,%rdi
0x00000001000d2945 <_Z13check_licenseRKSs+21>: callq 0x10041d9ce <dyld_stub__ZNSaIcEC1Ev>
@b1naryth1ef
b1naryth1ef / wtf.py
Created November 14, 2011 20:23
Wtf?
import time, init
from multiprocessing import Process, Queue
class x():
def initz(self, inp):
global P
q = Queue()
if inp == None:
self.P = Process(target=init.Start, args=(self, None))
self.P.start()
@b1naryth1ef
b1naryth1ef / ohdeargod.c
Created November 15, 2011 08:40
And then
#include <stdlib.h>
#include <SDL.h>
#include <sys/mman.h>
#define M(a) mmap(0, a, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0)
#define W 400
#define H 300
#define I 128
@b1naryth1ef
b1naryth1ef / demo.py
Created December 6, 2011 20:37
Demo of db api
from database import handler
if handler.tableExsists('myTable'):
tabler = tableSelect('myTable')
else:
tabler = tableCreate('myTable', {'id':'integer', 'name':'text'})
for row in tabler.getAllRows():
if row.name == 'MyName': PARTYTIME()
@b1naryth1ef
b1naryth1ef / bella_cpuinfo_dump.txt
Created December 6, 2011 20:45
/proc/cpuinfo dump
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 44
model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
stepping : 2
cpu MHz : 2400.142
cache size : 12288 KB
physical id : 0
siblings : 8
@b1naryth1ef
b1naryth1ef / wpnice.php
Created December 12, 2011 22:24
Wordpress nice login
<?php if ( is_user_logged_in() ) { ?>
<li><a title="End your user session" id="tip_logout" href="<?php echo wp_logout_url(); ?>">Logout</a></li>
<?php } if ( current_user_can('manage_options') ) { ?>
<li><a title="GO TO TEH SHIP CONTROL ROOMZ" id="tip_admindash" href="<?php echo get_admin_url();?>">Dashboard</a></li>
<?php } if (! is_user_logged_in() ) { ?>
<?php wp_register(); ?>
<li><a title="Login" id="tip_login" href="<?php echo wp_login_url() ?>">Login</a></li>
<?php } ?>
@b1naryth1ef
b1naryth1ef / main.py
Created December 14, 2011 06:30
We've come a long way...
#----------IMPORTS----------#
import subprocess, time, os, sys, imp
from tools import error
import tools
from pyquake3 import PyQuake3
#----------Objects----------#
Q = PyQuake3('localhost:27960', rcon_password='123abc')
#----------Vars----------#
@b1naryth1ef
b1naryth1ef / ai.py
Created December 18, 2011 02:12
A theory of BOT ai... or just some stupid code...
import random
mapy = {(5, 9): True,
(4, 7): True,
(1, 3): False,
(9, 1): True,
(4, 8): True,
(5, 6): True,
(2, 8): True,
(9, 8): True,