Skip to content

Instantly share code, notes, and snippets.

@jasonmorganson
Created May 22, 2023 14:15
Show Gist options
  • Save jasonmorganson/b1024d72777bf40a1452bfb5792c8525 to your computer and use it in GitHub Desktop.
Save jasonmorganson/b1024d72777bf40a1452bfb5792c8525 to your computer and use it in GitHub Desktop.
Nushell Snippets
open .default-cloud-sdk-components | lines | each { |component| gcloud components install $component }
ls | lines | split column "." name ext | par-each { |file| mv $"($file.name).($file.ext)" $"($file.name).txt" }
open .env | lines | split column "=" name value | let-env name = value
ls | lines | wrap name | insert json { |file| try { open $file.name | from json } catch { |error| "error" } } | where json == "error" | insert error { |file| try { open $file.name | from json } catch { |error| $error }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment