Companion summary to Syntax's MAXIMUM VS Code Productivity — Navigating Codebases Quickly video for Windows.
- Go Back:
Ctrl+Left Arrow - Go Forward:
Ctrl+Right Arrow
Tailwind v4 has new syntax for arbitrary values, variants, properties, and more. Here's the cheatsheet that I would have wanted when I first started using it.
margin or color. Are set to a value.I used to have a site bookmarked with a table of all these functions, but the link is dead. Here's a matrix of Option and Result conversion functions. These become second nature once you have used Rust for any significant length of time, but it's useful to have a table reference.
For each of the below:
T is the value possibly contained in an input Ok Result or Some Option.U is a new value created by transforming or replacing an input T. Note that when
U appears in methods like map, U ?= T, for example by callingThe package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).Sometimes a programming language has a "strict mode" to restrict unsafe constructs. E.g., Perl has use strict, Javascript has "use strict", and Visual Basic has Option Strict. But what about bash? Well, bash doesn't have a strict mode as such, but it does have an unofficial strict mode:
set -euo pipefail
set -e
| { | |
| "schemes" : | |
| [ | |
| { | |
| "background" : "#fafafa", | |
| "black" : "#000000", | |
| "blue" : "#3199e1", | |
| "brightBlack" : "#686868", | |
| "brightBlue" : "#399ee6", | |
| "brightCyan" : "#4cbf99", |
J. S. Choi, 2022
All programmers must manipulate text; JavaScript programmers are no exception. Text manipulation often refers to specific characters, usually by their code points in hexadecimal – or by embedding the characters directly in source code.
| import asyncio | |
| import random | |
| class Hub(): | |
| def __init__(self): | |
| self.subscriptions = set() | |
| def publish(self, message): |
A quick guide on how to read/write/modify ID3 metadata tags for audio / media files using ffmpeg.
FFmpeg has a free-form command line option that allows the user to specify key-value-pairs for encoding metadata. Let's take a look.
To list all global metadata tags for a media file, just set an input but no output file.
| [ | |
| { | |
| "team": "Boston Celtics", | |
| "name": "Xavier McDaniel", | |
| "speed": 5, | |
| "threePoint": 5, | |
| "dunk": 5, | |
| "pass": 1, | |
| "power": 8, | |
| "steal": 3, |