aws configure set preview.efs true
aws efs describe-file-systems --profile TEST --region us-east-2
{
| #!/usr/bin/env bash | |
| # Find the 10 largest files in a directory and transparently zip them | |
| for i in $(du -hsx * | sort -rh | head -10 | awk '{print $2}'); do gzip $i; done |
| #!/usr/bin/env bash | |
| mv $1{,.old} |
| #!/bin/bash | |
| printf '\e[31m *** This command will traverse subfolders ***\e[0m\n' | |
| printf '\e[31m *** and mount each ISO found and copy the contents ***\e[0m\n' | |
| printf '\e[31m *** to the directory of the ISO, then unmount the ISO ***\e[0m\n' | |
| printf '\e[31m *** and delete it permanently. ***\e[0m\n' | |
| read -r -p "Are you sure you would like to proceed? [y/N] " response | |
| case $response in | |
| [yY][eE][sS]|[yY]) |
| sudo curl -L https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl` | |
| sudo chmod a+rx /usr/local/bin/youtube-dl | |
| /usr/local/bin/youtube-dl -f mp4 -o "%(autonumber)s - %(title)s - %(id)s.%(ext)s" --autonumber-size 2 https://www.youtube.com/playlist?list=PLD409ujd87ZsfNMffX9h1rGNVqnC |
| #!/bin/bash | |
| set system static-host-mapping host-name headnode.localdomain.local alias headnode | |
| set system static-host-mapping host-name headnode.localdomain.local inet 10.10.1.50 |
| #!/bin/env bash | |
| # A script to quickly download the latest image of Open Source Joyent Triton SDC for USB "DC on a stick" servers | |
| # Check if aria2 is installed, otherwise, install it | |
| command -v aria2c >/dev/null 2>&1 || { sudo apt install -y aria2; exit 1; } | |
| # Download 5 streams of the file at once | |
| # I found 5 to be the maximum, each topping out around 300kb/s | |
| aria2c -x 5 https://us-east.manta.joyent.com/Joyent_Dev/public/SmartDataCenter/usb-latest.tgz --async-dns=false |
| #!/bin/bash | |
| ## The drive will need to be named "USB" | |
| ## It should be over 8GB large | |
| sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/USB --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction |
| #!/bin/bash | |
| # This script will check to see if a Docker image exists for a specific tag. | |
| # Taken from here, with love: https://www.reddit.com/r/docker/comments/4hwdma/check_if_an_image_tag_for_a_private_repo_exists/ | |
| TOKEN=$( curl -sSLd "username=${DOCKER_HUB_USERNAME}&password=${DOCKER_HUB_PASSWORD}" https://hub.docker.com/v2/users/login | jq -r ".token" ) | |
| curl -sH "Authorization: JWT $TOKEN" "https://hub.docker.com/v2/repositories/${DOCKER_REPO}/tags/${DOCKER_TAG}/" | jq . | |
| #{ | |
| # "name": "latest", | |
| # "id": 780668, |
| #!/bin/sh - | |
| kill -HUP $(cat /var/run/sshd.pid) |