Skip to content

Instantly share code, notes, and snippets.

@brasic
Created August 26, 2022 15:48
Show Gist options
  • Save brasic/054ef7a8271bd892150227ac4caae0c0 to your computer and use it in GitHub Desktop.
Save brasic/054ef7a8271bd892150227ac4caae0c0 to your computer and use it in GitHub Desktop.
codespaces tricks
alias ports="gh codespace ports forward 80:80 2222:2222 3003:3003 3033:3033 3034:3034 3035:3035 3306:3306 8025:8025 9092:9092 9293:9293 15000:15000 15001:15001 15306:15306 18081:18081 8091:8091 9002:9002 28081:28081 9200:9200 40427:40427 45621:45621 35317:35317 45939:45939 43577:43577 33207:33207 38081:38081"
# until https://github.com/cli/cli/issues/6148 is fixed:
# copy from codespace
gh cs ssh --codespace $CODESPACE_NAME 'gzip < /path/to/some_file' | gunzip > some_file
# copy to codespace
gzip < some_file | gh cs ssh --codespace $CODESPACE_NAME 'gunzip > /path/to/some_file'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment