Skip to content

Instantly share code, notes, and snippets.

View Dockerfile
# Usage:
#
# docker build . -t samp
# docker run --rm --name samp -v $PWD:/samp -it samp
FROM ubuntu:bionic
RUN apt-get update -q
RUN apt-get install -y \
gcc g++ gcc-multilib g++-multilib \
@Zeex
Zeex / forgot-docker.md
Last active Sep 6, 2018
Just some notes for myself in case I forget how to use Docker
View forgot-docker.md

Forgot how to use Docker again?

Test if Docker installation is working

docker run hello-world

Run an Ubuntu container and open shell

View mysql-r39-3-query-callbacks-in-filterscripts.patch
diff --git a/src/CCallback.cpp b/src/CCallback.cpp
index a358b40..6ef5a12 100644
--- a/src/CCallback.cpp
+++ b/src/CCallback.cpp
@@ -13,7 +13,7 @@
CCallback *CCallback::m_Instance = new CCallback;
-void CCallback::ProcessCallbacks()
+void CCallback::ProcessCallbacks()
@Zeex
Zeex / .atom-build.json
Last active Jan 10, 2016
Build Pawn scripts in Atom with https://atom.io/packages/build
View .atom-build.json
{
"cmd": "pawncc",
"args": [
"-i$SAMP_SERVER_ROOT/plugins/crashdetect/include",
"-i$SAMP_SERVER_ROOT/plugins/jit/include",
"-i$SAMP_SERVER_ROOT/plugins/profiler/include",
"-i$SAMP_SERVER_ROOT/include",
"-i$SAMP_SERVER_ROOT/include/amx_assembly",
"-i$SAMP_SERVER_ROOT/include/YSI",
"-i$SAMP_SERVER_ROOT/include/YSI/YSI",
View big_enum.py
import string
import random
import sys
import uuid
print("""
#include <a_samp>
enum e {
a,
View 65k.py
#!/usr/bin/env python
import sys
if len(sys.argv) > 1:
num_lines = int(sys.argv[1])
else:
num_lines = 2**16
print("""
View float_bug.pwn
#include <a_samp>
test1() {
new Float:a = 1.5;
a += 16;
printf("%f (%08x)", a, a);
}
test2() {
new Float:a = 1.5, b = 16;
View samp-env
#!/bin/bash
me="$(basename "${BASH_SOURCE[0]}")"
my_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SAMP_SERVER_ROOT=$my_dir
export SAMP_SERVER=$SAMP_SERVER_ROOT/samp03svr
export SAMP_SDK_ROOT=$SAMP_SERVER_ROOT/plugins/sdk
export PATH=$PATH:$SAMP_SERVER_ROOT/cli:$SAMP_SERVER_ROOT/pawn/build/linux
View configure.bat
@echo off
set CMAKE_HOME="%ProgramFiles%\CMake 2.8\"
if exist %CMAKE_HOME% ( goto :cmake_found )
set CMAKE_HOME="%ProgramFiles(x86)%\CMake 2.8\"
if exist %CMAKE_HOME% ( goto :cmake_found )
echo Could not find CMake
goto :exit
View xmastree.cpp
// Example of using Incognito's streamer plugin
//
// Map: Karlip's Christmas Tree
// http://forum.sa-mp.com/showthread.php?t=58588
#include <sampgdk/a_players.h>
#include <sampgdk/a_samp.h>
#include <sampgdk/core.h>
#include <sampgdk/interop.h>
#include <sampgdk/sdk.h>