I often am working with a file and need to copy it’s full absolute path. In the past, I always used pwd to grab the path, then typed a slash then ls’d the file name and copied that. I just stumbled across the realpath command which allows you to do this all in one step for quick copying/pasting of the absolute path.
readlink -f somefile.txt
It’s the little things!
If you’re like me, you’ll note that the process tab from older versions of phpMyAdmin no longer exists on newer versions. I had resorted to viewing the process list in information_schema.PROCESSLIST and then grabbing the process ID and manually running a KILL on it.
Alas, the tool still exists – just look under the “Status” tab. Hooray!
Just found out this lovely tidbit today that IE 11 has decided to drop MSIE from its user-agent. That means that if you need to detect any version of IE, you’ll need to use a different regular expression.
This is what I came up with for my use case. The MSIE part captures <= 10 and the Trident part should capture 11+.
Just a note for myself here, I always forget this one. If you’ve made a change to an apache configuration file for a plesk website, you need to run this command to tell Plesk about it.
This is just a quick tip. Let’s say that you’ve got “http://www.google.com/search?q=1234” in cell B1 in Excel, but you want to display “google.com”. You can use this formula:
=SUBSTITUTE(MID(B1, FIND(“//”, B1)+2, FIND(“/”, B1, FIND(“//”, B1)+2)-8), “www.”, “”)
This isn’t perfect as it assumes you always use “http://”, but it works pretty well for a quick, easy fix.