-
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
| // import { MongoClient } from 'mongodb'; | |
| import dotenv from 'dotenv'; | |
| dotenv.config({ path: '../.env' }); | |
| import * as mongo from 'mongodb'; | |
| export class MongoHelper { | |
| public static client: mongo.MongoClient; |
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
| # Install | |
| brew tap mongodb/brew | |
| brew install mongodb-community | |
| sudo su | |
| mkdir -p /data/db | |
| sudo chown -R `id -un` /data/db | |
| # Forground |
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) |
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
| 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
| 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
| 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
| # 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
| #!/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 |