Skip to content

Instantly share code, notes, and snippets.

View Nadrin's full-sized avatar

Michał Siejak Nadrin

View GitHub Profile
@Nadrin
Nadrin / ABI
Created April 6, 2012 11:42 — forked from 0xabad1dea/ABI
0x10c Programming Notes
On April 5 2012, #0x10c-dev agreed to the following standard ABI:
- Registers A, B, C are clobberable across calls
- Registers I, J, X, Y, Z are preserved across calls
- Return in A
- J is used for base stack pointer (preserving the value of SP before allocating data for locals)
@Nadrin
Nadrin / boot.log
Created February 12, 2012 14:29
ASUS RTN-16 booting
CFE version 1.0.37 for BCM947XX (32bit,SP,LE)
Build Date: ¤T 5¤ 27 16:47:24 CST 2009 (root@localhost.localdomain)
Copyright (C) 2000-2008 Broadcom Corporation.
Init Arena
Init Devs.
Boot partition size = 262144(0x40000)
et0: Broadcom BCM47XX 10/100/1000 Mbps Ethernet Controller 5.10.56.3
CPU type 0x19740: 480MHz
Tot mem: 131072 KBytes
@Nadrin
Nadrin / nvclgl.c
Created December 10, 2011 12:46
nvidia_clgl_interop
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use, reproduction, disclosure, or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*
*/
@Nadrin
Nadrin / suma.c
Created December 5, 2011 13:32
Suma kolumn
#include <stdio.h>
#define N 3
#define M 2
int main(int argc, char** argv)
{
int H[N][M];
int i,j, sum;
@Nadrin
Nadrin / 0001-local-clist.patch
Created October 24, 2011 15:02
BitlBee libpurple local contact list patch
=== modified file 'protocols/account.c'
--- protocols/account.c 2010-11-21 19:34:59 +0000
+++ protocols/account.c 2011-10-24 11:28:52 +0000
@@ -27,6 +27,10 @@
#include "bitlbee.h"
#include "account.h"
+static const char* account_protocols_local[] = {
+ "gg", NULL
+};
@Nadrin
Nadrin / glx.c
Created October 1, 2011 21:00
OpenGL init on Linux
// Quick and dirty OpenGL 4.x <-> OpenCL interop test
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <GL/glew.h>
#include <GL/glxew.h>
void init_glx(void)
@Nadrin
Nadrin / startvpn.c
Created July 25, 2011 22:37
The joys of WinAPI!
// Simple OpenVPN launcher
// (C) 2011 Michał Siejak
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <ShellAPI.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
WCHAR szFileName[MAX_PATH];
@Nadrin
Nadrin / mcproxy.log
Created June 27, 2011 21:30
mcproxy libserverlog output
[2011-06-27 21:44:15] (0215) Client connected from 24.180.175.181 on port 59231
[2011-06-27 21:44:17] (0215) Player logged in: riscx <normal> (with entity ID 583304)
[2011-06-27 21:44:17] (0215) Player riscx spawned in: world
[2011-06-27 21:46:13] (0214) Player jormungandr5 took 34x Gold Ingot (266) from Chest near world:[276.59,78.00,297.60]
[2011-06-27 21:46:14] (0214) Player jormungandr5 took 3x Diamond (264) from Chest near world:[276.59,78.00,297.60]
[2011-06-27 21:46:15] (0214) Player jormungandr5 took 21x TNT (46) from Chest near world:[276.59,78.00,297.60]
[2011-06-27 21:46:20] (0214) Player jormungandr5 took 36x Iron Ingot (265) from Chest near world:[276.59,78.00,297.60]
[2011-06-27 21:53:51] (0207) Player BooGotShot used Water bucket (326) at nether:[-3,56,4]
[2011-06-27 21:57:46] (0215) Player riscx took 44x Iron Ingot (265) from Chest near world:[-771.45,5.00,373.05]
[2011-06-27 21:58:04] (0215) Player riscx took 1x Iron Ingot (265) from Chest near world:[-771.47,5.00,373.14]
@Nadrin
Nadrin / interrupts
Created June 24, 2011 14:40
Interrupt table
masterm@whitestar:~$ cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7
0: 63 0 0 0 0 0 0 0 IO-APIC-edge timer
1: 2 0 0 0 0 0 0 0 IO-APIC-edge i8042
8: 1 0 0 0 0 0 0 0 IO-APIC-edge rtc0
9: 0 0 0 0 0 0 0 0 IO-APIC-fasteoi acpi
12: 4 0 0 0 0 0 0 0 IO-APIC-edge i8042
16: 422828 0 0 0 0 0 0 0 IO-APIC-fasteoi nvidia, eth0
17: 57634 0 0 0 0 0 0 0 IO-APIC-fasteoi firewire_ohci, hda_intel, nvidia
18: 242
@Nadrin
Nadrin / settings.c
Created June 15, 2011 22:37
config table
gchar* config[] = {
"operators", "ops.txt", NULL,
"whitelist", "white-list.txt", NULL,
"banned", "banned-players.txt", NULL,
"logfile", "logins.log", NULL,
"motd", "motd.txt", NULL,
"whitelist_msg", "You are not on the whitelist!", NULL,
"banned_msg", "You are banned on this server!", NULL,
NULL,
};