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 / 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();
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 / 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.
#
@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 / 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 / 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 ###