Skip to content

Instantly share code, notes, and snippets.

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

Benjamin Vincent Luxcium

:octocat:
Full-time TypeScript worshiper, Node.JS enthusiast and VsCode junkie.
  • Luxcium
  • Québec, Qc, Canada
  • X @Luxcium
View GitHub Profile
@Luxcium
Luxcium / made-by-chatgpt-publicdomain.html
Created August 19, 2024 19:36
Public Domain HTML Page Created by ChatGPT ― This HTML page has been generated by ChatGPT and is considered to be in the public domain. It is intended for unrestricted use, meaning it can be freely copied, modified, distributed, or used for any purpose, including commercial applications. The content was crafted by an AI to assist with various de…
<!DOCTYPE html>
<!-- Created by ChatGPT using: https://raw.githubusercontent.com/oven-sh/awesome-bun/main/README.md -->
<!-- August 19th 2024 (https://raw.githubusercontent.com/oven-sh/awesome-bun/fd7b2ab48f4b4a076c0e5583c6023a7860d89f49/README.md) -->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Awesome Bun</title>
</head>
<body>
@Luxcium
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
Luxcium / NVMe.md
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
Luxcium / Expanded-NVMe.md
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
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
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
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 = performance.now();
const timeNow = () => performance.now();
const timeSinceThen = () => timeNow() - timeThen;
@Luxcium
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
require(__dirname+"/processor-usage.js").startWatching();
var shouldRun = true;
var desiredLoadFactor = .5;
function blockCpuFor(ms) {
var now = new Date().getTime();
var result = 0
@Luxcium
Luxcium / .editorconfig
Last active August 10, 2021 13:48
My prefered .prettierrc config ― †Scientia es lux principium✨™
[*.{js,json,ts,tsx,jsx}]
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
Luxcium / dirs-material-icon-theme-PKief-4.5.0.sh
Last active March 12, 2021 13:08
Script to create folders (directories) from the v4.5.0 of pkief.material-icon-theme
#!/bin/sh
# * ------------------------------------------------------------------------- *
# * 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)
# https://github.com/Luxcium
#