Skip to content

Instantly share code, notes, and snippets.

@l1am9111
l1am9111 / clientaway.cpp
Last active January 2, 2016 08:09
clientaway with auto away for specific ips
/*
* Copyright (C) 2004-2012 See the AUTHORS file for details.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
* by the Free Software Foundation.
*/
#include <znc/Modules.h>
#include <znc/User.h>
@l1am9111
l1am9111 / youtube.js
Created March 22, 2013 18:18
YouTube Enhancer
// <![CDATA[
// ==UserScript==
// @name YouTube Enhancer
// @fullname YouTube Enhancer
// @description Download Link + Quality Selector + Rollover Preview + Media Controller + Media Resizer + More...
// @homepage http://userscripts.org/scripts/show/33042
// @icon http://s3.amazonaws.com/uso_ss/icon/33042/large.PNG?1245499122
// @updateURL http://userscripts.org/scripts/source/33042.meta.js
// @downloadURL http://userscripts.org/scripts/source/33042.user.js
// @author GIJoe
@l1am9111
l1am9111 / sares.cpp
Created January 5, 2012 18:59
Allow higher resolutions on GTA: San Andreas
// cl sares.cpp -LD user32.lib kernel32.lib -link -entry:DllMain /out:sares.asi
#include <windows.h>
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
if(ul_reason_for_call == DLL_PROCESS_ATTACH)
{
DWORD oldProt;
VirtualProtect((LPVOID)0x401000, 0x4A3000, PAGE_EXECUTE_READWRITE, &oldProt);
*(WORD *)0x745BC9 = 0x9090;
@l1am9111
l1am9111 / sapaths.py
Created October 19, 2011 20:51
Python GTA: SA Path Reader
from struct import unpack
from cStringIO import StringIO
class SAPath():
def __init__(self, node):
self.path = StringIO(open(node, "rb").read())
self.header = {}
self.pathnodes = []
self.navinodes = []
self.links = []
@l1am9111
l1am9111 / query.py
Created November 29, 2010 18:30
SA-MP Query class for python
from samp import Query, Rcon
import sys
ip = "127.0.0.1"
port = 7777
if len(sys.argv) >= 3:
ip = str(sys.argv[1])
port = int(sys.argv[2])
query = Query(ip, port)