Find where container's logs are:
docker inspect --format='{{.LogPath}}' <container_name>
| REM usage: killport.bat <port> | |
| @echo off | |
| setlocal | |
| echo Killing port %1 | |
| for /f "tokens=5" %%a in ('netstat -ano ^| findstr ":%1"') do taskkill /f /pid %%a |
Find where container's logs are:
docker inspect --format='{{.LogPath}}' <container_name>
| function dotenv() { | |
| file=${1-".env"} | |
| set -a; source $file; set +a | |
| } |
| { | |
| "window.zoomLevel": 0, | |
| "editor.tabSize": 2, | |
| "editor.detectIndentation": false, | |
| "editor.insertSpaces": true, | |
| "editor.renderWhitespace": "boundary", | |
| "workbench.panel.defaultLocation": "bottom", | |
| "editor.fontFamily": "'Fira Code', Menlo, Monaco, 'Courier New', monospace", | |
| "editor.fontLigatures": true, | |
| // "editor.formatOnSave": true, |
| @echo off | |
| for /f "delims=" %%a in ('git describe --tags --abbrev^=0') do @set latesttag=%%a | |
| git log %latesttag%..HEAD --graph --oneline |
| git log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' |
| route -n get default | grep interface | awk '{ print $2 }' | xargs ipconfig getifaddr |
| docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $1 |
| #!/bin/bash | |
| # Usage: heroku_dotenv.sh <heroku_app_name> <dotenv_file> | |
| # Default dotenv_file: .env | |
| dotenv=${2-".env"} | |
| heroku config -a $1 | | |
| sed -n '1!p' | | |
| awk '{ gsub(/:/,"", $1); f=$1; $1=""; print f"="substr($0,2) }' > $dotenv | |
| cat $dotenv | |
| echo "File written: $dotenv" |
| # Add this to your .zshrc file (or equivalent) | |
| # Kills all processes running on a given port | |
| # Usage: killport <port> | |
| function killport() { | |
| lsof -i:$1 | grep LISTEN | awk '{print $2}' | xargs kill -9 | |
| } |