Category archives: programming

Having Trouble Removing New Relic Javascript?

Have you tried removing New Relic’s WordPress plugin, yet still have New Relic JavaScript displaying on your webpage? Have you deleted every trace of New Relic from your MySQL database, yet the script still appears in the HTML?

Worry not. PHP is automatically inserting the JavaScript. Below is one simple solution. You must edit (or add) the following line in your php.ini or comparable file as follows:

newrelic.browser_monitoring.auto_instrument = false

That’s it!

Unable to Edit or Rotate Images in WordPress

Have you ever experienced the following error in WordPress:

Could Not Load the Preview Image
Chances are you have WHM/cPanel and are running ModSecurity with the following rules enabled:

950120, 960015, 981243, 981044, 981049, 950901, 981245, 981243, 981257
If you have access to WHM yourself, you can disable the rules yourself.

  1. Log into WHM
  2. Navigate to Security Center
  3. Click on ModSecurity Tools
  4. Search for each of rules 950120, 960015, 981243, 981044, 981049, 950901, 981245, 981243, 981257
  5. Choose to Disable each rule
  6. Restart Apache after you disable each rule

Get Back the System Sleep Preferences in Mac OS X

I recently purchased a Mac Pro (late 2013) and discovered that the Energy Saver Pane is a little different; most notably, the Computer Sleep slider is missing. Here is how to get it back.

First, use the following terminal commands to determine the model and board ID of your computer:

sysctl hw.model | awk '{ print $2 }'

Second, navigate to the following folder:

cd /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources/

Third, determine the .plist file that corresponds to the model and board ID of your computer; e.g., Mac-F60DEB81FF30ACF6.plist.

Fourth, modify the file that corresponds to the model and board ID of your computer:

sudo vi /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/X86PlatformPlugin.kext/Contents/Resources/Mac-UDID.plist

Fifth, change the following line:




Sixth, regenerate kext cache by “touching” the Extensions directory:

sudo touch /System/Library/Extensions

Finally, wait a minute just to make sure the system has enough time to finish regenerating the kext cache. Then, reboot your mac.

Alas, you will once again have the two-slider pane.

System Energy Dual Preferences

Make WordPress Print Pretty

Making your WordPress site print-friendly is probably not the first thing on your GTD list. However, the process is relatively straightforward. The simplest method is editing your existing header.php and style.css files.

First, look for the HTML declaration in your theme’s main file, usually header.php. Search for something like this:

<link rel="stylesheet" 

Change the last attribute to:

media="screen, print"

Second, it’s time to edit your theme’s CSS file, usually style.css. Add the following code to the bottom of the stylesheet:

@media print and (color) {
* {
     -webkit-print-color-adjust: exact;
     print-color-adjust: exact;

That’s it! If you have caching enabled, remember to empty your cache. Happy printing.

Hide SafeMonk Shortcut on Mac Desktop





five Mac OS X Snow Leopard Tweaks I Can’t Live Without

1.) Always view attachments as icons.

defaults write DisableInlineAttachmentViewing -bool yes

Restart, and voila!

2.) Use a spacer to split the Dock between Docked applications and non-Docked applications.

defaults write persistent-apps -array-add
'{"tile-type"="spacer-tile";}' && killall Dock

3.) Add one or more stacks of recently used items.

defaults write persistent-others -array-add 
&& killall Dock

4.) Enable new List view in Dock Stacks.

defaults write use-new-list-stack -bool yes 
&& killall Dock

5.) Enables gradient effect on mouse over.

defaults write mouse-over-hilite-stack -boolean yes 
&& killall Dock