Author: Ashfame
-

Keeping tab on Google Analytics Realtime view without staring at it
Contains Embedded Gist of Javascript code + GIF of the end-result in action
-
Setting cron to be run as root
In Linux based distros, its very simple to setup cron for repeated tasks by using `crontab -e` for editing the crontab of the current user as you are logged in. You can view the contents of your crontab by `crontab -l`. But if you need to call something with root privileges, its as simple as…
-
Verify sending domain inside Mandrill without email hosting
Mandrill has enforced upon us that the only way to verify a sending-domain (domain used to send emails from) is by getting an email sent by them on an email of the sending-domain in use. So, if you use **example.org** or **something.example.org** to send emails, you can now only verify your sending-domain, by receiving an…
-
Store Just WordPress Transients Persistently
WordPress comes with an option of keeping cache in a persistent storage, if provided. It provides a great deal of performance since everything that WordPress was doing repeatedly on each page request now can be saved in the persistent cache storage (APC / Memcached / Redis) and retrieve easily & very fastly without doing much…
-
Override WP-CLI commands
If you already don’t know about WP-CLI, its a pretty great tool to manage a WordPress install via terminal commands. This essentially gives you a lot of power enabling you to interact with the WordPress install just by commands and not having to interact with UI at all. Read more at [WP-CLI’s homepage](http://wp-cli.org/). It can…
-
Filtering transient expiration time in WordPress
As of now WordPress, doesn’t offer a filter to control the expiration of the transient while its being set, so I quickly wanted to share a quick snippet I found on Trac, written by Andrew Nacin. Here is the snippet: Basically, `’set_transient_’ . $transient` hook is fired once the transient gets saved, so it saves…
-
Quickest way to get timestamp of a time in a particular timezone in PHP
Playing with timezone conversions can be crazy, it still confuses me every time and I have to wait a minute to run some test code to figure out what’s it that I am trying to do here. Anyway, the quickest way I have to get timestamp of a time in particular time zone is This…