Skip to content

Instantly share code, notes, and snippets.

@yuya-maemichi-synspective
Last active June 20, 2024 03:23
Show Gist options
  • Save yuya-maemichi-synspective/149602e5de059cafe4c1bd99fea2345f to your computer and use it in GitHub Desktop.
Save yuya-maemichi-synspective/149602e5de059cafe4c1bd99fea2345f to your computer and use it in GitHub Desktop.
Google Cloud snippets
[
{
"k": "Status",
"t": 10,
"v": "\"Awaiting approval\"",
"i": "status"
},
{
"k": "Branch",
"t": 10,
"v": "\"main\"",
"i": "branch"
}
]
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 '.'
@yuya-maemichi-synspective
Copy link
Author

simpler URL param parser: sed -nr 's/.*[?&]pageState=([^=&]+).*/\1/p'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment