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 | |
# deal with pre-requisites | |
sudo apt update | |
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y | |
# install public signature for docker repo and setup repo | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.IO; | |
using System.IO.Compression; | |
using System.Text; | |
using System.Threading.Tasks; | |
public class TarGzExtractor | |
{ |
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
// tested with jQuery 3.x | |
$(document).ready(function(){ | |
$("[name^=entry]").each(function(){ | |
switch($(this).prop("type")) { | |
case "radio": | |
$(this).prop("checked", true); | |
break; | |
case "checkbox": | |
$(this).prop("checked", true); | |
break; |
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 | |
if [ "$#" -lt 1 ]; then | |
echo " | |
Command Syntax: | |
pfx2pem <cert> <optional:password> | |
" |
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 | |
# ************************************ | |
# * SETTINGS * | |
# ************************************ | |
FIREWALL_DYNDNS=""; | |
FIREWALL_GEOIP_ACCOUNT=""; | |
FIREWALL_GEOIP_LICENSE=""; | |
# Set value to 1 to install that feature. Otherwise set to 0 |
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 | |
# ************************************ | |
# * SETTINGS * | |
# ************************************ | |
FIREWALL_DYNDNS=""; | |
FIREWALL_GEOIP_ACCOUNT=""; | |
FIREWALL_GEOIP_LICENSE=""; | |
# Set value to 1 to install that feature. Otherwise set to 0 |
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
// API details | |
String APIKey = "xxxxxxx"; | |
String APISecret = "xxxxxxx"; | |
String APIEndpoint = "https://www.domain.com/api/"; | |
String APIVersion = "1.0"; | |
// an example API call | |
String action = "/client/authenticate/user/pass/0/xxxx" | |
// build complete API call |
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 | |
# set the dyndns name you want to allow access from | |
dyndns="testing.noip.me" | |
# set the domain you will be using | |
domain="testing.com" | |
# set the email address for letsencrypt | |
email="[email protected]" |
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 | |
/* Absolute path to the WordPress directory. */ | |
if ( !defined('ABSPATH') ) { define('ABSPATH', dirname(__FILE__) . '/'); } | |
/* Debug Mode */ | |
error_reporting(E_ALL); | |
@ini_set('display_errors', false ); | |
define( 'WP_DEBUG', false ); | |
define( 'WP_DEBUG_LOG', false ); | |
define( 'WP_DEBUG_DISPLAY', false ); |
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 | |
HPKP=`openssl x509 -in /etc/letsencrypt/live/"$1"/cert.pem -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64` | |
echo "<IfModule mod_headers.c>" | |
echo " Header Always set Strict-Transport-Security \"max-age=31536000; includeSubdomains; preload\" env=HTTPS" | |
echo " Header always set Public-Key-Pins \"pin-sha256=\\\"$HPKP\\\"; max-age=5184000" | |
echo "</IfModule>" |
NewerOlder