Skip to content

Instantly share code, notes, and snippets.

@MatrixManAtYrService
Last active January 2, 2026 16:57
Show Gist options
  • Select an option

  • Save MatrixManAtYrService/9d25fddc15b2494e5ff8d0edb011418d to your computer and use it in GitHub Desktop.

Select an option

Save MatrixManAtYrService/9d25fddc15b2494e5ff8d0edb011418d to your computer and use it in GitHub Desktop.
{
# unlike fractured json, nushell doesn't support in-line comments
# exept at the end of the line
NumbersWithHex: [
254 1450 0 36000 10
# 0xFE 0x5AA 0x0 0x8CA0 0xA
199 15001 6540
# 0xC7 0x3A99 0x198C
]
# Elements are keen
Elements : [
{ Symbol: C Number: 6 Isotopes: [11 12 13 14] } # Carbon
{ Symbol: O Number: 8 Isotopes: [16 18 17 ] } # Oxygen
{ Symbol: H Number: 1 Isotopes: [1 2 3 ] } # Hydron
{ Symbol: Fe Number: 26 Isotopes: [56 54 57 58] } # Iron
# Not a complete list...
]
"Beatles Songs" : [
Taxman # George
"Hey Jude" # Paul
"Act Naturally" # Ringo
"Ticket To Ride" # John
]
}
❯ {
# unlike fractured json, nushell doesn't support in-line comments
# exept at the end of the line
NumbersWithHex: [
# 0xFE 0x5AA 0x0 0x8CA0 0xA
254 1450 0 36000 10
# 0xC7 0x3A99 0x198C
199 15001 6540
]
# Elements are keen
Elements : [
{ Symbol: C Number: 6 Isotopes: [11 12 13 14] }
{ Symbol: O Number: 8 Isotopes: [16 18 17 ] }
{ Symbol: H Number: 1 Isotopes: [1 2 3 ] }
{ Symbol: Fe Number: 26 Isotopes: [56 54 57 58] }
# Not a complete list...
]
"Beatles Songs" : [
Taxman # George
"Hey Jude" # Paul
"Act Naturally" # Ringo
"Ticket To Ride" # John
]
} | get Elements | where Number < 10
╭───┬────────┬────────┬────────────╮
│ # │ Symbol │ Number │ Isotopes │
├───┼────────┼────────┼────────────┤
│ 0 │ C │ 6 │ ╭───┬────╮ │
│ │ │ │ │ 0 │ 11 │ │
│ │ │ │ │ 1 │ 12 │ │
│ │ │ │ │ 2 │ 13 │ │
│ │ │ │ │ 3 │ 14 │ │
│ │ │ │ ╰───┴────╯ │
│ 1 │ O │ 8 │ ╭───┬────╮ │
│ │ │ │ │ 0 │ 16 │ │
│ │ │ │ │ 1 │ 18 │ │
│ │ │ │ │ 2 │ 17 │ │
│ │ │ │ ╰───┴────╯ │
│ 2 │ H │ 1 │ ╭───┬───╮ │
│ │ │ │ │ 0 │ 1 │ │
│ │ │ │ │ 1 │ 2 │ │
│ │ │ │ │ 2 │ 3 │ │
│ │ │ │ ╰───┴───╯ │
╰───┴────────┴────────┴────────────╯
❯ {
# unlike fractured json, nushell doesn't support in-line comments
# exept at the end of the line
NumbersWithHex: [
# 0xFE 0x5AA 0x0 0x8CA0 0xA
254 1450 0 36000 10
# 0xC7 0x3A99 0x198C
199 15001 6540
]
# Elements are keen
Elements : [
{ Symbol: C Number: 6 Isotopes: [11 12 13 14] }
{ Symbol: O Number: 8 Isotopes: [16 18 17 ] }
{ Symbol: H Number: 1 Isotopes: [1 2 3 ] }
{ Symbol: Fe Number: 26 Isotopes: [56 54 57 58] }
# Not a complete list...
]
"Beatles Songs" : [
Taxman # George
"Hey Jude" # Paul
"Act Naturally" # Ringo
"Ticket To Ride" # John
]
} | to json
{
"NumbersWithHex": [
254,
1450,
0,
36000,
10,
199,
15001,
6540
],
"Elements": [
{
"Symbol": "C",
"Number": 6,
"Isotopes": [
11,
12,
13,
14
]
},
{
"Symbol": "O",
"Number": 8,
"Isotopes": [
16,
18,
17
]
},
{
"Symbol": "H",
"Number": 1,
"Isotopes": [
1,
2,
3
]
},
{
"Symbol": "Fe",
"Number": 26,
"Isotopes": [
56,
54,
57,
58
]
}
],
"Beatles Songs": [
"Taxman",
"Hey Jude",
"Act Naturally",
"Ticket To Ride"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment