This file contains hidden or 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
| Open VS code in a specific directory | |
| > code . | |
| Open terminal VS Code | |
| > Ctrl + ` | |
| Duplicate line: | |
| > Alt + Shift + Up/Down Arrow | |
| Move a Line Up/Down: |
This file contains hidden or 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
| Eventbus: | |
| https://alligator.io/vuejs/global-event-bus/ | |
| Materialize Css: | |
| https://materializecss.com |
This file contains hidden or 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
| For windows: | |
| 1. install go package from following | |
| https://golang.org/dl/ | |
| 2. From Git bash (may follow like): | |
| mkdir -p $GOPATH/src/<project-root>/<user-name>/<project-name> | |
| example: | |
| mkdir -p $GOPATH/src/github.com/bluetoothfx/restapi | |
| 3. If it fails to create GO folder then do set Go path by below command |
This file contains hidden or 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
| TRUNCATE TABLE table_name RESTART IDENTITY; | |
| TRUNCATE TABLE "AspNetUsers" CASCADE; |
This file contains hidden or 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
| #Example | |
| https://blog.selectel.com/managing-logging-systemd/ | |
| # export | |
| sudo journalctl -u kestrel-mysite.service -o cat > log2.txt | |
| #purge journalctl | |
| sudo journalctl --rotate --vacuum-time=1s | |
| #show recent log |
This file contains hidden or 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
| # To get & run redis on docker (6379 is default port) | |
| > docker run -d -p 6379:6379 --name redis1 redis | |
| # Run redis on docker & guaranteed backup (-create /home/redisDB directory 1st in your host machine) | |
| > docker run -v /home/redisDB:/data -d -p 6379:6379 --name redis1 redis redis-server --appendonly yes | |
| # to check if redis is functioning in docker (status checking) | |
| > docker ps | |
| # to view redis logs | |
| > docker logs redis1 | |
| # start a new interactive session (-it) inside the running container | |
| > docker exec -it redis1 sh |
This file contains hidden or 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
| Login psql from terminal | |
| > sudo -i -u postgres psql | |
| List of DB | |
| > \l | |
| List available tables | |
| > \dt | |
| Describe a table |
This file contains hidden or 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
| #To check docker compose version | |
| > docker-compose -v | |
| #To create docker file | |
| > touch docker-compose.yml | |
| #Docker compose file validity | |
| > docker-compose config | |
| #Start docker compose |
This file contains hidden or 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
| Need a linux hosted VM (ex. Ubuntu) | |
| STEP 01. Add Following yml file (which is created by default - Git action template) | |
| *******************************File Start************************************* | |
| name: .NET Core | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: |
This file contains hidden or 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
| tmux: | |
| What is tmux? | |
| Tmux is a terminal multiplexer an alternative to GNU Screen. In other words, it means that you can start a Tmux session and then open multiple windows inside that session. Each window occupies the entire screen and can be split into rectangular panes. | |
| With Tmux you can easily switch between multiple programs in one terminal, detach them and reattach them to a different terminal. | |
| Tmux sessions are persistent, which means that programs running in Tmux will continue to run even if you get disconnected. | |
| All commands in Tmux start with a prefix, which by default is ctrl+b. | |
OlderNewer