Codeschnippsel

So recently I’ve not been able to connect to the eduroam WiFi at the Technische Universität München in Garching Forschungszentrum. I’m guessing the RBG is running some specialized DHCP server that is not compatible with the newest NetworkManager version in Arch Linux. So to fix this, edit the file “/etc/NetworkManager/Networkmanager.conf” and comment out this file like so: #dhcp=internal Credits to Philipp and Simon, for saving me lots of headaches.

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 branches which were deleted on the server. If your remote is called origin then just type enter it like so::

Sometimes its useful to show data received / processed through PHP in the browser for debugging purposes. Yes you can use Firebug or some of those fancy debugging classes, but maybe you just want to view that damn array quickly 🙂 Use this: function dumpMe($arr) { echo str_replace(array(“\n”, ‘ ‘), array(‘ ‘, ‘ ‘), print_r($arr, true)) . ‘ ‘; }

In order to use RBL lists on your postfix setup to block spam replace this line in main.cf: smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf with: smtpd_sender_restrictions = reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_non_fqdn_sender, reject_unknown_sender_domain, check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf You can copy and paste the line with any ISPConfig setup. If you don’t use mysql to authenticate your users then you might need to adapt parts of this setting.