Skip to content

Instantly share code, notes, and snippets.

@Zeex
Zeex / .vimrc
Last active September 29, 2015 18:37
.vimrc
syntax on
filetype plugin on
filetype indent on
set nocompatible
set nobackup
set autochdir
set cursorline
set number
set ignorecase
@Zeex
Zeex / compile-fs
Created January 28, 2012 17:01
shell scripts for easy compiling
#!/bin/sh
me=`basename $0`
if [ $# -ne 1 ]; then
echo "Usage: $me <filterscript>"
echo "Example: $me fsdebug"
exit
fi
@Zeex
Zeex / jit.c
Created February 13, 2012 16:33
#include <assert.h>
#include <stddef.h> /* for size_t */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined LINUX
#include <sys/mman.h>
#else
#include <Windows.h>
// 48. Целочисленное линейное программирование. Заданы целочисленная матрица A,
// целочисленные векторы a,b. Нужно найти вектор x из нулей и единиц такой,
// что Ax<b и велична ax максимальна.
#include <assert.h>
#include <math.h>
#include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
package persons;
public class Person {
private String firstName = "";
private String lastName = "";
private String address = "";
private String phone = "";
public Person() {
@Zeex
Zeex / qlzeex.cfg
Last active November 7, 2020 15:48
Quake Live config
unbindall
model "razor/default"
// Weapon bindings
bind c "weapon 1; seta cg_drawCrosshair 7"
bind q "weapon 2; seta cg_drawCrosshair 2"
bind a "weapon 3; seta cg_drawCrosshair 4"
bind g "weapon 4; seta cg_drawCrosshair 8"
bind r "weapon 5; seta cg_drawCrosshair 7"
@Zeex
Zeex / heap-defender.cpp
Created June 20, 2012 15:07
heap underflow detector
#include <string>
#include <vector>
#include <Windows.h>
#include "SDK/plugin.h"
#include "jump-x86.h"
typedef void (*logprintf_t)(const char *format, ...);
static logprintf_t logprintf;
#include <idc.idc>
static main() {
GetNatives();
}
static FindNativeNameAddr(name) {
auto addr;
addr = FindText(0, SEARCH_DOWN | SEARCH_CASE, 0, 0, name);
while (addr != BADADDR) {
@Zeex
Zeex / .vcxproj.user
Created July 1, 2012 13:05
Visual Studio 2010+ project settings for plugin debugging
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerCommand>$(SAMP_SERVER_ROOT)\samp-server.exe</LocalDebuggerCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LocalDebuggerWorkingDirectory>$(SAMP_SERVER_ROOT)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@echo off
set PATH=%PATH%;"%ProgramFiles%\Microsoft Visual Studio 10.0\VC\bin"
call vcvars32
cl plugin.c /FAc /c
pause