Skip to content

Instantly share code, notes, and snippets.

@packetchef
Last active April 11, 2021 18:15
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 packetchef/ce53098d4075457793a03da2b9b7480b to your computer and use it in GitHub Desktop.
Save packetchef/ce53098d4075457793a03da2b9b7480b to your computer and use it in GitHub Desktop.
Chromebook dev setup

Software

VS Code

Download deb from Microsoft

Python 3

ln -s $(which python) ~/bin/python or alias python=python3

Don't forget pip: sudo apt-get install python3-pip

And virtualenv: pip install --user virtualenv

node & npm

Download binary from nodejs

AWS CLI

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install

Powershell

See instructions at https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux

Other packages

Install from apt:

  • dnsutils: provides dig
  • build-essential: provides common build utilities

Config

Bash

Miscellany to add to .bash_profile: export PATH="~/bin:$PATH

And make sure you're always running pip in virtualenv, unless you explicitly want to install globally:

export PIP_REQUIRE_VIRTUALENV=true
gpip() {
  PIP_REQUIRE_VIRTUALENV="" pip "$@"
}

Include time in shell prompt: export PS1="[\t \u@\h:\w]$ "

Or, fill the terminal with "-" followed by the date:

nlexec(){
    nlDate=$(date +"%H:%M:%S")
    nlWidth=$((COLUMNS - 9))
    printf -v row "%${nlWidth}s"; echo -e "\033[2;37m${row// /-} $nlDate\033[0m"
}
export PROMPT_COMMAND=nlexec

In the above example, the "\033" escape character is followed by a "2" for dim and "37" for light gray.

Print working directory after a cd.

cd() {
    if [[ $@ == '-' ]]; then
        builtin cd "$@" > /dev/null  # We'll handle pwd.
    else
        builtin cd "$@"
    fi
    echo -e "   \033[1;30m"`pwd`"\033[0m"
}

Tilde

Certificates

Export from tildeca, use Chrome settings to import as an authority

Add DHCP reservation, forward and reverse DNS - ChromeOS WiFi settings to validate MAC address

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