Skip to content

Instantly share code, notes, and snippets.

View szepeviktor's full-sized avatar
🍓
Doing byte-level care

Viktor Szépe szepeviktor

🍓
Doing byte-level care
View GitHub Profile
@szepeviktor
szepeviktor / unzip.php
Last active August 29, 2015 13:55
unzip uploaded website zip - instead of file-by-file FTP upload
MOVED to: https://github.com/szepeviktor/wordpress-plugin-construction
@szepeviktor
szepeviktor / download_gists2.js
Last active December 16, 2021 15:47 — forked from thomastraum/download_gists.js
save all your Gists - written in node.js
#!/usr/bin/env node
//# prerequisites:
//# npm -g install request path
//# TODO: modify user agent string
var USER, savepath,
request = require('request'),
path = require('path'),
fs = require('fs'),
@szepeviktor
szepeviktor / ajax.googleapis.com_.htaccess
Last active August 29, 2015 13:56
bad robot catcher - "nofollow" and "disallow" trap
# put this in directory called /ajax.googleapis.com/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^ index.php [L]
</IfModule>
@szepeviktor
szepeviktor / wp-pass-change.php
Last active August 29, 2015 13:56
reset your own WordPress password
MOVED to: https://github.com/szepeviktor/wordpress-plugin-construction
@szepeviktor
szepeviktor / apache-autorestart.sh
Last active August 29, 2015 13:56
mini DDoS mitigation for Apache webserver - against HTTP floods
MOVED to: https://github.com/szepeviktor/debian-server-tools
@szepeviktor
szepeviktor / GeoIP-hu-IPrange.sh
Created February 27, 2014 00:46
Magyar IP cím tartomány generáló - maxmind.com & ip.ludost.net
#!/bin/bash
OUT="GeoIPhuWhois.txt"
OUT2="ip.ludost.txt"
if ! [ -f GeoIPCountryWhois.csv ]
then
wget -q http://geolite.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip
7z x GeoIPCountryCSV.zip > /dev/null
fi
@szepeviktor
szepeviktor / nginx-chroot-helper.sh
Last active August 10, 2016 10:51
nginx Chroot Helper Script To Copy Libs To /lib64 and /usr/lib64
#!/bin/bash
set -e
# Use this script to copy shared (libs) files to nginx chrooted
# jail server. This is tested on 64 bit Linux (Redhat and Friends only)
# ----------------------------------------------------------------------------
# Original Written by Vivek Gite <http://www.cyberciti.biz/>
# (c) 2006 nixCraft under GNU GPL v2.0+
# ----------------------------------------------------------------------------
# See url for usage:
@szepeviktor
szepeviktor / wp-setup.sh
Last active August 29, 2015 13:57
Setup client's WordPress installation
MOVED to: https://github.com/szepeviktor/wplib
use: wp-lib --root=/var/www/webroot/wordpress setup --secret
@szepeviktor
szepeviktor / allow-iptables-multiport.conf
Last active August 29, 2015 13:57
pass2allow - fail2ban filter and action to allow hosts to connect
# Fail2Ban configuration file for allowing hosts
#
#
[INCLUDES]
before = iptables-blocktype.conf
[Definition]
@szepeviktor
szepeviktor / mount-wp-cache.sh
Last active August 29, 2015 13:57
Move WordPress cache to memory, ram disk
MOVED to: https://github.com/szepeviktor/wplib