Skip to content

Instantly share code, notes, and snippets.

View psaxde's full-sized avatar
💭
I do things.

Benjamin Timm Broich psaxde

💭
I do things.
View GitHub Profile
@rinogo
rinogo / job.service.spec.ts
Last active December 3, 2023 14:52
Integration Testing a NestJS Service that leverages Prisma
import { Test, TestingModule } from '@nestjs/testing';
import { PrismaService } from '../prisma.service';
import { JobService } from './job.service';
import * as crypto from 'crypto';
describe('JobService', () => {
let service: JobService;
let prisma: PrismaService;
beforeEach(async () => {
# Echo number of GIT commits per year.
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}'
@listochkin
listochkin / node-command-line-options.txt
Created April 17, 2014 11:00
Node V8 GC-related options
--log_gc (Log heap samples on garbage collection for the hp2ps tool.)
type: bool default: false
--expose_gc (expose gc extension)
type: bool default: false
--max_new_space_size (max size of the new generation (in kBytes))
type: int default: 0
--max_old_space_size (max size of the old generation (in Mbytes))
type: int default: 0
--max_executable_size (max size of executable memory (in Mbytes))
type: int default: 0