I hereby claim:
- I am knishioka on github.
- I am kenichiro (https://keybase.io/kenichiro) on keybase.
- I have a public key whose fingerprint is FE43 3018 8F51 FF88 4084 296E CD38 E38D 4B5D 72B1
To claim this, I am signing this object:
import requests | |
s = requests.Session() | |
url = "https://id.moneyforward.com/sign_in" | |
payload = {"mfid_user[email]": "[email protected]", "mfid_user[password]": "barbaz"} | |
s.post(url, data=payload) | |
res = s.get("https://moneyforward.com/bs/portfolio") |
username= | |
current_access_key=$(aws configure get aws_access_key_id) | |
aws=$(aws iam create-access-key --user-name $username) | |
aws configure set aws_access_key_id $(jq -r '.AccessKey.AccessKeyId' <<< $aws) | |
aws configure set aws_secret_access_key $(jq -r '.AccessKey.SecretAccessKey' <<< $aws) | |
aws iam delete-access-key --access-key-id $current_access_key |
for file in *.MP4; do | |
new_file_name=$(date -v+9H -j -f "%Y-%m-%dT%H:%M:%S.000000Z" "$(ffprobe -v quiet -select_streams v:0 -show_entries stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 $file)" "+%Y-%m-%d %H%M%S_$file") | |
cp "$file" "$new_file_name" | |
done |
for file in GH*.MP4; do | |
new_file_name=$(date -j -f "%Y-%m-%dT%H:%M:%S.000000Z" "$(ffprobe -v quiet -select_streams v:0 -show_entries stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 $file)" "+%Y-%m-%d %H%M%S_$file") | |
cp "$file" "$new_file_name" | |
done |
target_dir=creation_time_changed | |
mkdir "$target_dir" | |
for movie in *.MP4; do | |
creation_time=$(TZ=0 gdate -d "$(ffprobe -v quiet -select_streams v:0 -show_entries stream_tags=creation_time -of default=noprint_wrappers=1:nokey=1 $movie | sed 's/Z/+09:00/')" "+%Y-%m-%dT%T.000000Z") | |
ffmpeg -i $movie -metadata creation_time="$creation_time" -c copy "${target_dir}/${movie}" | |
done |
mkdir 60fps | |
for movie in *.MP4; do | |
echo converting $movie | |
ffmpeg -i $movie -map_metadata 0 -map_metadata:s:v 0:s:v -map_metadata:s:a 0:s:a -c copy -f ffmetadata ffmetadata.txt -y | |
ffmpeg -i $movie -i ffmetadata.txt -map_metadata 1 -r 60 "60fps/${movie}" | |
done |
import requests | |
import json | |
token = '' | |
org = '' | |
author = '' | |
start_date = '2019-10-01' | |
end_date = '2019-12-31' | |
query = f'org:{org}+author:{author}+merged:{start_date}..{end_date}' |
for encrypted_pass in $(terraform output -json | jq -r '.aws_iam_user_admin_password.value[]'); do | |
pass=$(echo $encrypted_pass | tr -d '\n' | base64 -D | gpg -dr $keyname) | |
echo $pass | |
done |
I hereby claim:
To claim this, I am signing this object:
# 使い方 | |
# curl https://gist.githubusercontent.com/knishioka/86df4725105bd28d910fb67613c81b76/raw/create_new_aws_credential.sh | bash -s username | |
# usernameに対象となるユーザを指定 | |
# linuxのユーザ名とiamのユーザ名同じ場合を想定 | |
username=$1 | |
echo $username | |
# 古いキーを取得。一つのアカウントに付き一つのキーで管理しているとする | |
old_key=$(aws iam list-access-keys --user-name $username | jq -r '.AccessKeyMetadata[0].AccessKeyId') |