Skip to content

Instantly share code, notes, and snippets.

View zabustak's full-sized avatar
💭
I may be slow to respond.

Zabustak Narvorsky zabustak

💭
I may be slow to respond.
View GitHub Profile
@zabustak
zabustak / ddos.conf
Created December 24, 2022 22:47 — forked from mattia-beta/ddos.conf
IPtables DDoS Protection for VPS
### 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 ###
@zabustak
zabustak / index.html
Created May 16, 2020 03:58 — forked from leowebguy/index.html
Responsive iframe full screen. Display page without and hide original url address.
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<style>
html body {width: 100%;height: 100%;padding: 0px;margin: 0px;overflow: hidden;font-family: arial;font-size: 10px;color: #6e6e6e;background-color: #000;} #preview-frame {width: 100%;background-color: #fff;}</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
//function to fix height of iframe!
var calcHeight = function() {
@zabustak
zabustak / Upload.ps1
Created April 21, 2020 01:33 — forked from harnerdesigns/Upload.ps1
A PowerShell script to upload via FTP a directory one file at a time. I basically got tired of having to open FileZilla and wait for it to connect and then waiting for everything to upload.
#Directory To Pull Files From
$Dir="C:\foo\bar\toBeUploaded"
#FTP site and credentials
$ftp = "ftp://ftp.somesite.com/"
$user = "user"
$pass = "pass"
$webclient = New-Object System.Net.WebClient
$webclient.Credentials = New-Object System.Net.NetworkCredential($user,$pass)
@zabustak
zabustak / my.cnf
Last active November 26, 2020 10:33 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated January 2020 ~
#
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
Serial Keys:
FU512-2DG1H-M85QZ-U7Z5T-PY8ZD
CU3MA-2LG1N-48EGQ-9GNGZ-QG0UD
GV7N2-DQZ00-4897Y-27ZNX-NV0TD
YZ718-4REEQ-08DHQ-JNYQC-ZQRD0
GZ3N0-6CX0L-H80UP-FPM59-NKAD4
YY31H-6EYEJ-480VZ-VXXZC-QF2E0
ZG51K-25FE1-H81ZP-95XGT-WV2C0
VG30H-2AX11-H88FQ-CQXGZ-M6AY4
@zabustak
zabustak / PHPMySqlMassEmailer.php
Created November 18, 2019 22:00 — forked from IftiMahmud/PHPMySqlMassEmailer.php
PHP Script to send mass email. This script will take subscribers emails from MySql database and send them bulk emails. Comes with Unsubscriber script.
<?php
//SOURCE: http://thedigilife.com/bulk-email-script-in-php-and-mysql-database/
$con = mysql_connect("localhost","dbuser","dbpass"); // replace dbuser, dbpass with your db user and password
mysql_select_db("dbname", $con); // replace dbname with your database name
/*
To use this script database table must have three fields named sno, email and sub_status
*/
$query = "select sno, email from dbtable where sub_status = 'SUBSCRIBED'";
$result = mysql_query($query, $con);
$emails = array();
@zabustak
zabustak / csgo-server-guide.md
Created October 25, 2019 00:08 — forked from fanjin-z/csgo-server-guide.md
Complete Guide for Hosting CS:GO Dedicated Servers

Complete Guide for Hosting a CS:GO Dedicated Server

Creative Commons License.

I tested the setup on Debian Stretch (naive installation) and Jessie (LinuxGSM installation). The setup should work on Debian 8 (Jessie), Debian 9 (Stretch) and Ubuntu (16.04). However, If you're running on Windows or other non-debian based Linux OS (e.g. CentOS, openSUSE), this guide doesn't apply to you.

My Servers:

I'm hosting FFA warm-up and HvH(soon) servers in San Francisco, welcome to join by:

IPv4: 159.89.154.137   
Ipv6: 2604:a880:2:d0::20ad:2001 
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 1dd66d7699..8683884b25 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -350,6 +350,40 @@ void CreatureAI::SetBoundary(CreatureBoundary const* boundary, bool negateBounda
me->DoImmediateBoundaryCheck();
}
+bool CreatureAI::CheckMeleeRepositionRequirements()
+{
@zabustak
zabustak / Ultimate_Duel_Script.cpp
Created May 9, 2019 11:31 — forked from callmephil/Ultimate_Duel_Script.cpp
[V1.4] Ultimate Duel Script
/*
Ultimate Duel Script (Reward/Rating/Security/Zoned & Reset)
Author : Philippe
Version : V1.4 (Full Rewrite)
Release Date : 21/03/14
Script Complete : 80 %
Version : 3.3.5 & 4.3.4
TrinityCore based.
Tested and Works Well.
@zabustak
zabustak / gist:2ee8da01f54a51a72609131b8e5a68c1
Created April 14, 2019 13:51 — forked from irancore/crossfaction.patch
Crossfaction Battlegrounds For Last Revision Trinity
From 05af526143c365d0af4ee43408a79b0957bbe2cd Mon Sep 17 00:00:00 2001
From: irancore <amir.cinderella@gmail.com>
if you need last update contact us : +989154422565 or https://t.me/dev21712
Date: Sat, 23 Sep 2017 17:52:39 +0330
Subject: [PATCH] crossfaction battleground
---
sql/av_fix.sql | 3 +
src/server/database/Database/MySQLConnection.cpp | 4 +-
src/server/game/Battlegrounds/Arena.cpp | 4 +-