Last active
June 20, 2024 03:23
-
-
Save yuya-maemichi-synspective/149602e5de059cafe4c1bd99fea2345f to your computer and use it in GitHub Desktop.
Google Cloud snippets
This file contains hidden or 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
[ | |
{ | |
"k": "Status", | |
"t": 10, | |
"v": "\"Awaiting approval\"", | |
"i": "status" | |
}, | |
{ | |
"k": "Branch", | |
"t": 10, | |
"v": "\"main\"", | |
"i": "branch" | |
} | |
] |
This file contains hidden or 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
pbpaste | | |
ruby -r{uri,cgi} -lpe'$_=CGI.parse(URI($_).query)["pageState"][0]' | | |
nkf --url-input | | |
tr '()' '{}' | | |
jq -rc '..|strings' | | |
sed -E 's/_([[:xdigit:]]{2})/%\1/g' | | |
nkf --url-input | | |
jq '.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
simpler URL param parser:
sed -nr 's/.*[?&]pageState=([^=&]+).*/\1/p'