Skip to content

Instantly share code, notes, and snippets.

execve("/usr/bin/firefox", ["firefox"], [/* 76 vars */]) = 0
brk(0) = 0x937a000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76f9000
readlink("/proc/self/exe", "/usr/lib/firefox-3.6/firefox", 4096) = 28
open("/usr/lib/libaoss.so", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\360\16\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=19221, ...}) = 0
mmap2(NULL, 18076, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76f4000
mmap2(0xb76f8000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb76f8000
close(3) = 0
# kcbanner's zshrc file v0.1, based on:
# jdong's zshrc file v0.2.1 and
# mako's zshrc file, v0.1
setopt ALL_EXPORT
# Set/unset shell options
setopt notify globdots correct pushdtohome cdablevars autolist
setopt correctall autocd recexact longlistjobs nohup incappendhistory sharehistory extendedhistory
setopt autoresume histignoredups pushdsilent menucomplete
@kcbanner
kcbanner / gist:947160
Created April 28, 2011 19:44
Printing bytes
a = '00 00 11 22 33 44 55 d a'
b = a.split(' ')
s = ""
for x in b:
s += chr(int(x, 16))
print s
@kcbanner
kcbanner / gist:1003728
Created June 2, 2011 01:08
Tired of restarting netcat
#!/usr/bin/env python2
import subprocess
while True:
subprocess.call(['nc', 'localhost', '5206'])
#include <stdio.h>
#include <limits.h>
char* i_to_hex_a(int value, char* str) {
//convert a 32 bit value to hex counterpart
//assumes str is 9 characters long
int i;
int a;
for(i = 0; i < 8; i++){
var sys = require('sys');
var mongo = require('mongodb');
var db = new mongo.Db('nonexistant-db',
new mongo.Server('10.20.101.160',
27017, {
auto_reconnect: false
}));
db.open(function(err, db) {
@kcbanner
kcbanner / gist:1103199
Created July 24, 2011 22:40
Profiler Tests
#include "rtx_test.h"
#include "../rtx_inc.h"
#include "../lib/dbug.h"
#include "../lib/string.h"
/* third party dummy test process 1 */
void test1()
{
int t;
int i;
Texture2D::Texture2D(Resource* image,
GLenum wrapping_mode,
GLenum min_mag_filter):Texture(GL_TEXTURE_2D) {
unsigned error;
unsigned char* imageData;
unsigned w, h;
GLenum texture_format;
//
// Load PNG
#ifdef __MSP430G2452__
# include <msp430g2452.h>
#endif
#ifdef __MSP430G2231__
# include <msp430g2231.h>
#endif
#include <legacymsp430.h>
#if __GNUC__ > 4 || \
ExplosionComponent = class(nil, {});
function ExplosionComponent:OnInit(parentComponent)
self.uptime = 0;
self.parentComponent = parentComponent;
self.lightComponent = self.parentComponent:getLightComponent();
end
function ExplosionComponent:OnPreUpdate(dt)
self.uptime = self.uptime + dt;