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
emacs --batch --eval "(require 'package)" \ | |
--eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \ | |
--eval "(package-refresh-contents)" \ | |
--eval "(package-initialize)" \ | |
--eval "(package-install 'flymake-python-pyflakes))" \ | |
--eval "(package-install 'guru-mode))" \ | |
--eval "(package-install 'helm))" |
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
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}' |
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
unbind-key C-b | |
set-option -g prefix C-t | |
bind-key C-t send-prefix | |
set-option -g history-limit 2000 | |
set-option -g status-fg white | |
set-option -g status-bg black | |
setw -g window-status-current-style "bg=blue,fg=white" |
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
import requests | |
s = requests.Session() | |
url = "https://id.moneyforward.com/sign_in" | |
payload = {"mfid_user[email]": "foo@example.com", "mfid_user[password]": "barbaz"} | |
s.post(url, data=payload) | |
res = s.get("https://moneyforward.com/bs/portfolio") |
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
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 |
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
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 |
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
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 |
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
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 |
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
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 |
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
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 |
NewerOlder