Create a gist now

Instantly share code, notes, and snippets.

This is how I setup Raspbian on a Raspberry Pi.

Raspbian Setup (Raspberry Pi)

Steps written for 2016-09-23-raspbian-jessie-lite.img at the time of this writing.

sudo raspi-config

Since I'm from the US and primarily use my Raspberry Pis on my Atrix Lapdock, I use these settings:

  • en_US.UTF-8 UTF-8
  • US/Pacific Ocean
  • Generic 104-key PC
  • No AltGr key
  • No compose key

Install/Update Packages

Shell in using ssh -o PubkeyAuthentication=no and run:

  • sudo apt-get update
  • sudo apt-get install vim git
  • sudo apt-get upgrade
  • sudo apt-get autoremove



  • sudo apt-get install python-pip libssl-dev
  • sudo pip install tox
for v in 3.3.6 3.4.3; do
    cd; wget$v/Python-$v.tgz
    tar -xzf Python-$v.tgz; cd Python-$v
    ./configure --prefix=/usr/local && make && sudo make altinstall
    sudo ln -s /usr/local/bin/python${v::3} /usr/bin/python${v::3}
    wget -O - |sudo python${v::3}
    sudo ln -s /usr/local/bin/pip${v::3} /usr/bin/pip${v::3}
    sudo pip${v::3} install virtualenv
sudo rm /usr/local/bin/pip
cd; wget$p-linux-armhf-raspbian.tar.bz2
sudo mkdir /opt/$p
sudo tar -xjf $p-linux-armhf-raspbian.tar.bz2 -C /opt/$p --strip 1
sudo ln -s /opt/$p/bin/pypy3 /usr/bin/pypy3

Simple Git "Server"

Here I'll use terminaltables as an example.

mkdir -p ~/workspace/terminaltables/.git
cd !$ && git init --bare
cat << EOF > hooks/post-receive
while read oldrev newrev ref; do
    branch=\$(echo \$ref |cut -d/ -f3)
    export GIT_WORK_TREE=../\$branch
    [ ! -e \$GIT_WORK_TREE ] && mkdir -p \$GIT_WORK_TREE
    git clean -f -d
    git checkout -f \$branch
chmod +x hooks/post-receive

Run this command on the "client":

  • git remote add rpi ssh://pi@raspberrypi/home/pi/workspace/terminaltables/.git

Is this with Jessie or Wheezy? I'm not having any luck installing pypy3 this way on Jessie.

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