Google Cloud Memorystore for Redis
cloud.google.com6 ポイント投稿者 asamarin0 コメント
$ ls -1
EL+�CTRICO_0001.jpg
EL+�CTRICO_0002.jpg
EL+�CTRICO_0003.jpg
...
You get the idea; note those ugly unrepresentable characters over there. On the original filesystem they read as "ELÉCTRICO", but that tilde was saved using who knows what encoding, and I simply wanted to get rid of them and have nice ascii "ELECTRICO_xxxx.jpg" files. After finding out that the strange unrepresentable character was the byte 0xEB (so, in order to form an "É" you needed those two characters together: a literal '+' and 0xEB), I could do the bulk renaming with just: $ perl-rename 's/\+\xeb/E/' *.jpg
Felt so good! $ jo foo=12 bar=true baz=null
{"foo":12,"bar":true,"baz":"null"}
- Want a nested object? $ jo foo=12 bar=true baz=null thing=$(jo number=57 test=string)
{"foo":12,"bar":true,"baz":"null","thing":{"number":57,"test":"string"}}
- What about arrays? $ jo thing=$(jo number=57 test=string) anarray=$(jo -a 1 2 3 4 5)
{"thing":{"number":57,"test":"string"},"anarray":[1,2,3,4,5]}
- Now let's add some jq magic to sum all the values in the array together: $ jo thing=$(jo number=57 test=string) anarray=$(jo -a 1 2 3 4 5) | jq '.anarray | add'
15
Great stuff :) $ curl -H 'Metadata-Flavor: Google' "http://metadata/computeMetadata/v1/instance/?recursive=true"
And even in that case, you can choose plain text format by appending "alt=text" as query string parameter: $ curl -H 'Metadata-Flavor: Google' "http://metadata/computeMetadata/v1/instance/?recursive=true&alt=text"
> Also looks powerful in it's own right
If you aren't convinced of that yet, I'd simply suggest to take a look at this lightning demo (~5 mins): https://www.youtube.com/watch?v=N1CBDTgGtOU