Skip to content

Instantly share code, notes, and snippets.

View usiusi360's full-sized avatar

Takayuki Ushida usiusi360

  • Future Corporation
  • Tokyo, Japan
View GitHub Profile
@usiusi360
usiusi360 / s3.sh
Created October 12, 2018 05:37 — forked from sh1n0b1/s3.sh
AWS S3 basic operations via AWS Access Key & Session Token
# 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####################"
#!/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 \
@usiusi360
usiusi360 / dockerhub-v2-api-user.sh
Created May 2, 2018 10:07 — forked from kizbitz/dockerhub-v2-api-user.sh
Get the list of images and tags for a Docker Hub user account.
#!/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=""
@usiusi360
usiusi360 / yum-ps-script.sh
Last active June 27, 2019 12:04
「yum ps all」と同様の結果を出力するスクリプト
#!/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
@usiusi360
usiusi360 / vuls-docker-run.sh
Last active April 23, 2018 11:04
Vulsがサポートするdockerイメージを纏めて起動する
#!/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`