amazon.com
media-amazon.com
amazonvideo.com
aiv-cdn.net
pv-cdn.net
aiv-delivery.net
akamaihd.net
ssl-images-amazon.com
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
TRANSFER_DOMAIN_NAME='example.com' | |
ACCOUNT_A=1234567890 | |
ACCOUNT_B=2345678901 | |
# Setup profiles to auth with each account | |
aws configure --profile ACCOUNT_A | |
aws configure --profile ACCOUNT_B | |
# List the domain names registered in account a | |
aws route53domains list-domains --profile ACCOUNT_A |
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
# rotate the current framebuffer | |
echo 1 | sudo tee /sys/class/graphics/fbcon/rotate | |
# rotate all framebuffers | |
echo 1 | sudo tee /sys/class/graphics/fbcon/rotate_all | |
# Permanantly rotate framebuffer for headless server | |
echo 'GRUB_CMDLINE_LINUX="fbcon=rotate:1"' | sudo tee /etc/default/grub | |
sudo update-grub | |
sudo reboot |
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
pets = [ | |
{ | |
'id': '5460b046-5ed4-11ed-9b6a-0242ac120002', | |
'group': 'dog', | |
'type': 'German Shepherd', | |
'large': True, | |
}, | |
{ | |
'id': '90c5b2ca-5ed4-11ed-9b6a-0242ac120002', | |
'group': 'cat', |
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
import json | |
# default=str is useful since it will cast certain objects to string that otherwise aren't json parsable, such as datetime dates. | |
print(json.dumps(domains, indent=4, sort_keys=True, default=str)) |
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
lsblk -f -e7 -e11 # View disk paths | |
sudo apt install exfat-fuse exfatprogs | |
sudo mkfs.exfat -n DISK_LABEL /dev/sdX # Update this with correct path |
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
# This is for a Plex server | |
# ext4 is better than exFat since it can deal with normal linux file/directory permission | |
lsblk -f -e7 -e11 # List disk paths | |
sudo mkfs -t ext4 /dev/sdX # Replace with correct path |
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
# Will merge all zip files in the current directory into a single zip file merged.zip | |
mkdir merged | |
for x in *.zip ; do unzip -d merged -o -u $x ; done | |
zip -r merged.zip merged |
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
# In the reposityroy root | |
npm i typescript --save-dev | |
npx tsc --init | |
# create index.ts | |
# Update package.json with the following, | |
"scripts": { | |
"start": "node dist/index.js", | |
"build": "npx tsc --outDir dist" |
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
# The reason why I wanted to do this was because I had a striped pool (a pool with no mirroring/redundancy) and | |
# I wanted to convert it to a mirror pool which is not possible through the GUI (it is a bit complex via shell commands). | |
# My solution was to copy the data from the striped pool to a temporary holding pool (a random disk that I had lying around) | |
# and then recreate the pool as a mirrored pool and copy the snapshot back. | |
# Start a tmux session so that the shell session will persist even when you close the shell | |
tmux | |
# Create a snapshot of pool_A that contains the data that you want moved to pool_B | |
zfs snapshot -r pool_A@migrate |