Skip to content

Instantly share code, notes, and snippets.

View maanimis's full-sized avatar
💬

Meisam Maani maanimis

💬
View GitHub Profile
@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;
#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 May 23, 2025 12:54
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.

@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
@montanaflynn
montanaflynn / CONCURRENCY.md
Last active November 7, 2024 18:22
Examples of sequential, concurrent and parallel requests in node.js

Concurrency in JavaScript

Javascript is a programming language with a peculiar twist. Its event driven model means that nothing blocks and everything runs concurrently. This is not to be confused with the same type of concurrency as running in parallel on multiple cores. Javascript is single threaded so each program runs on a single core yet every line of code executes without waiting for anything to return. This sounds weird but it's true. If you want to have any type of sequential ordering you can use events, callbacks, or as of late promises.

@savely-krasovsky
savely-krasovsky / README.md
Last active December 3, 2024 19:58
Telegram webhooks with nginx reverse proxy

Make config file:

sudo nano /etc/nginx/sites-available/bot.conf

Then copy and paste bot.conf content and edit YOUR.DOMAIN strings. Now install Let's Encrypt on your server. For example in Debian you need to add jessie-backports and easily install it with apt-get:

sudo apt-get install -t jessie-backports letsencrypt

Then get cert for you domain: