Skip to content

Instantly share code, notes, and snippets.

@vochicong
Last active July 22, 2020 21:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vochicong/c145a37e21cada1eaf6f451eb1653868 to your computer and use it in GitHub Desktop.
Save vochicong/c145a37e21cada1eaf6f451eb1653868 to your computer and use it in GitHub Desktop.
Dev env on ChromeOS
wget -q -O - https://raw.github.com/skycocker/chromebrew/master/install.sh | bash # 30s
crew install buildessential # 4m
crew install vim # 1h?
git clone https://github.com/rbenv/rbenv.git /usr/local/workspace/.rbenv
ln -s /usr/local/workspace/.rbenv ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
echo 'export TMPDIR=/usr/local/tmp/' >> ~/.bash_profile
. ~/.bash_profile
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
rbenv install 2.3.3 # 30m
crew install node_current
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
mv ~/.pyenv/ /usr/local/workspace/
ln -s /usr/local/workspace/.pyenv/ ~/
cat <<EOF >> ~/.bash_profile
export PATH="/home/chronos/user/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
EOF
. ~/.bash_profile
pyenv install 3.6.2 # 10m
pyenv global 3.6.2
pyenv rehash
curl -O https://dl.google.com/dl/cloudsdk/release/install_google_cloud_sdk.bash
bash install_google_cloud_sdk.bash --install-dir=/usr/local --disable-prompts
# ignore some error ragarding unknown [gcloud-deps]
gcloud components update
echo 'export PATH=/usr/local/google-cloud-sdk/bin/:$PATH' >> ~/.bash_profile
exec -l $SHELL
gcloud init
# gcloud auth login
# gcloud config set project $PROJECT_ID
# To SSH to GCE instance
gcloud compute ssh --zone us-central1-c congvc@$GCE_INSTANCE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment