A list of small things I learn every day, documented chiefly for myself.
There's a "Pour One Out" Emoji
There’s a “pour one out” 馃珬 emoji?!
There has been since 2021?!
I’m using this all the time now.
A list of small things I learn every day, documented chiefly for myself.
There’s a “pour one out” 馃珬 emoji?!
There has been since 2021?!
I’m using this all the time now.
When combining multiple jq filters, you can use jq’s inbuilt pipe |
operator instead of shell pipes.
i.e., instead of this:
curl 'https://jsonplaceholder.typicode.com/users' | jq \
'.[]' | jq 'select(.address.city == "South Christy")' | jq '{name, username, email}'
You can do this:
curl 'https://jsonplaceholder.typicode.com/users' | jq \
'.[] | select(.address.city == "South Christy") | {name, username, email}'
You can escape Markdown code blocks by using four backticks (````
) instead of three.
> Prevent Go Programs from Exiting
This _can be prevented_ by wrapping your code with a **channel**:
```go
c := make(chan bool) // creates a new channel
// your code goes here
<-c // perpetually waits for the channel to receive data
```
The above code block documents a Markdown code block. Very meta. It is created use four backticks:
````markdown
My working with CSS is mostly trying every value for a property until it does what I want it to do. This ignorance has only increased with free access to GitHub Copilot in my IDE, where I conveniently delegate CSS specifics to the AI.
But today, I found the BEST interactive tutorial about Flexbox. Even a quick look can help you intuitively understand how to use the Flexbox properly. Very good, very recommend.
To prevent Front Matter CMS from including specific files and folders, you can provide the paths to be excluded in excludePaths
under frontMatter.content.pageFolders
:
{
"frontMatter.content.pageFolders": [
{
"title": "Posts",
"path": "[[workspace]]/content/posts",
"previewPath": "posts",
"contentTypes": ["Post (default)"],
"excludePaths": [
"_*.*" // Exclude all files starting with an underscore
]
}
]
}
I use this to exclude _index.md
files from Front Matter.
You can use channels to prevent Go programs from exiting.
I have found this to be useful when running Go + Wasm on the browser where I run into errors like:
wasm_exec.js:378 Uncaught Error: bad callback: Go program has already exited
This can be prevented by wrapping your code with a channel:
c := make(chan bool) // creates a new channel
// your code goes here
<-c // perpetually waits for the channel to receive data