Skip to content

Instantly share code, notes, and snippets.

@mcfiredrill
Created August 26, 2023 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcfiredrill/3b10779636299c531368f9de5b9e1047 to your computer and use it in GitHub Desktop.
Save mcfiredrill/3b10779636299c531368f9de5b9e1047 to your computer and use it in GitHub Desktop.
working offline

recently i lost internet connection at home for about a week. forced me to remember some ways to work offline

copy files over ssh with scp (do this pretty often even when internet is working

scp file tony@192.168.0.43:./path/

git push and pull to other computers on same network

git remote add git push

copy docker images to and from other machines

on one machine, save image to tar file

docker save -o streampusher.tar streampusher/streampusher:latest

scp to the other machine

scp streampusher.tar tony@192.168.0.31:./src/streampusher-api

on other machine, load image

docker load -i streampusher.tar

(note this doesn't work if the machines have different CPU architectures)

! rails The requested image's platform (linux/arm64/v8) does not match the detected host platform (linu x/amd64/v4) and no specific platform was requested 0.0s

You can build a docker image for another architecture with this flag --platform linux/amd64

use pnpm

pnpm caches every package locally for fast installs, also making it work great offline.

Other than that when I really need to download something I can tether my phone's rather poor connection or drive to the library parking lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment