Skip to content

Instantly share code, notes, and snippets.

ago 31 12:04:57 msi kernel: Linux version 6.10.7-arch1-1 (linux@archlinux) (gcc (GCC) 14.2.1 20240805, GNU ld (GNU Binutils) 2.43.0) #1 SMP PREEMPT_DYNAMIC Thu, 29 Aug 2024 16:48:57 +0000
ago 31 12:04:57 msi kernel: Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=b4de46b5-781b-4198-a486-60225d551a86 rw loglevel=3 quiet i915.force_probe=!7d55 xe.force_probe=7d55
ago 31 12:04:57 msi kernel: x86/split lock detection: #AC: crashing the kernel on kernel split_locks and warning on user-space split_locks
ago 31 12:04:57 msi kernel: BIOS-provided physical RAM map:
ago 31 12:04:57 msi kernel: BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
ago 31 12:04:57 msi kernel: BIOS-e820: [mem 0x000000000009f000-0x00000000000fffff] reserved
ago 31 12:04:57 msi kernel: BIOS-e820: [mem 0x0000000000100000-0x000000006b637fff] usable
ago 31 12:04:57 msi kernel: BIOS-e820: [mem 0x000000006b638000-0x000000006f6b1fff] reserved
ago 31 12:04:57 msi kernel: BIOS-e820: [mem 0x000000006f6b2000-0x000000006f7b2fff] ACPI data
ag
@FbN
FbN / knex-async-modify.js
Created April 11, 2023 09:13
knex async modify
const before = (target, f) => {
const then = target.then.bind(target)
target.then = (resolve, reject) =>
f(target).then(() => then(resolve, reject), reject)
return target
}
Knex.QueryBuilder.extend('amodify', function (f) {
const q = this
const clone = this.clone.bind(this)
@FbN
FbN / .prettierrc.json
Created August 7, 2022 08:25
.prettierrc.json
{
"trailingComma": "none",
"tabWidth": 4,
"semi": false,
"singleQuote": true,
"quoteProps": "as-needed",
"arrowParens": "avoid",
"parser": "typescript"
}
@FbN
FbN / eslint_plugins.sh
Last active August 7, 2022 08:40
last step
yarn add  - dev eslint-config-prettier
yarn add  - dev eslint-config-standard
yarn add  - dev eslint-plugin-import
yarn add  - dev eslint-plugin-n
yarn add  - dev eslint-plugin-prettier
yarn add  - dev eslint-plugin-promise
@FbN
FbN / config.lua
Created August 7, 2022 08:16
step2 - lua config
-- Tested on LunarVim
-- optional: set your prefered indent with size
vim.opt.shiftwidth = 4
vim.opt.tabstop = 4
-- load required null-ls references
local h = require("null-ls.helpers")
local cmd_resolver = require("null-ls.helpers.command_resolver")
local methods = require("null-ls.methods")
@FbN
FbN / step1.sh
Created August 7, 2022 08:03
Step 1
npm add --location=global prettier-eslint-cli
@FbN
FbN / pg-related-use.js
Created April 28, 2022 16:39
pg-related usage
@FbN
FbN / vite.config.js
Last active May 21, 2024 17:16
vite.config.js node built-in polyfills
// yarn add --dev @esbuild-plugins/node-globals-polyfill
import { NodeGlobalsPolyfillPlugin } from '@esbuild-plugins/node-globals-polyfill'
// yarn add --dev @esbuild-plugins/node-modules-polyfill
import { NodeModulesPolyfillPlugin } from '@esbuild-plugins/node-modules-polyfill'
// You don't need to add this to deps, it's included by @esbuild-plugins/node-modules-polyfill
import rollupNodePolyFill from 'rollup-plugin-node-polyfills'
export default {
resolve: {
alias: {
@FbN
FbN / A.js
Created March 9, 2021 16:12
Clojure Protocols Inspired last param type polimorfism
export const of = x => ({ '@@type': 'A', x })
export const f1 = a => a.x
f1.arity = 1
export const f2 = c => a => a.x + c
f2.arity = 2
export const f3 = d => c => a => a.x + c + d
f3.arity = 3