Pages
-
Recent Posts
- Revolving Door: MPAA Hires Chief USTR Negotiator Behind ACTA And TPP’s IP Chapter
- Copyright Maximalists’ Incredible Sense Of Entitlement: If It Challenges The Biz Model We Chose, It Must Be Illegal
- Turkey’s Prime Minister Sues His Own Country Over Twitter
- Picturefill 2
- Police File On Student ‘Bullied Into Committing Suicide’ Strangely Lacking In Evidence Of Bullying
Archives
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- December 2008
- November 2008
- October 2008
Meta
Category Archives: tips & tricks
PHPHOST BLOG
Web Hosting Related Articles You May Need
[one-liner]: Overview of Bash I/O Redirection
Background
I recently came across this question on the Stackexchange site Unix & Linux. This question was interesting in the sense that it covered much of the I/O redirection facilities that are available in the Bash Shell, so for posterity sake I’m adding my answer to this question here on my blog.
Solution
a number 1 = standard […]
Posted in bash, one-liner, script, shell, Syndicated, tips & tricks
Comments Off on [one-liner]: Overview of Bash I/O Redirection
[one-liner]: Fixing the WordPress “Plugin Enhanced Recent Posts” in WP v3.5.1
Background
I’ve been using the WordPress plugin, Enhanced Recent Posts, for several years now and during an upgrade to several plugins on WP 3.5.1, I noticed that I was no longer able to unroll/roll my widgets (see the 2nd screenshot below) in the Widgets area of WordPress under the menu Appearances -> Widgets (see the 1st […]
Posted in one-liner, Syndicated, tips & tricks, wordpress, wordpress plugin
Comments Off on [one-liner]: Fixing the WordPress “Plugin Enhanced Recent Posts” in WP v3.5.1
[one-liner]: How can I Trigger a Notification When a Command Line Job/Process Ends?
Background
Occasionally I need to notify myself when a long running command has finished. Here are a couple of tricks that I use to give me either a audible or visual notification.
Solution
The trick with this is to construct your command like so:
1
% command; command-after &
Then in the command-after position you can do things like this:
1
2
3
4
5
6
7
8
# ring […]
Readers who viewed this page, also viewed:
Posted in monitoring, notification, one-liner, script, Syndicated, tips & tricks
Comments Off on [one-liner]: How can I Trigger a Notification When a Command Line Job/Process Ends?
[one-liner]: How to Manipulate an Image Files Modify/Create Date/Time
Background
Recently I answer a question on superuser.com about how to modify the modify/create time/date on an image file such as a TIFF or PSD formatted file.
Solution
There are basically 2 ways to change the modify/create meta data on a file:
From the file-system’s perspective.
Within a file’s metadata.
NOTE: If you’d like to follow along here’s a sample PSD […]
Posted in file-format, images, one-liner, Syndicated, tip, tips & tricks
Comments Off on [one-liner]: How to Manipulate an Image Files Modify/Create Date/Time
[one-liner]: Statically building Subversion on Fedora 14
Background
In my experience it can be tricky to compile applications that make use of 3rd party libraries and/or system libraries such as glibc etc. The problem is that in addition to your application being built statically, all these libraries need to provide both a dynamic (.so) version as well as a static version (.a) and […]
Readers who viewed this page, also viewed:
Posted in compiling, linux, one-liner, programming, Syndicated, tip, tips & tricks
Comments Off on [one-liner]: Statically building Subversion on Fedora 14
[one-liner]: Howto get your WAN IP Address
Background
I’ve seen this question asked MANY times over the years and thought I’d write up all the various ways I’m familiar with getting your WAN IP (ISP provided) address. But before we start here’s a quick overview of some of the terminology.
IP Address:a number that identifies your computer on a network from other computers on […]
Readers who viewed this page, also viewed:
Posted in linux, networking, one-liner, Syndicated, tips & tricks
Comments Off on [one-liner]: Howto get your WAN IP Address
Howto Create a Daily Rotating Log in Perl using Log::Log4Perl
Background
Recently while cruising StackOverflow I came across this question where a user was trying to use the Perl module Log::Log4Perl. Log4Perl provides a mechanism similar to log4j (logging for Java) for logging mesages to various outputs such as the console or a log file. I’ve used this module a couple of times in the past […] Continue reading
Posted in perl, programming, Syndicated, tip, tips & tricks
Comments Off on Howto Create a Daily Rotating Log in Perl using Log::Log4Perl
[one-liner]: Monitoring Network Traffic with Netstat on Linux
Background
This is a quick guide to some not so obvious command-line options available in the Linux netstat(8) command. I hope you enjoy it.
Solution
1. Plain old netstat
Without any command-line arguments, “netstat” shows a list of network connections in your system, including TCP, UDP and UNIX socket connections. If you want to speed up things a bit, […] Continue reading
Posted in linux, monitoring, one-liner, redhat, rhel, Syndicated, sysadmin, tips & tricks
Comments Off on [one-liner]: Monitoring Network Traffic with Netstat on Linux
[one-liner]: LibreOffice Calc Keeps Messing with Dates
Background
I recently received an Excel spreadsheet (.xlsx) file that included dates for holidays for 2013 as my office. Dates that should’ve been displayed as 2013 dates were being displayed as 2016. I’m using a pretty recent version of LibreOffice, 3.6.0.4 (Build ID: 932b512), having just installed it on Aug 12, 2012.
bad dates
Solution
I hadn’t run […] Continue reading
Posted in LibreOffice, one-liner, Syndicated, tips & tricks
Comments Off on [one-liner]: LibreOffice Calc Keeps Messing with Dates
[one-liner]: Using scp to Copy Files that Contain Spaces
Background
Have you ever needed to copy either a single file or a directory that contains spaces using scp? Here are a couple of techniques for how to do this.
Solution
Here are several ways to accomplish the same thing. Copying a entire directory with spaces and copying a file with spaces using scp.
1
2
3
4
5
6
7
# Ways to copy entire […] Continue reading
Posted in bash, one-liner, script, Syndicated, sysadmin, tip, tips & tricks
Comments Off on [one-liner]: Using scp to Copy Files that Contain Spaces