“libGL error: unable to load driver: i965_dri.so” fix

So I actually rarely encounter any problems with my Arch Linux, but sometimes they just want to see the world burn. Apparently after updating the mesa driver, so library got lost.

Easy fix:

# Arch Linux
mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6{,.bak}
mv ~/Android/Sdk/tools/lib64/libstdc++/libstdc++.so.6.0.18{,.bak}
ln -s /usr/lib/libstdc++.so  ~/Android/Sdk/tools/lib64/libstdc++/

Thanks to proft.me for providing this!

Git command of the day: git remote prune

In this series of posts I’ll document useful git commands ready to copy&paste which nobody knows by heart but you need once in a while. Today:

git remote prune <name>

From the docs:

prune

Deletes all stale remote-tracking branches under <name>. These stale branches have already been removed from the remote repository referenced by <name>, but are still locally available in “remotes/<name>”.

    With --dry-run option, report what branches will be pruned, but do not actually prune them.

Very useful when working with Github and you just merged a PR then usually you also delete the branch on the remote immediately after. This does not however delete the branch from your local repository and over time it can get messy. With this simple command you delete all local references tracking upstream branches which were deleted on the server. If your remote is called origin then just type enter it like so::

git remote prune origin