Skip to content

Instantly share code, notes, and snippets.

@xserveraws
xserveraws / gist:2622e92ddc2a5cdeb0ab852e8d82d3f9
Created July 12, 2018 17:09
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
Windows 7 All Online/Offline [Retail-MAK] Activation Keys
=================================================================================
. Run "Command Prompt" as Administrator
. slmgr.vbs -ipk Product Key
. slui4
=================================================================================
Windows 7 Ultimate Retail Phone Activation Keys
RHTBY-VWY6D-QJRJ9-JGQ3X-Q2289
V77DJ-CT8WB-Y3GXT-X3FBP-6F987
JC7BV-94FD2-D86PH-XRMHR-BXKDG
@xserveraws
xserveraws / nginx.conf
Created May 28, 2018 05:26
WordPress+Plesk+Nginx Config
# Source: https://www.websavers.org/how-to-speed-up-wordpress/
rewrite !\.(js|ico|gif|jpg|png|css|pdf|mov|mp3|eot|svg|ttf|woff|otf|txt|swf)$ /index.php break;
rewrite /wp-admin/$ /wp-admin/index.php break;
rewrite /$ /index.php break;
# enable gzip compression
gzip on;
gzip_min_length 1100;
gzip_buffers 4 32k;
gzip_types text/plain application/x-javascript text/xml text/css;
@xserveraws
xserveraws / letsencrypt-hostname.sh
Created March 26, 2018 14:08 — forked from xgin/letsencrypt-hostname.sh
Secure plesk clean installation with hostname certificate by Let's Encrypt
#!/bin/bash -e
### Copyright 1999-2015. Parallels IP Holdings GmbH. All Rights Reserved.
### Secure plesk clean installation with hostname certificate by Let's Encrypt
export PYTHONWARNINGS="ignore:Non-standard path"
LE_HOME=${LE_HOME:-"/usr/local/psa/var/modules/letsencrypt"}
HOSTNAME=$(hostname)
# Use staging server for testing
# --server https://acme-staging.api.letsencrypt.org/directory
@xserveraws
xserveraws / remote-ip.php
Created March 17, 2018 21:53 — forked from dtbaker/remote-ip.php
Self hosted Dynamic DNS / No-IP script in PHP
<?php
/**
* Simple Dynamic DNS / No-IP script for Route53
*
* Setup:
* 1) Setup a new Route53 zone to hold your dynamic DNS records (e.g. dynamic.mywebsite.net)
* 2) Make sure this instance has permission to modify this Route53 zone (e.g. instance IAM profile, .aws credentials or ENV variables)
* 3) Upload this PHP script to your instance (make sure vendor files are availalbe by running: composer require aws/aws-sdk-php)
* 4) Put the allowed hostnames in the list below
location ~ /(?:a|A)utodiscover/(?:a|A)utodiscover.xml {
root /var/www/;
try_files /autodiscover/autodiscover.php =404;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_param SERVER_ADDR "";
fastcgi_param REMOTE_ADDR $http_x_real_ip;
}
@xserveraws
xserveraws / .gitignore
Created January 5, 2018 02:32
OpenMediaVault USB Write Minimisation
.*.sw?
@xserveraws
xserveraws / workaround-airmn-ng.sh
Created January 4, 2018 16:01 — forked from mtaziz/workaround-airmn-ng.sh
Workaround for airmon-ng on Kali Linux 2.0
# download compat wireless (compat-wireless-2010-06-26-p.tar.bz2)
# http://linuxwireless.org/download/compat-wireless-2.6/
cd ~/Downloads
ls
tar -jvxf compat-wireless-2010-06-26-p.tar.bz2
ls
cd compat-wireless-2010-06-26-p
make unload
make load
<!DOCTYPE html>
<html>
<head>
<title>DB-Convert</title>
<style>
body { font-family:"Courier New", Courier, monospace;" }
</style>
</head>
<body>
@xserveraws
xserveraws / squid-xff-log.conf
Created October 9, 2017 20:11 — forked from alvarow/squid-xff-log.conf
Sets Squid Proxy to log IP address from X-Forwarded-For header instead of the real client ip address if the X-Forwarded-For header exists.
# Has XFF header with a value
acl has-xff req_header X-Forwarded-For ^(([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)|(\[([0-9a-f]+)?:([0-9a-f:]+)?:([0-9a-f]+|0-9\.]+)?\]))
# default logformat
logformat squid %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
# default logformat using XFF instead of client IP address
logformat squid-xff %ts.%03tu %6tr %{X-Forwarded-For}>h %Ss/%03>Hs %<st %rm %ru %[un %Sh/%<a %mt
@xserveraws
xserveraws / README.md
Created September 24, 2017 17:27 — forked from e7d/README.md
[Debian] Setup a Squid anonymous proxy