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 | |
# GitHub | |
gh repo list <organization_name> --limit 1000 | while read -r repo _; do | |
gh repo clone "$repo" "$repo" | |
done | |
# GitLab | |
glab repo clone -g <group_name> -p --paginate |
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
[ | |
{ | |
"id": 1, | |
"type": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_4 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) GSA/7.0.55539 Mobile/12H143 Safari/600.1.4" | |
}, | |
{ | |
"id": 2, | |
"type": "Mozilla/5.0 (Linux; Android 5.0; SAMSUNG SM-N900T Build/LRX21V) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36" | |
}, | |
{ |
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 | |
expressvpn disconnect | |
expressvpn refresh | |
VPN=$(expressvpn list all | awk '{print $1}' | tail -n+3 | shuf -n1) | |
expressvpn connect "$VPN" |
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/zsh | |
FILE_PATH="data.json" | |
DATA=$(cat "$FILE_PATH") | |
REVERSE_ORDER=$(jq 'reverse' <<<"$DATA") | |
DATA_LENGTH=$(echo "$REVERSE_ORDER" | jq '. | length') | |
for ((INDEX = 0; INDEX < DATA_LENGTH; INDEX++)); do | |
REVERSE_ORDER=$(jq --argjson id "$INDEX" '.['"$INDEX"'] += { "id": ($id+1) }' <<<"$REVERSE_ORDER") | |
done |