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
module.exports = { | |
parser: 'babel-eslint', | |
extends: ['plugin:prettier/recommended', 'prettier/react'], | |
plugins: ['prettier', 'jest'], | |
parserOptions: { | |
sourceType: 'module', | |
ecmaVersion: 2020, | |
ecmaFeatures: { | |
jsx: true, | |
}, |
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
import psycopg2 | |
from sshtunnel import SSHTunnelForwarder | |
# For interactive work (on ipython) it's easier to work with explicit objects | |
# instead of contexts. | |
# Create an SSH tunnel | |
tunnel = SSHTunnelForwarder( | |
('128.199.169.188', 22), | |
ssh_username='<username>', |
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
# The initial version | |
if [ ! -f .env ] | |
then | |
export $(cat .env | xargs) | |
fi | |
# My favorite from the comments. Thanks @richarddewit & others! | |
set -a && source .env && set +a |
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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
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
SERVER_DIR=/var/www/host/server | |
CONSOLE=$(SERVER_DIR)/app/console | |
update: | |
vagrant ssh -- "cd $(SERVER_DIR) && \ | |
sudo composer selfupdate -n -v && \ | |
composer install -n -v" | |
cache: | |
vagrant ssh -- "$(CONSOLE) doctrine:migrations:migrate -n && \ |