-
Install direnv brew install direnv
-
Setup ~/.bashrc eval "$(direnv hook bash)"
-
Create .envrc file: #!/bin/bash export MY_ENV="just some env"
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
| #!/bin/sh | |
| systemctl restart pve-cluster | |
| systemctl restart pvedaemon | |
| systemctl restart pveproxy | |
| systemctl restart pvestatsd |
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
| 1) Rebase from VS Code | |
| 2) Select rebase plan (select interactive) in VS Code | |
| 3) If conflict -> solve conflicts in VS Code | |
| 4) Add changes | |
| git add <files> (or in VS Code) | |
| 5) rebase |
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
| #!/bin/sh | |
| # autostart (restart unless-stopped) | |
| docker run -dit --restart unless-stopped -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer | |
| # autostart (restart always) | |
| docker run -dit --restart always -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer | |
| # docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer |
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
| # Backreference | |
| ## VS Code | |
| Must be enabled in Settings | |
| ## Regex | |
| (fdk-color-blue)(?<!-) |
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 -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_test" --disable-web-security |
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
| nginx -s reload |
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
| plugins: [ | |
| new webpack.DefinePlugin({ | |
| 'process.env.BACKEND': '"dev1"' | |
| }), | |
| .... |
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
| # ubuntu | |
| sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
| sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
| service ssh restart | |
| system ssh restart | |
| # debian | |
| sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config |
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
| # Options | |
| set __fish_git_prompt_show_informative_status | |
| set __fish_git_prompt_showcolorhints | |
| set __fish_git_prompt_showupstream "informative" | |
| # Colors | |
| set green (set_color green) | |
| set magenta (set_color magenta) | |
| set normal (set_color normal) | |
| set red (set_color red) |