Skip to content

Instantly share code, notes, and snippets.

View bricss's full-sized avatar
🦉
Understand Create Evaluate

Yahor Siarheyenka bricss

🦉
Understand Create Evaluate
View GitHub Profile
@bricss
bricss / Forrst.icls
Last active March 29, 2023 15:19
WebStorm Forrst Theme
<scheme name="Forrst" version="142" parent_scheme="Default">
<metaInfo>
<property name="created">2023-03-29T17:02:29</property>
<property name="ide">WebStorm</property>
<property name="ideVersion">2023.1.0.0</property>
<property name="modified">2023-03-29T17:03:46</property>
<property name="originalScheme">Forrst</property>
</metaInfo>
<colors>
<option name="CARET_COLOR" value="8961e" />
@bricss
bricss / .eslintrc.js
Last active June 6, 2023 19:00
ESLint config: Ultra refined + TypeScript recomm
// npm install @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint eslint-config-ultra-refined typescript --save-dev
module.exports = {
extends: ['ultra-refined'],
overrides: [
{
extends: [
'ultra-refined',
'plugin:@typescript-eslint/recommended',
],
files: [
@bricss
bricss / druuid.mjs
Last active June 25, 2023 12:04
Date-relative (and relatively universally unique) UUID generation. Inspired by: https://www.npmjs.com/package/druuid
export const toBigInt = (value, radix = 36) => {
return [...value.toString()].reduce((acc, val) => (acc * BigInt(radix)) + BigInt(parseInt(val, radix)), 0n);
};
export const gen = (date = Date.now()) => {
return ((BigInt(date) << (64n - 41n)) ^ (BigInt(crypto.getRandomValues(new Uint8Array(32))
.join('')) % (2n ** (64n - 41n))));
};
export const time = (uuid) => {
@bricss
bricss / fixment.sh
Last active July 21, 2023 17:20
Podman permissions fixment
#!/usr/bin/env bash
# In case of "creating events dirs: mkdir /run/user/1000/libpod: permission denied"
sudo rm -rf ${HOME}/.local/share/containers
@bricss
bricss / settings.json
Last active April 12, 2024 16:41
VSCode settings.json
{
"debug.terminal.clearBeforeReusing": true,
"debug.toolBarLocation": "docked",
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
},
"editor.fontSize": 13,
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.formatOnType": true,