Posted in: 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:

Credits to Philipp and Simon, for saving me lots of headaches.

Read the PostNo connection within eduroam WiFi at TUM

Posted in: Codeschnippsel

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:

Thanks to proft.me for providing this!

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

Posted in: Codeschnippsel

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:

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::

Read the PostGit command of the day: git remote prune

Posted in: Codeschnippsel
Posted in: Codeschnippsel
Posted in: Codeschnippsel

Useful when converting between those two formats often:

in the other direction you can use the mighty strtotime function, o god I love PHP so much <3 (Yes Java, your Date object is a…

Read the PostFormat a PHP Timestamp to Mysql Datetime/Timestamp

Posted in: Codeschnippsel

In order to use RBL lists on your postfix setup to block spam replace this line in main.cf:

  with:

  You can copy and paste the line with any ISPConfig setup. If…

Read the PostBetter SPAM protection with Postfix

Posted in: Codeschnippsel

When handling file uploads its handy to check beforehand if the file fits insides the restrictions PHP sets in its ini file. To determine these the following functions are really handy:

Read the PostPHP: Get maximum upload filesize

Posted in: Codeschnippsel

Beim Thema Vererbung ist man schnell mal verwirrt, vor allem wenn sich da auch Statische Methoden reinmischen. Zur klarstellung sollte man sich verdeutlichen, was der Unterschied zwischen dem statischen und dem dynamischen Datentypen einer Variable ist.   Read the PostJava: Statischer vs. Dynamischer Typ

Posted in: Codeschnippsel

Wenn man zwei symmetrische Arrays (Gleiche Anzahl von Elementen) hat und man möchte über diese gleichzeitig iterieren, dann wird das mit einem normalen Foreach nicht funktionieren. Man kann hier allerdings ein bisschen tricksen und die…

Read the PostPHP Foreach über zwei Arrays