Skip to content

Instantly share code, notes, and snippets.

@cnotv
cnotv / guide.yml
Last active August 31, 2022 09:07
Nginx explained
# Full guide: http://nginx.org/en/docs/beginners_guide.html
# Configuration is located in etc/nginx/sites-available/default
# NOTE: Updates will require `nginx -s reload` in order to be adopted
# Following configurations are within the "main" context
# Block directive with fixed values, more at: https://docs.nginx.com/nginx/admin-guide/basic-functionality/managing-configuration-files/
http {
# Context of the block directive within brackets {}
# Anything defined and is not a block is a directive and ends with semicolon ;
@cnotv
cnotv / docker-compose.minio.yml
Last active August 2, 2022 11:44
Sorry Crypress Minio config DO
version: '3.6'
services:
mongo:
image: mongo:4.2
volumes:
- ./data/data-mongo-cypress:/data/db
ports:
- 27017:27017
director:
@cnotv
cnotv / Ubuntu apt stuck packages
Created August 22, 2019 14:40
Ubuntu apt stuck packages
sudo apt-get remove --purge #PACKAGE_NAME
@cnotv
cnotv / Git log graphic command
Created August 2, 2019 07:54
Git log graphic command
git log --all --decorate --oneline --graph
sudo kill -9 $(lsof -i tcp:4200 -t)
@cnotv
cnotv / git_clean_branches
Last active February 8, 2019 14:13
Remove unused branches locally
git checkout master
git fetch -p
git branch | grep -v "master" | xargs git branch -D
git reset --hard origin/master
@cnotv
cnotv / git-reset-author.sh
Created January 28, 2019 08:57 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD