sudo apt-get update sudo apt-get install nagios4 sudo a2enmod auth_digest authz_groupfile sudo service apache2 restart
Get ARP Cache from PowerShell: Get-NetNeighbor
Ping from PowerShell: Test-Connection
Query DNS from PowerShell: Resolve-DnsName
This isn’t really new, but it’s sure worth knowing… The fact that there’s a 128K buffer used to pass arguments to child processes in the Linux Kernel can have the following effect on shell external commands:
When you run commands such as
rm spam* the shell (e.g. bash) will expand the “spam*” to a list of names of all files in the working directory that start with “spam”. That list is then passed to the executable
/bin/rm using the 128K buffer mentioned above. If you have a large number of files, or the list gets long because of long file names, you may get an error message saying
/bin/rm: Argument list too long.
To work around this you can get the list of filenames using
find and pipe it to
xargs which in turn invokes
rm for every single file. There is no limit on the size of a pipe (or at least none that I am aware of for this practical purpose). Here’s the full command:
find . -name 'spam*' -print0 | xargs -0 rm
This differs from similar commands you might find in the
-0 arguments: These are needed in case you have spaces in your filenames.
For an in-depth explanation of both the 128K buffer and the spaces in filenames issue you may also want to read the May 2004 update in this blog post. (See, I told you it’s not really new.)
Let’s assume you have a value in cell E2 that has several components separated by slashes, e.g. a file path. You may find yourself in the position that you need to truncate the value at the last slash, e.g. get the full path of the folder that your file resides in.
The following formula will do the job:
This will return “/path/to/folder”.
Please note that for the formula to work “%” must not be present anywhere in your value. If your value contains “%” you should substitute that in the formula with another character that is not present. (Know your legal characters!)
Update: Works in LibreOffice Calc, too, and I presume OpenOffice Calc will be no different.
In case you’ve ever wondered what the monthly traffic allowance in your web hosting plan means in bandwidth, here’s an easy-to-remember number:
3.19 (month kbit) / (sec GB) – I shall call this the Brian Adkins number
Under the assumption that traffic from a web server only flows in one direction it means that for every GB (gigabyte) of monthly traffic included in your plan you could consume 3.19 kbit/s constantly. Or for every TB (terabyte) of traffic allowed per month you can transmit data at a constant rate of 3.19 Mbit/s.
I have recently released my newest WordPress plugin to the public:
Smart Quotes should appeal to the international audience. E.g. if you’re a German writer and would like to use German book style quotation marks (»…«) even when you type so-called "dumb" quotes or use the <q> element: This plugin is for you!
Right now the plugin comes with shortcuts for Croatian/Hungarian/Polish/Romanian style quotation marks („…”), Czech or German style („…“), Danish (or German books) style (»…«), Finnish or Swedish style (”…”), French style (« … » – with spaces), Greek/Italian/Norwegian/Portuguese/Russian/Spanish/Swiss style («…» – without spaces), Japanese or Traditional Chinese style (「⋯」), but you’re free to manually enter/paste any arbitrary characters or character combinations.
After you’ve installed the plugin go to your Wrting Settings screen where you will find this:
Right now the plugin comes in English and with a German translation, but for “Smart Quotes” I’d be particularly interested in adding more languages. Contact me if you think you can help! The .POT file for this one is really small, so I’m thinking it could be a quick fix. – If you have never translated software before: this thread on Lester Chan’s Forums is a good start and it’s specific to WordPress plugins.
I use revision control systems for almost all of my software development, deployment, and server configuration. When using Subversion there is, technically, no difference between a working copy on my personal or development machines vs. a working copy on a production server. (Yes, you need a working copy on the production server, because exports cannot be updated that easily.) However, modifications of the checked out code or config files on a production server can cause problems with the next round of updates. Sometimes you just don’t notice that there are conflicts that need to be resolved.
To make sure I notice when a colleague or I have fallen back into the bad habit of changing things on a production server directly, rather than checking in changes to the repository, I have created a Nagios Plugin: it’s called “check_svnstatus”