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
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
# ==================================================================================== | |
# Aug 25, 2016 sh1n0b1 | |
# Modified this script to support AWS session token | |
# More work will be done on this. | |
# | |
# S3KEY="ASIAJLFN####################" |
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 | |
while read line | |
do | |
SERVERNAME=`echo "$line" | cut -f1` | |
FAMILY=`echo "$line" | cut -f2` | |
RELEASE=`echo "$line" | cut -f3` | |
IPADDRS=`echo "$line" | cut -f4` | |
sed -i -e s/\"Family\":\"pseudo\"/\"Family\":\"${FAMILY}\"/g \ |
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 | |
# Example for the Docker Hub V2 API | |
# Returns all imagas and tags associated with a Docker Hub user account. | |
# Requires 'jq': https://stedolan.github.io/jq/ | |
# set username and password | |
UNAME="" | |
UPASS="" |
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 | |
OS_FLAG=0 | |
which rpm >/dev/null 2>&1 && OS_FLAG=1 | |
which dpkg >/dev/null 2>&1 && OS_FLAG=2 | |
if [ ${OS_FLAG} == "0" ]; then | |
echo "Unknown OS"; exit 1 | |
fi |
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 | |
delete() { | |
local id=`docker ps -aq` | |
if [ "$id" == "" ];then | |
return | |
fi | |
docker rm -f `docker ps -aq` | |
docker rmi -f `docker images -a -q` |