Skip to content

Instantly share code, notes, and snippets.

@punkice3407
punkice3407 / zone-system-en.md
Created October 29, 2023 18:19 — forked from lyuz1n/zone-system-en.md
Zone System

Zone System

If you are curious about use cases, here are some features that were developed using the Zone System: https://github.com/lyuz1n/zone-system-features/tree/main

011


Zone System is a revolutionary tool that makes it possible to determine specific zones for specific actions, being possible to manipulate within the zone, all creatures, tiles and positions.

@punkice3407
punkice3407 / iptables.sh
Created February 24, 2023 01:34 — forked from einyx/iptables.sh
Anti DDos kernel settings
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###
@punkice3407
punkice3407 / convert.js
Created March 23, 2022 04:47 — forked from peonso/convert.js
convert maps to OpenTibia Sprite Pack
// A tool to convert OpenTibia maps to https://github.com/peonso/opentibia_sprite_pack
// by Peonso
// dependencies NodeJS and https://github.com/Inconcessus/OTBM2JSON
// node --max-old-space-size=4096 convert.js
var start = Date.now();
const otbm2json = require("./OTBM2JSON/otbm2json");
const OLD_MUDWALLS = [356,357,358,359,360,361,362,363,364,365,366,367,371,372,373,374,375,376,377,378,379,380,381,382];
const OLD_MUDTILE = 351;
@punkice3407
punkice3407 / README.md
Created November 21, 2021 01:09 — forked from Lazza/README.md
VPNGate Python script

vpngate.py

This script allows to use the free VPN service provided by VPNGate in an easy way. The user just needs to provide the desidered output country, and the script automatically chooses the best server.

After this step, OpenVPN is launched with the proper configuration. The VPN can be terminated by pressing Ctrl+C.

Usage

Run the script by providing the desired output country:

@punkice3407
punkice3407 / fbclid.htaccess
Created November 14, 2021 21:20 — forked from lynt-smitka/fbclid.htaccess
Remove fbclid argument from the URL in .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(.*?)(&?fbclid=[a-zA-Z0-9_-]+)$
RewriteRule ^(.*)$ /$1?%1 [L,NE,R=301]
</IfModule>
@punkice3407
punkice3407 / boost-windows.md
Last active January 17, 2019 13:06 — forked from sim642/boost-windows.md
Installing boost libraries for GCC (MinGW) on Windows

Installing boost libraries for GCC (MinGW) on Windows

Folder setup

  1. Extract downloaded boost source, e.g. C:\Program Files\boost_1_59_0.
  2. Create a folder for Boost.Build installation, e.g. C:\Program Files\boost-build.
  3. Create a folder within for building, i.e. C:\Program Files\boost_1_59_0\build.
  4. Create a folder for installation, e.g. C:\Program Files\boost.

GCC setup

  1. Open Command Prompt.
@punkice3407
punkice3407 / buypoints.php
Created February 10, 2018 16:46 — forked from Znote/buypoints.php
Znote AAC Paypal REST API prototype
<?php require_once 'engine/init.php';
protect_page();
// Import from config:
$pagseguro = $config['pagseguro'];
$paypal = $config['paypal'];
$prices = $config['paypal_prices'];
// Begin processing paypal transaction request
if (empty($_POST) === false) {
@punkice3407
punkice3407 / SecondstoClock
Created December 23, 2017 21:53
Lua function to convert seconds to a clock string
function SecondsToClock(seconds)
local seconds = tonumber(seconds)
if seconds <= 0 then
return "00:00:00";
else
hours = string.format("%02.f", math.floor(seconds/3600));
mins = string.format("%02.f", math.floor(seconds/60 - (hours*60)));
secs = string.format("%02.f", math.floor(seconds - hours*3600 - mins *60));
return hours..":"..mins..":"..secs