Skip to content

Instantly share code, notes, and snippets.

{
"explorer.fileNesting.enabled": true,
"explorer.fileNesting.patterns": {
"package.json": ".eslint*, prettier*, tsconfig*, vite*, pnpm-lock*, bun.lockb, nest*",
"tailwind.config.js": "tailwind.config*, postcss.config*",
".env.local": ".env*",
".env": ".env*"
}
}
@JCPurger
JCPurger / Node modules List Delete
Last active August 23, 2023 08:46
Node modules recursive find and delete
// List
find . -name "node_modules" -type d -prune -print | xargs du -chs
// Delete
find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;
@JCPurger
JCPurger / Tail directory
Created June 26, 2022 12:08
Linux tail directory
watch "ls -lrt | tail -10"
@JCPurger
JCPurger / apiResponse.js
Last active November 24, 2020 14:23
Normalização para resposta de api #nodejs #javascript
const apiResponse = (payload = {}) => {
const DataSymbol = Symbol('data');
const StatusSymbol = Symbol('status');
const ErrorsSymbol = Symbol('errors');
const MessageSymbol = Symbol('message');
class ApiResponse {
constructor({ data = {}, status = 1, errors = [], message = '' }) {
this.data = data;