A quick and dirty SSL MiTM using stunnel
- Generate a SSL certificate .. or use Let's Encrypt (for the green lock)
openssl req -batch -new -x509 -days 365 -nodes -out mitm.pem -keyout mitm.pem- Run stunnel
| <?php | |
| /** | |
| * Extract key and value from all "define" constants in a wp-config.php file using built-in php tokenizer functions. | |
| * Does not "include" the file so it won't pollute the current scope or cause side effects. | |
| * | |
| * NOTE: Works with constants defined as string, bool or number | |
| * Method can extract values from statements like: | |
| * define( 'DB_NAME', 'wordpress' ); | |
| * define('WP_DEBUG', true); | |
| * define('SOMEINT', 1234567); |
| <?php | |
| namespace modules; | |
| use Craft; | |
| /** | |
| * MAMP Helper class. | |
| * File: /modules/MampHelper.php | |
| * | |
| * MySQL database backups triggered from the Craft 3 Control Panel fail because, |
| #!/usr/bin/env bash | |
| # exit 0 | |
| set -ex | |
| echo '##########################################################################' | |
| echo '##### About to run install-gnome-gui.sh script ##################' | |
| echo '##########################################################################' | |
| # https://codingbee.net/tutorials/vagrant/vagrant-enabling-a-centos-vms-gui-mode | |
| yum groupinstall -y 'gnome desktop' |
A quick and dirty SSL MiTM using stunnel
openssl req -batch -new -x509 -days 365 -nodes -out mitm.pem -keyout mitm.pem| #!/bin/bash | |
| U=${SUDO_USER:=${USER}} | |
| if [[ -x `which realpath` ]]; then | |
| T=$(realpath ${BASH_SOURCE[0]:=${0}}) | |
| else | |
| T=${BASH_SOURCE[0]:=${0}} | |
| fi | |
| D=$(dirname ${T}) | |
| #apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libtidy-dev libmemcached-dev imagemagick-dev msgpack-dev |
| <?php | |
| if(php_sapi_name()!=="cli"){ | |
| echo "Must be run from the command line."; | |
| }; | |
| /** | |
| * Setup a magento instance so we can run this export from the command line. | |
| */ |
| <?php | |
| /** | |
| * This is a simple script to invite users to your slack | |
| * Replace the subdomain and token in the variables below. | |
| * Upload a logo called "logo.png" to the same directory for your group | |
| * Upload a logo called "slack.png" to the same directory for slack | |
| */ | |
| define('SUBDOMAIN','{YOUR SUBDOMAIN HERE}'); | |
| define('TOKEN','{YOUR API TOKEN HERE}'); | |
| ?> |
| # Sets CORS headers for request from example1.com and example2.com pages | |
| # for both SSL and non-SSL | |
| SetEnvIf Origin "^https?://[^/]*(example1|example2)\.com$" ORIGIN=$0 | |
| Header set Access-Control-Allow-Origin %{ORIGIN}e env=ORIGIN | |
| Header set Access-Control-Allow-Credentials "true" env=ORIGIN | |
| # Always set Vary: Origin when it's possible you may send CORS headers | |
| Header merge Vary Origin |
| launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist | |
| sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist | |
| sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz | |
| sudo pkgutil --forget org.macosforge.xquartz.pkg | |
| # Log out and log in |
| # How to throttle the FCC to dial up modem speeds on your website using Apache. | |
| # Ported from https://gist.github.com/kyledrake/e6046644115f185f7af0 | |
| ## The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited | |
| ## | |
| ## Current known FCC address ranges: | |
| ## https://news.ycombinator.com/item?id=7716915 | |
| ## | |
| ## Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft |