Skip to content

Instantly share code, notes, and snippets.

@fxhxyz4
fxhxyz4 / .gitignore
Created February 24, 2025 16:10
.net gitignore
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
########
# Misc #
########
.vscode
.idea
.DS_Store
text.txt
@fxhxyz4
fxhxyz4 / .gitattributes
Created February 22, 2025 18:55
.gitattributes
# Normalize line endings to LF for files that Git detects as text
* text=auto
# Only LF
*.js text eol=lf
*.ts text eol=lf
*.sh text eol=lf
*.json text eol=lf
# CRLF for bat/cmd
@fxhxyz4
fxhxyz4 / Habr.txt
Created November 30, 2024 11:35
Habr
1. Публикация в нужном разделе (нп. в нужном хабе).
2. Плохое раскрытие темы, устаревшая тема либо же она влажная/не готовая.
3. Проблемы с грамотностью, языковой барьер (если статья например на английском).
4. Изображения (gif, jpeg, png), и видео много весят, тем самым загрузка статьи требует большего времени, а у пользователя с плохим интернетом они могут и вовсе не загрузится.
5. Работа с разделами смысловой нагрузки текста.
https://kappa.lol/IYQLA - white theme
https://kappa.lol/IeExU - black theme
@fxhxyz4
fxhxyz4 / c.js
Created July 7, 2024 18:34
colors for twitch
const customColors = [
"#ffb2b2",
"#cbffda",
"#e6cbff",
"#fff3cb",
"#cbffe7",
"#cbd6ff",
"#ffcbd7",
"#ffe1cb",
"#ffcbeb",
@fxhxyz4
fxhxyz4 / udp.js
Last active March 16, 2024 05:28
udp.js
import { isMainThread, Worker } from 'worker_threads';
import dgram from "dgram";
import path from 'path';
const udp = dgram.createSocket('udp4'); // or udp6
const data = Buffer.from('⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠿⢿⣿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⣿⡿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣃⠀⠀⠀⠀⢉⣷⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣞⡉⠀⠤⠄⠀⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠉⠳⢦⣀⣴⠞⠁⠀⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠀⠈⠳⣦⡀⣠⠞⠁⡈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⣠⠟⠳⢦⡀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⢈⡿⢯⡀⠀⢁⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣅⣠⠞⠁⠀⠀⠀⠙⣿⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣝⢇⠀⣠⠟⠀⠀⠙⢦⣬⣿⣿⣿⣿⣿⣿⣿⣿
@fxhxyz4
fxhxyz4 / .jshintrc
Last active March 21, 2025 10:55
.jshintrc
{
"node": true,
"browser": false,
"esversion": 11,
"undef": true,
"unused": true,
"bitwise": true,
"strict": false,
"moz": true,
"eqnull": true,
@fxhxyz4
fxhxyz4 / snowpack.config.js
Last active June 23, 2023 12:05
snowopack config
export default {
mount: {
src: '/',
},
devOptions: {
port: 7373,
},
};
function dataBase(msg) {
const req = indexedDB.open('msgDB', 1);
let db;
const dataObj = {
msg: msg,
};
req.onupgradeneeded = e => {
db = e.target.result;
@fxhxyz4
fxhxyz4 / visually-hidden.css
Last active July 25, 2023 08:33
visually-hidden.css
.visually-hidden {
position: absolute;
white-space: nowrap;
width: 1px;
height: 1px;
overflow: hidden;
border: 0;
padding: 0;
clip: rect(0 0 0 0);
clip-path: inset(50%);