Skip to content

Instantly share code, notes, and snippets.

View Luxcium's full-sized avatar
Full-time TypeScript worshiper, Node.JS enthusiast and VsCode junkie.

Benjamin Vincent Luxcium

Full-time TypeScript worshiper, Node.JS enthusiast and VsCode junkie.
  • Luxcium
  • Québec, Qc, Canada
  • X @Luxcium
View GitHub Profile
Luxcium / 120-colors.txt
Created November 10, 2023 23:48
Color names to use in Midjourney and other places
Amber orange
Amber yellow
Apricot orange
Aqua cyan
Aquamarine teal
Ash grey
Ballet pink
Berry magenta
Berry red
Blush pink
Luxcium /
Created July 20, 2023 08:47
NVMe / PCIe / EXT4 Fedora Linux Drive Management Cheat Sheet

NVMe / PCIe / EXT4 Fedora Linux Drive Management Cheat Sheet

Disk Partitioning and Filesystem Creation

Before you can use a drive in Linux, you need to partition it and create a filesystem on it.

Command Explanation
sudo fdisk -l List all drives and their partitions.
sudo parted /dev/nvme1n1 mklabel gpt Create a new GPT partition table on the drive.
sudo parted -a optimal /dev/nvme1n1 mkpart primary ext4 0% 100% Create a single ext4 partition covering the whole drive.
Luxcium /
Created July 20, 2023 08:43
Expanded NVMe / PCIe / EXT4 Fedora Linux Drive Management Cheat Sheet

Expanded NVMe / PCIe / EXT4 Fedora Linux Drive Management Cheat Sheet

There are several tools in Linux to scan disks for errors, though the specific methods and tools will depend on the type of storage medium (SSD, HDD, etc.), the file system in use, and the nature of the errors you're expecting to encounter. Here's a couple of general methods to consider

ChatGPT Recommendations

To maximizing hardware resilience specifically on a 1TB NVMe drive over a PCIe interface, here are some specific recommendations and best practices

Partitioning and Filesystem Optimization

While the earlier steps provided a baseline setup, we can go further in optimizing the partitions and filesystems for performance and durability.

Luxcium / ChatGPT-export_by-luxcium.txt
Created March 8, 2023 05:36
ChatGPT Export Prompt Permission granted under LICENSE · Copyright © 2023 Luxcium
Let's summarize our discussion so far in the imperative form for the benefit of another instance of ChatGPT
Now provide, a complete summary! First start by stating the topic we are discussing, then provide a clear picture of the actual context. Then give 1) all action items related to our discussion so far, 2) list all the key points, 3) Contextual information, and 4) the Next steps. This will act as a checkpoint, it is intended to be copied and pasted into a new instance of ChatGPT so we can continue our conversation where we left off. Please make sure the 4 sections include as many points as possible to ensure that the summary is easy to understand and can be used by anyone without any prior knowledge of our conversation.
Optionally, you can summarize the elements of one, or more additional sections from these categories: «Current user intent», «Conversation history», «User preferences», «The timeline», «Current topic or task», «Feedback received», «Sentiment analysis», «Follow-up items», «Current chatbot
Luxcium / keyMake.ts
Last active August 31, 2022 14:54
Naïve approach to redis keys
export interface KeyMake {
(keyName?: string | undefined | null): KeyMake;
(keyName: string | undefined | null, idValue_0: null): string;
(keyName: string | undefined | null, idValue_0: string, ...idValue_1: string[]): string;
export function keyMake(keyName?: string | undefined | null): KeyMake;
export function keyMake(keyName: string | undefined | null, ...idValue: [string, ...string[]]): string;
export function keyMake(keyName: string | undefined | null, ...idValue: [null]): string;
export function keyMake(keyName?: string | undefined | null, ...idValue: any[]): any {
Luxcium / sync-directory-traversal.ts
Created July 18, 2022 13:13
Fast Synchronous(ish) Directory Traversal using chdir
import { opendirSync } from 'node:fs';
import { opendir } from 'node:fs/promises';
import { constants } from 'node:os';
import { chdir } from 'node:process';
const count = { a: 0 };
const timeThen =;
const timeNow = () =>;
const timeSinceThen = () => timeNow() - timeThen;
Luxcium / load-generator.js
Created September 6, 2021 21:22 — forked from tkrueger/load-generator.js
generate and measure CPU load with node.js
#!/usr/bin/env node
var shouldRun = true;
var desiredLoadFactor = .5;
function blockCpuFor(ms) {
var now = new Date().getTime();
var result = 0
Luxcium / .editorconfig
Last active August 10, 2021 13:48
My prefered .prettierrc config ― †Scientia es lux principium✨™
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8
insert_final_newline = true
tab_width = 2
Luxcium /
Last active March 12, 2021 13:08
Script to create folders (directories) from the v4.5.0 of pkief.material-icon-theme
# * ------------------------------------------------------------------------- *
# * This file is Copyright © 2021 Benjamin Vincent Kasapoglu (Luxcium).
# * Licensed under the MIT License. (All rights reserved)
# * See license footer at bottom of this file down below for information.
# * ------------------------------------------------------------------------- *
# Benjamin Vincent Kasapoglu (Luxcium)

Standalone applications

There are several ways of mounting a Nest application. You can create a web app, a microservice or just a bare Nest standalone application (without any network listeners). The Nest standalone application is a wrapper around the Nest IoC container, which holds all instantiated classes. We can obtain a reference to any existing instance from within any imported module directly using the standalone application object. Thus, you can take advantage of the Nest framework anywhere, including, for example, scripted CRON jobs. You can even build a CLI on top of it.

Getting started

To create a Nest standalone application, use the following construction: