Important commands:
# Get related infos for flashing (sector size, start and end addresses)
sudo fdisk -l /dev/sdc
# Alternative for better regex actions:
sudo sfdisk -d /dev/sdc
# Copy image to storage
Important commands:
# Get related infos for flashing (sector size, start and end addresses)
sudo fdisk -l /dev/sdc
# Alternative for better regex actions:
sudo sfdisk -d /dev/sdc
# Copy image to storage
export type SelectorType = "option1" | "option2"; | |
export type SelectType<S extends SelectorType> = S extends "option1" | |
? Type1 | |
: S extends "option2" | |
? Type2 | |
: never; |
export function generateUUID(): string { | |
let dt = Date.now() | |
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { | |
const r = Math.trunc((dt + Math.random() * 16) % 16) | |
dt = Math.floor(dt / 16) | |
// eslint-disable-next-line no-bitwise | |
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16) | |
}) | |
} |