Category Archives: Short Tips

Short Tip: Moving commits between branches

Sometimes you are developing on a huge new feature on a software project. If you are smart you do it in a separate (feature-) branch. During the development cycle you may modify existing code and after a few days you … Continue reading

Posted in General, Linux, Short Tips | Leave a comment

Securing Postfix on a shared Webserver

I’m operating a webserver for shared webspace accounts. I’m not responsible for the stuff hosted on the webspace, but for the server itself. Many people like to host their wordpress or joomla on this server, both scripts are well known … Continue reading

Posted in General, IT-Security, Linux, Short Tips | Leave a comment

Fighting PHP spam

A good friend owns a very old joomla website which has been hacked. It is massively sending spam, how can we investigate this? First of all, reject outgoing mails in your firewall (ferm.conf style): Now we have time to investigate. … Continue reading

Posted in General, IT-Security, Linux, Short Tips | Leave a comment

Extending Disk Capacity for KVM Virtual Machines

From time to time, your data grows and a virtual machine is getting filled up. Here is a short tutorial for extending the disk capacity for KVM machines on LVM2: First step: Poweroff the machine. This is a good situation … Continue reading

Posted in 30in30, General, Linux, Short Tips | Leave a comment

Installing pry on verrrrry old systems

Everybody loves pry. If you don’t know it: pry is an interactive ruby shell, like irb, but nicer (it hase more colours![and other cool features]). I’ve got a few old CentOS 6 nodes with a very old ruby version: # … Continue reading

Posted in 30in30, General, Linux, Short Tips | 1 Comment

Fixing a messed up git directory

Following situation: You have got a cloned repository in your home directory, you noticed that something changed upstream und you want to get all the fancy changes. You do a: to get the latest tag. What you didn’t check: What … Continue reading

Posted in 30in30, General, Linux, Short Tips | Leave a comment

Short Tip: Smart Tests für alle Datenträger starten

Zuerst suchen wir uns per find alle Datenträger: Danach überlegt man sich das Kommando um den Test zu starten: Und dann kann man dies wunderbar verbinden:

Posted in General, Linux, Short Tips | Leave a comment

Archlinux: Nicht mehr benötigte Pakete deinstallieren

Der Paketmanager pacman kann ein Paket entfernen inklusive der Konfigurationsdateien und rekursiv alle abhängigen Pakete: Außerdem kann pacman eine Liste an Paketen ausgeben, welche automatisch als Abhängigkeit installiert wurden, aber nicht mehr benötigt werden: Das ganze kann nun kombiniert werden … Continue reading

Posted in General, Linux, Short Tips | Leave a comment

Linux Short Tip: Hübsche Tabellen

psql kann hübsche Unicode Tabellen erzeugen, dazu legt man einfach eine ~/.psqlrc Datei an mit folgendem Inhalt: Das Ergebnis sieht dann so aus: Vorher:

Posted in General, Linux, Short Tips | Leave a comment

Postgres Short Tips

In der Standardinstallation von Postgres darf der lokale User postgres via localhost auf den Server zugreifen: Auflisten aller Datenbanken auf dem Server: Auflisten aller User: Das Postgres eigene Yum Repository für 9.4 unter CentOS einrichten + Postgres updaten: Eine Datenbank … Continue reading

Posted in General, Linux, Puppet, Short Tips | Leave a comment