New hardware, who dis?

New laptop provided by work. Time to install everything that makes me productive as a PHP developer.

Using Kubuntu 21.10 as my base OS.

General utilities:

sudo apt install \
    openssh-server \
    net-tools \
    htop \
    curl \
    whois \
    ack \
    mysql-client \
    httpie \
    php-cli \
    freerdp2-x11 \
    meld \
    kcachegrind \
    vokoscreen-ng \
    autokey-qt \
    parlatype \
    thunderbird-locale-en-gb \
    libreoffice-calc \
    libreoffice-writer \
    libreoffice-draw \


sudo snap install \
    spotify \
    skype \
    postman \
    authy \

Snaps that need to be installed in “classic” mode:

sudo snap install --classic \
    slack \

Microsoft Edge:

echo 'deb [arch=amd64] stable main' | sudo tee /etc/apt/sources.list.d/microsoft-edge.list

sudo apt-key adv --keyserver hkp:// --recv EB3E94ADBE1229CF

sudo apt update && sudo apt install microsoft-edge-beta

VirtualBox: (recommend sticking with ubuntu version unless latest required)

echo "deb [arch=amd64] $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/oracle-virtualbox.list

wget -q -O- | sudo apt-key add -

wget -q -O- | sudo apt-key add -

sudo apt update && sudo apt install virtualbox-6.1


echo "deb [arch=amd64] $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/vagrant.list

curl -fsSL | sudo apt-key add -

sudo apt-get update && sudo apt-get install vagrant


echo "deb [arch=amd64] $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list

curl -fsSL | sudo apt-key add -

sudo apt update && sudo apt-get install docker-ce docker-ce-cli

sudo usermod -a -G docker $USER

Docker Compose (v1):

curl -L "$(uname -s)-$(uname -m)" -o /tmp/docker-compose

chmod +x /tmp/docker-compose

sudo mv /tmp/docker-compose /usr/local/bin/docker-compose


sudo apt-key adv --keyserver --recv-keys ACCAF35C

echo "deb$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) non-free contrib" | sudo tee /etc/apt/sources.list.d/insync.list

sudo apt update && sudo apt install insync


git clone ~/.bash-git-prompt --depth=1

tee -a ~/.bashrc <<EOF

if [ -f "$HOME/.bash-git-prompt/" ]; then
    source $HOME/.bash-git-prompt/

vagrant plugin “hostmanager” sudo without password

sudo tee /etc/sudoers.d/vagrant_hostmanager <<EOF
Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp $HOME/.vagrant.d/tmp/hosts.local /etc/hosts


sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install ansible

Additional monitor resolution

Help from:

sudo tee /etc/profile.d/ <<EOF
xrandr --newmode "2560x1440_60.00"  312.25  2560 2752 3024 3488  1440 1443 1448 1493 -hsync +vsync
xrandr --addmode DP-3-2 "2560x1440_60.00"

old and busted: mysqldump, new hotness: mydumper

I’m late to the mydumper party –

Multi-threaded, lightning quick, exports to files per table structure and data.

In the Ubuntu world (and likely Debian too) it’s available as a precompiled package: sudo apt update && sudo apt install mydumper

Backup everything in a database:

mydumper \
  --triggers \
  --routines \
  --events \
  --database name_of_source_database

It’ll create a date stamped directory with two files for each table. One for the schema, the other with the data.

If you want to import everything in one go, here’s a little bit of bash to help:

# 1st - import all of the schema files to create the
#   tables, triggers, routines, and events
for i in `ls *-schema.sql`; do
    echo -e "\nImporting schema file: ${i}"
    pv ${i} | mysql name_of_target_database

# 2nd - import all of the table data
for i in `ls *.sql | grep -v '\-schema.sql'`; do
    echo -e "\nImporting data file: ${i}"
    pv ${i} | mysql name_of_target_database

The above uses pv (pipe viewer – to send the content of the files into mysql. This means that we get to see the progress of importing files into MySQL.

If you haven’t got pv I suggest you get it: sudo apt update && sudo apt install pv.