Skip to content

Instantly share code, notes, and snippets.

@Zeex
Zeex / OpenGitShellHere.reg
Created January 24, 2013 14:05
Open Git shell via Explorer context menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\git_shell]
@="Open &Git shell here"
"Icon"=hex(2):43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,\
00,46,00,69,00,6c,00,65,00,73,00,5c,00,47,00,69,00,74,00,5c,00,65,00,74,00,\
63,00,5c,00,67,00,69,00,74,00,2e,00,69,00,63,00,6f,00,00,00
[HKEY_CLASSES_ROOT\Directory\shell\git_shell\command]
@="wscript \"C:\\Program Files\\Git\\Git Bash.vbs\" \"%V\""
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\powershell]
@="Open PowerShell here"
"Icon"="%SystemRoot%\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\Directory\shell\powershell\command]
@="C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\powershell.exe"
[HKEY_CLASSES_ROOT\Directory\background\shell\powershell]
/* Abstract Machine for the Pawn compiler, debugger support
*
* This file contains extra definitions that are convenient for debugger
* support.
*
* Copyright (c) ITB CompuPhase, 2005-2006
*
* This software is provided "as-is", without any express or implied warranty.
* In no event will the authors be held liable for any damages arising from
* the use of this software.
@Zeex
Zeex / callnative.cpp
Last active December 15, 2015 06:39
CallNative()
#include <cstring>
#include <sampgdk/amx.h>
#include <sampgdk/core.h>
cell CallNative(AMX *amx, AMX_NATIVE native, int num_params) {
int params_size = num_params * sizeof(cell);
amx_Push(amx, params_size);
cell *params;
amx_GetAddr(amx, amx->stk, &params);
@Zeex
Zeex / GroupTargetSources.cmake
Last active June 3, 2021 12:00
group_target_sources(target) - group target's source files on based on their directory.
# group_target_sources(target) - group target's source files on based on
# their directory.
function(group_target_sources target)
get_target_property(sources ${target} SOURCES)
foreach(file ${sources})
get_filename_component(path "${file}" ABSOLUTE)
get_filename_component(path "${path}" PATH)
if(file MATCHES "${PROJECT_BINARY_DIR}")
file(RELATIVE_PATH path ${PROJECT_BINARY_DIR} "${path}")
; amxplugin.asm - a rewrite of amxplugin.cpp in asm
; Copyright (c) 2011 Zeex
global _PluginInit
global _amx_Align16
global _amx_Align32
global _amx_Align64
global _amx_Allot
global _amx_Callback
global _amx_Clone
@Zeex
Zeex / Preferences.sublime-settings
Last active December 17, 2015 06:08
Sublime Text 2 preferences
{
"rulers": [80, 100, 120],
"auto_match_enabled": false,
"font_face": "Consolas",
"font_size": 12.0,
"line_numbers": true,
"word_wrap": false,
"wrap_width": 0,
"hot_exit": false,
"remember_open_files": false,
@Zeex
Zeex / backtrace.inc
Last active December 22, 2015 01:19
CaptureBacktraceAsync() function
// Capturing AMX backtrce printed by CrashDetect to a string.
// Requires fixes2 plugin by Y_Less: http://forum.sa-mp.com/showthread.php?t=375925
#include <a_samp>
#if !defined MAX_PUBLIC_NAME
#define MAX_PUBLIC_NAME 32 // compiler-enforced limit
#endif
#if !defined MAX_BACKTRACE_LENGTH
#define MAX_BACKTRACE_LENGTH 10240
@Zeex
Zeex / osm.cpp
Last active December 22, 2015 02:18
OSM plugin (reproduces fixes2's OnServerMessage functionality)
// Copyright (c) 2013, Zeex
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
@Zeex
Zeex / pawnc.dif
Created September 17, 2013 14:54
NOP out max. stack size estimation in the Pawn compiler (use this to patch pawnc.dll with ida_patcher)
This difference file is created by The Interactive Disassembler
pawnc.dll
00002B50: 51 8B
00002B51: 8B 44
00002B52: 03 24
00002B53: 33 04
00002B54: C9 C7
00002B55: 85 00
00002B56: C0 00