Skip to content

Instantly share code, notes, and snippets.

View r37r0m0d3l's full-sized avatar

Anton Trofymenko r37r0m0d3l

View GitHub Profile
@r37r0m0d3l
r37r0m0d3l / node-typescript-esm.md
Created November 21, 2023 23:07 — forked from khalidx/node-typescript-esm.md
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@r37r0m0d3l
r37r0m0d3l / etc-hosts-on-win.md
Created October 30, 2023 09:15 — forked from zenorocha/etc-hosts-on-win.md
/etc/hosts on Windows

1. Get your IP Address

echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`

2. Modify your hosts file

notepad

@r37r0m0d3l
r37r0m0d3l / hosts
Created August 24, 2023 10:19 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@r37r0m0d3l
r37r0m0d3l / hosts
Created August 24, 2023 10:19
Block Adobe Hosts \drivers\etc\hosts
# This file is just a list of hosts to prevent adobe activation.
# For more protection, like blocking Adware, Malware, FakeNews,
# Gambling, Porn or Social, go to https://github.com/StevenBlack/hosts
#
# To easily manage multiple host databases, use Hostman.
# http://www.abelhadigital.com/hostsman/
# Or just copy that file to
# "C:\Windows\System32\drivers\etc"
# =================================
ffmpeg -i input.gif -strict -1 -f yuv4mpegpipe -pix_fmt yuva444p - | avifenc --stdin --fps 12 output.avif
@r37r0m0d3l
r37r0m0d3l / types_and_roles_demo.sql
Created June 5, 2023 10:48 — forked from levlaz/types_and_roles_demo.sql
Create Types and Roles If Not Exist in PostgreSQL
BEGIN;
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'task_status') THEN
create type task_status AS ENUM ('todo', 'doing', 'blocked', 'done');
END IF;
END
$$;
CREATE TABLE IF NOT EXISTS
@r37r0m0d3l
r37r0m0d3l / youtube-vanced-alternatives.md
Created March 21, 2022 10:53 — forked from SkyyySi/youtube-vanced-alternatives.md
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@r37r0m0d3l
r37r0m0d3l / 1_core.sh
Created January 17, 2022 16:35 — forked from aaabramov/01_core.md
Typical NestJS app
# Generate new service
nest new <service_name>
# All services need this
npm install \
class-validator \
class-transformer \
@nestjs/typeorm \
typeorm \
pg \
@r37r0m0d3l
r37r0m0d3l / updateNpm.bat
Created July 12, 2021 14:59 — forked from nokidding/updateNpm.bat
Windows batch file which updates npm for nvm-windows
rem see https://github.com/coreybutler/nvm-windows/issues/300
@echo off
SETLOCAL EnableDelayedExpansion
if [%1] == [] (
echo Pass in the version you would like to install, or "latest" to install the latest npm version.
) else (
set wanted_version=%1
@r37r0m0d3l
r37r0m0d3l / tsconfig.json
Created June 9, 2021 20:02 — forked from KRostyslav/tsconfig.json
tsconfig.json с комментариями.
// Файл "tsconfig.json":
// - устанавливает корневой каталог проекта TypeScript;
// - выполняет настройку параметров компиляции;
// - устанавливает файлы проекта.
// Присутствие файла "tsconfig.json" в папке указывает TypeScript, что это корневая папка проекта.
// Внутри "tsconfig.json" указываются настройки компилятора TypeScript и корневые файлы проекта.
// Программа компилятора "tsc" ищет файл "tsconfig.json" сначала в папке, где она расположена, затем поднимается выше и ищет в родительских папках согласно их вложенности друг в друга.
// Команда "tsc --project C:\path\to\my\project\folder" берет файл "tsconfig.json" из папки, расположенной по данному пути.
// Файл "tsconfig.json" может быть полностью пустым, тогда компилятор скомпилирует все файлы с настройками заданными по умолчанию.
// Опции компилятора, перечисленные в командной строке перезаписывают собой опции, заданные в файле "tsconfig.json".