@Injectable()
: Marks a class as a provider that can be managed by NestJS dependency injection system.@Module()
: Defines a module in NestJS, organizing the application structure.@Controller()
: Defines a basic controller in NestJS.@Get()
,@Post()
,@Put()
,@Delete()
: HTTP method decorators for route handlers in controllers.@Param()
: Extracts parameters from the request.@Body()
: Extracts the entire body from the request.@Query()
: Extracts query parameters from the request.@Headers()
: Extracts specific headers from the request.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automatically uses the package manager of current directory | |
# Just type "start" or any other scripts fo your package.json file | |
p() { | |
if [[ -f bun.lockb ]]; then | |
command bun "$@" | |
elif [[ -f pnpm-lock.yaml ]]; then | |
command pnpm "$@" | |
elif [[ -f yarn.lock ]]; then | |
command yarn "$@" |
Develop a RESTful API using frameworks like Express or Django, incorporating authentication and authorization mechanisms to secure the endpoints.
Implement a task scheduling system using a job queue like Bull or RabbitMQ, allowing asynchronous execution of tasks and background job processing.
Cherry picking into branch2update
- Copy hash of the commit you want
git log
- Switch to the branch you want to update:
git checkout branch2update
- From
branch2update
, create new branch:git checkout -b <new-branch>
- Cherry pick commit:
git cherry-pick <hash-of-wanted-commit>
- Push new branch:
git push --set--upstream origin <new-branch>
- On Gitlab, open a MR into
branch2update
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Docker compose | |
# Install: copy/pasta this into your .zshrc or .bashrc | |
alias dc='docker-compose' | |
alias dcu='docker-compose up -d' | |
alias dcd='docker-compose down' | |
alias dcl='docker-compose logs' | |
alias dcp='docker-compose ps' | |
alias dce='docker-compose exec' | |
alias dcr='docker-compose run' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps -a | cut -d' ' -f1 | xargs | cut -c11- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proxy=http://username:password@host:port |