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 -o errexit | |
set -o nounset | |
set -o pipefail | |
set -o xtrace | |
if [[ $(cat /sys/firmware/efi/fw_platform_size) != 64 ]]; then | |
echo "ERROR: Bad fw_platform_size." | |
exit 1 |
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
sudo apt-get update | |
sudo apt-get install -y gnupg software-properties-common | |
wget -O- https://apt.releases.hashicorp.com/gpg | \ | |
gpg --dearmor | \ | |
sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg | |
gpg --no-default-keyring \ | |
--keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \ | |
--fingerprint |
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
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ ` | |
-Name ShowSecondsInSystemClock ` | |
-Value 1 |
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
" ------------------------------- " | |
" | Tab and Space Configuration | " | |
" ------------------------------- " | |
set tabstop=2 "Tab is 2 spaces in length." | |
set shiftwidth=2 "Indentation is 2 spaces in length." | |
set expandtab "Inserts space chars instead of tab." | |
set softtabstop=2 "Spaces in place of tabs still behave like tabs." | |
" ------------------------------ " |
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
#!/usr/bin/env bash | |
# download_book.sh | |
# - Downloads all chapters from the OSTEP website and creates a single PDF. | |
while read -r dest src; do | |
wget "$src" -O "$dest" & | |
done < files.txt | |
wait |
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
#!/usr/bin/env bash | |
# count_nginx_access.sh | |
sudo sudo awk '{print $1}' access.log | sort | uniq -c | sort -nr | less |
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
#!/usr/bin/env python3 | |
'''Sends a single byte payload to the specified IP address on UDP port 8080. | |
Should be run on the Intel Edison. | |
''' | |
import socket | |
# TARGET IP address should be that of the device you're running `server.py`. | |
TARGET = ('192.168.1.1', 8080) | |
MESSAGE = b'0' |