Skip to content

Instantly share code, notes, and snippets.

@joshhartman
joshhartman / randomPassword.php
Last active July 7, 2024 09:12
Human Readable Password Generator (Requires PHP 7.1+)
<?php
function randomPassword( $len = 10, $ucfirst = true, $spchar = true ){
/* Programmed by Christian Haensel
* [email protected]
* http://www.chftp.com
*
* Exclusively published on weberdev.com.
* If you like my scripts, please let me know or link to me.
* You may copy, redistribute, change and alter my scripts as
* long as this information remains intact.
@jtbonhomme
jtbonhomme / jira-behing-nginx-ssl
Created September 26, 2015 07:49 — forked from alertor/jira-behing-nginx-ssl
Atlassian JIRA behind nginx + SSL
# force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf
server {
listen 80;
server_name jira.example.com;
access_log off;
return 301 https://$server_name$request_uri;
}
# /etc/nginx/conf.d/jira.conf
server {
@dashbad
dashbad / speedtest_tester.sh
Created June 30, 2016 00:33
Bash script to run speedtest-cli on freebsd (pfsense) and send results to influxdb
#!/usr/local/bin/bash
#This script requires speedtest-cli to function!!!!!!!!!!!!!!!!!!!!!!!
#Prepare to start the loop and warn the user
echo "Press [CTRL+C] to stop..."
#Store the speedtest results into a variable
results=$(/usr/local/bin/python2.7 /root/speedtest-cli --simple)
echo "$results"
@jdoss
jdoss / LUKS_and_TPM2_with_Fedora.md
Last active October 26, 2024 20:15
Decrypt LUKS volumes with a TPM on Fedora Linux

Decrypt LUKS volumes with a TPM on Fedora Linux

This guide allows you to use the TPM on your computer to decrypt your LUKS encrypted volumes. If you are worried about a cold boot attack on your hardware please DO NOT use this guide with your root volume!

Preflight Checks

Verify that you have a TPM in your computer:

# systemd-cryptenroll --tpm2-device=list
PATH DEVICE DRIVER