I hereby claim:
- I am 4o4 on github.
- I am pkiyooniq (https://keybase.io/pkiyooniq) on keybase.
- I have a public key ASDtbilOtxr3ddpuN67uRHQDZBK_Y5bXMhF4WlbIwJDpego
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # Get remote_exec.sh from another gist: https://gist.github.com/4O4/18b69f34001439a2b01532c1ae377aa2 | |
| source remote_exec.sh | |
| get_remote_var() { | |
| remote_exec ${1} "echo -n \${${2}}" | |
| } | |
| # Usage example |
| #!/usr/bin/env bash | |
| remote_exec() { | |
| # Goals: | |
| # 1. Force allocate pseudo-tty (usually not needed; IIRC I was hitting some | |
| # edge cases related to cygwin / windows cooperation in the past without | |
| # this switch. Life is a little bit easier after migration to WSL. | |
| # 2. Connect to remote server and launch custom command instead of login shell. | |
| # 3. Source .bash_profile to initialize environment and stuff, but ignore its | |
| # stdout and stderr. |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |