Skip to content

Instantly share code, notes, and snippets.

@bartku
bartku / gist:1046488
Created June 25, 2011 13:31
Logs functions names called by ProcessRemoteFunction
#include "stdafx.h"
#include <detours.h>
#include <tchar.h>
#pragma comment(lib, "detours.lib")
#pragma comment(lib, "detoured.lib")
// ?ProcessRemoteFunction@AActor@@UAEHPAVUFunction@@PAXPAUFFrame@@@Z
// public: virtual int __thiscall AActor::ProcessRemoteFunction(class UFunction *,void *,struct FFrame *)
@bartku
bartku / gist:1104817
Created July 25, 2011 18:34
Logs users joining server (name, IP, GUID, MAC, experience points)
#include "stdafx.h"
#include "misc.h"
#include <detours.h>
#include <tchar.h>
#pragma comment(lib, "detours.lib")
#pragma comment(lib, "detoured.lib")
struct player_data {
FString guid;
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
#include <windows.h>
#include <detours.h>
class CDetour
{
public:
bool My_MemFn(unsigned int unk1);
static bool (CDetour::* Real_MemFn)(unsigned int);
};
@indexzero
indexzero / ssh2-tunnel.js
Last active February 4, 2024 05:47
Thoughts about SSH tunnellng using `ssh2`
var fs = require('fs'),
path = require('path');
Connection = require('ssh2');
var tunnelHost = process.argv[2],
dest = process.argv[3],
keyfile = process.argv[4];
var conn = new Connection();
@bhurlow
bhurlow / tunnel.js
Created May 7, 2013 19:56
proxy tunnel
var http = require('http');
var net = require('net');
var url = require('url');
var proxy = http.createServer();
// proxy an HTTP request
proxy.on('request', function(req, res){
var uri = url.parse(req.url);
@denji
denji / nginx-tuning.md
Last active April 1, 2026 14:41
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@justecorruptio
justecorruptio / 2048.c
Created April 4, 2014 03:49
Tiny 2048 in C!
M[16],X=16,W,k;main(){T(system("stty cbreak")
);puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i
,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M
[w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<<
(l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k)
]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d
-1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X]
*i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4;
)s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4||
puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2
@Fonger
Fonger / gist:d2e7f8d67292c2d9585e
Created April 4, 2015 07:38
NimoHS.cpp (Deprecated HackShield CRCBypass DLL)
// =========================================================
// Name: NimoHS v1.0 Bypass AhnLab HackShield 5.2.8.893
// Date: November 1, 2009
// Author: nimo1993
// =========================================================
#include "stdafx.h"
#include "conio.h"
@notmike101
notmike101 / patch.cpp
Created November 10, 2015 19:49
HeroHacks Patcher Program
/*
HeroHacks Loader Patch
Patches the HeroHacks loader using detours on the winsock functions
send and recv in order to fake the correct response, allowing for
full use of the hack.
Written by _DeNy.
Time: 5 hours (Mostly due to lazyness and working on this off-and-on)
Date: 3/16/2013