I hereby claim:
- I am kiwimato on github.
- I am maihai (https://keybase.io/maihai) on keybase.
- I have a public key ASBG4EX09k6eGU90d1qYPG_Xplu3k49sYXg6FyPLHhHJsAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# checks a iaai.com auction link if the auction is still not assigned | |
# Produces output like this: | |
# 2021-09-21_16:06:23 https://iaai.com/vehicledetails/40812556?tenant=US&RowNumber=2 - Auction still not assigned | |
# 2021-09-21_16:06:34 https://iaai.com/vehicledetails/40812556?tenant=US&RowNumber=2 - Auction still not assigned | |
URL_LIST=" | |
https://iaai.com/vehicledetails/40812556?tenant=US&RowNumber=2 | |
" | |
SLEEP_SECONDS=10 # Number of seconds to sleep between calls |
## Custom stuff | |
# Yubikey | |
#export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh" | |
export GPG_TTY="$(tty)" | |
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) | |
gpgconf --launch gpg-agent | |
# echo "UPDATESTARTUPTTY" | gpg-connect-agent > /dev/null 2>&1 | |
alias ykrestart='gpg-connect-agent updatestartuptty /bye' | |
# Switch between yubikeys with same key on them | |
alias ykswitch='gpg-connect-agent "scd serialno" "learn --force" /bye' |
cat > /usr/lib/systemd/system/chronyd-restart-after-sleep.service <<'EOF' | |
[Unit] | |
Description=Restart Bluetooth after resume | |
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/systemctl --no-block restart chronyd | |
#ExecStart=/usr/bin/systemctl --no-block restart bluetooth.service |
# configure this for AWS credentials, I use aws-vault | |
function aws_credentials(){ | |
aws-vault exec foobar | |
} | |
# this function removes all filters assigned to conditions | |
function remove_filters(){ | |
command=$1 | |
command_list=list-${command} | |
command_get=get-${command%*s} |
cat response.json | jq -r '.value[] | select(.name | contains ("project") and contains("master") and (contains("test")|not)) | "[\(.name)|\(._links.web.href)]"' |
cat >~/.vimrc<<'EOF' | |
source $VIMRUNTIME/defaults.vim | |
set mouse-=a | |
EOF |
sudo mkdir /etc/1password | |
echo vivaldi-bin | sudo tee /etc/1password/custom_allowed_browsers | |
sudo chown root:root /etc/1password/custom_allowed_browsers | |
sudo chmod 755 /etc/1password/custom_allowed_browsers |
# Create a service: | |
cat > /lib/systemd/system/azure-devops-shutdown-when-idle.service<<'EOF' | |
[Unit] | |
Description=Issues as shutdown in case the agent is idle, to avoid long running ec2 spot instances | |
[Service] | |
Type=simple | |
ExecStart=/bin/bash /root/shutdown_when_idle.sh | |
[Install] |
AGENT_SOCK=$(gpgconf --list-dirs | grep agent-socket | cut -d : -f 2) | |
if [[ ! -S $AGENT_SOCK ]]; then | |
gpg-agent --daemon --use-standard-socket &>/dev/null | |
fi | |
export GPG_TTY=$TTY | |
# Set SSH to use gpg-agent if it's enabled | |
GNUPGCONFIG="${GNUPGHOME:-"$HOME/.gnupg"}/gpg-agent.conf" | |
if [[ -r $GNUPGCONFIG ]] && command grep -q enable-ssh-support "$GNUPGCONFIG"; then |