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/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 |
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 | |
| ## 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 |
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 | |
| # 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, |
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/sh - | |
| kill -HUP $(cat /var/run/sshd.pid) |
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 | |
| # Profile and Region are optional | |
| aws efs describe-file-systems --profile dev --region us-east-1 | jq -r ".FileSystems[] | .FileSystemId" |
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 | |
| sudo touch "/Library/Preferences/VMware Fusion/promiscAuthorized" |
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
| cat /config/dhcpd.leases | grep -E '(lease|client-hostname)' | tr -d { |
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 | |
| /usr/local/sbin/mesos-slave --master=10.1.1.1:5050 |
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 | |
| newhostname=nmp | |
| echo "$(ipconfig getifaddr en0) $newhostname" | sudo tee -a /etc/hosts | |
| sudo scutil --set HostName $newhostname |
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 | |
| sudo rm ~/Library/Caches/CloudKit/CloudKitMetadata*;sudo killall cloudd |