Skip to content

Instantly share code, notes, and snippets.

@r37r0m0d3l
r37r0m0d3l / example-typeorm-jest.test.ts
Created December 18, 2025 15:48 — forked from Ciantic/example-typeorm-jest.test.ts
Example of testing TypeOrm with Jest and Sqlite in-memory database
import { createConnection, getConnection, Entity, getRepository } from "typeorm";
import { PrimaryGeneratedColumn, Column } from "typeorm";
@Entity()
export class MyEntity {
@PrimaryGeneratedColumn()
id?: number;
@Column()
name?: string;

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@r37r0m0d3l
r37r0m0d3l / README.md
Created January 28, 2025 22:35 — forked from anchan828/README.md
This is an improvement to allow @nestjs/typeorm@8.1.x to handle CustomRepository. I won't explain it specifically, but it will help in some way. https://github.com/nestjs/typeorm/pull/1233

You need to provide some classes and decorators yourself to maintain the same style as typeorm@2.x.

1. EntityRepository -> CustomRepository

@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}

git commit --amend --date="now" --no-edit
{
"compilerOptions": {
/* Base Options: */
"esModuleInterop": true,
"skipLibCheck": true,
"target": "es2022",
"allowJs": true,
"resolveJsonModule": true,
"moduleDetection": "force",
"isolatedModules": true,
@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