Skip to content

Instantly share code, notes, and snippets.

@squarism
Last active January 11, 2020 22:54
Show Gist options
  • Save squarism/20f33275ad4b5c21ec6b to your computer and use it in GitHub Desktop.
Save squarism/20f33275ad4b5c21ec6b to your computer and use it in GitHub Desktop.
Linux Dev Box

What?

What were the first things I typed when installing Linux Mint (or Ubuntu 14.10) on a workstation? A lot of this isn't going to be useful to you. I'm sorry. I hope there are some nuggets in here.

Also, maybe this is a lol, linux desktop hasn't changed in 10 years. :neckbeard:

Basics

If dev box or server that eventually might have Ruby on it. RVM will probably take care of this for you. But hey. Maybe you aren't doing Ruby or RVM stuff but I bet you'll be doing XML stuff if this is a dev box.

sudo apt-get install build-essential libxml2-dev libxslt1-dev

Customizing

Set gnome-terminal to use a login shell. Profile -> Profile Preferences -> Title and Command -> Run command as a login shell. This will be sort of a critical detail for the rest of these instructions. It will keep you from having to log out of the desktop when env stuff changes.

Grab a decent font like Source Code Pro.

Replace sources with a local mirror. Change the mirror if you aren't in the Pacific NW. 🌲

cp /etc/apt/sources.list /tmp
sudo sed -ie 's/us\.archive\.ubuntu\.com/ubuntu\.osuosl\.org/' /etc/apt/sources.list

Make yourself own /opt. I like putting installs there. Stuff where there isn't an OS package.

OS Packages

sudo apt-get install -y build-essential ctags openjdk-7-jdk nodejs \
libcurl4-openssl-dev curl tmux zsh git vim libxc-dev

Extra PPAs

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"

sudo apt-get update
sudo apt-get install google-chrome-stable lxc-docker

Dev

Zsh

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
chsh -s /bin/zsh
# logout of everything (yes the GUI)

Golang

# Install go to /usr/local/go - default
cd ~/Downloads
wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
tar xzf ~/Downloads/go1.4.2.linux-amd64.tar.gz
sudo mv go /usr/local
mkdir -p ~/src/go         # go workspace
# .zshenv
path+=/usr/local/go/bin
# probably need to close shell

go get github.com/tools/godep
rehash

Ruby

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby
source ~/.rvm/scripts/rvm
gem install bundler

Vim

This requires rake. So, it's done after ruby. 🍰

Vim base vimrc from janus-vim

curl -Lo- https://bit.ly/janus-bootstrap | bash

# edit ~/.vimrc.before
let mapleader = ","

# put any other vim plugins in ~/.janus, this doesn't exist yet
mkdir ~/.janus

Misc

# .zshenv
edit ~/.zshenv with git commit variables
# debian package calls the binary nodejs.  hmm.
alias node='nodejs'

## fix mouse sensitivity
#cat ~/bin/mouse-fix.sh`

#!/bin/bash

# You have set mouse sentivitiy all the way down in Ubuntu or Linux Mint and
# it's still too sensitive?
# Maybe you have one of those gaming mice?

# For some reason, I get two mouse devices here.
DEVIDS=`xinput list | grep "Gaming Mouse" | sed -e "s/^.*id=\([0-9]\+\).*/\1/"`
DEVID=($DEVIDS)

if [ "${DEVID[0]}" != "" ]; then
  xinput --set-prop $DEVID "Device Accel Constant Deceleration" 2
  echo Set device deceleration for device $DEVID.
fi

# Then add this to startup applications on login 
# (Menu->Preferences->Startup Applications)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment