This file contains hidden or 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 | |
| function main() | |
| { | |
| monitor_from_file $* | |
| } | |
| function monitor_vpn_ip_port() | |
| { | |
| local CONN_NAME=$1 |
You can download whole courses from an array of tutorial sites with the CLI tool youtube-dl. In the example further down I'm using my Pluralsight account to get videos from a course at their site. Here is a list of all supported sites that you can download from with this tool
The flags you have to supply may vary depending on which site you make a request to.
You can get a free 3 month trial to Pluralsight by signing up for free to Visual Studio Dev Essentials
This file contains hidden or 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
| # 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 |
This file contains hidden or 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
| # Source it on .bash_profile | |
| # run with "encrypt a.file" or "decrypt a.file.aes-128-cbc" | |
| # You can adjust encryption cipher (say aes-256-cbc) to your needs | |
| function encrypt() { | |
| if [ $# -eq 0 ]; then | |
| echo "Provide a filename to encrypt" | |
| exit 1 | |
| fi | |
| # SHA256 the given file | |
| openssl dgst -sha256 "$1" > "$1.sha256" |