> Check out a _link from OBS

If you're looking to edit the _link file stored in the repository underlying your OBS you can check it out with the --unexpand-link option. Otherwise you'll end up with the _service file: osc checkout --unexpand-link <Project> <Package> # or if you're already in the project's directory: osc…

> Always Display Filename with grep

The easiest way to accomplish this is if you have a relatively recent GNU version of grep. Then the -H version is available to you: printf "This\nis\a\ntest" > /tmp/grep.test grep -H 'is' /tmp/grep.test /tmp/grep.test:This /tmp/grep.test:is But if…

> Add/Remove Passphrase from Existing Private Key

If you've got a private key you're fond of that either has or lacks a passphrase(password) and you'd like to add (because you'd like to put it someplace you trust slightly less) or remove (because you're moving it someplace you trust more [really?]) it's really straight forward. To add…

> Best Way to Copy Dotfiles

I've seen a lot of convoluted solutions floating around regarding how to copy files starting with .. The problem everyone is trying to avoid is that when you run something like: cp -r A/.* B/ The above command starts copying everything the entire "A" directory (.) and then from the parent directory…

> sSMTP Certificate Fix for "send-mail: Cannot open smtp.gmail.com:587"

If your sSMTP is configured to use gmail is giving you the following error: send-mail: Cannot open smtp.gmail.com:587 and in /var/log/maillog you see: sSMTP: SSL not working: certificate verify failed (20) sSMTP: Cannot open smtp.gmail.com:587 adding below line to /etc/ssmtp/ssmtp.…

> Become an SSH Ninja: SSH Tips and Tricks

OpenSSH has some pretty cool tricks up its sleeve beyond it's "Clark Kent"-esque ability to provide a secure command line interface on a remote system. Here are some of its more "Superman"-type abilities: Public-Key Authentication Learn to Love Your .ssh/config Agent Forwarding Sharing Connections Bonus Use Tab-Completion…

> Make sSMTP Non-Blocking for PHP

If you're trying to send e-mail from PHP (in Drupal or not) using sSMTP you'll find any page sending an e-mail out stalling for several seconds while sSMTP logs in and sends the e-mail out. It's a serious performance hit and can make using your website rather annoying. If you're…

> Redirect Output of an Already Running Process

Have you ever started a long running command and then wanted to put it in the background but it's sending its output to STDOUT? Here's a script that uses gdb to swap a processes file descriptors so you can send all that output to a file, or /dev/null after…

> Use Redirection Instead of Temp Files

There are certain commands that really want to read input in from a file, like diff. However, if what you're trying to manipulate or use with one of these commands is actually output from another command usually you'd have to write this information out to a file before reading it…

> Use Apache as a Reverse Proxy to another Service

If you've got another web application running on your server, but still want it served up on port 80 or 443 you can use Apache's mod_proxy to forward traffic from Apache to your application. An example would be if your web application is running on http://localhost:8080 you…