Apple’s paranoia is hurting the open Web

Apple’s paranoid approach to developer relations, and, I assume, relations with other browser vendors (and, in fact, relations to anything outside itself) is becoming a serious liability to the open Web. That is the issue we must confront.

via Tired of Safari – QuirksBlog.

HOWTO: Install Node+NPM as user (not root)

HOWTO: Install Node+NPM as user (not root) – if you need to use node.js/npm/grunt/bower and using a shared hosting or can’t/won’t/don’t want to install as root… here’s how you can still get away with it. You’re still going to need something like build-essential installed, though

Adding a new panel to the WordPress Debug Bar plugin

You can extend the WordPress Debug Bar plugin adding new custom panels to fit your needs; for instance, showing responses from external APIs or webservices, or for other custom features.

// the 'debug_bar_panels' filter it's used by the plugin;
// hook into it to add your custom panel
add_filter( 'debug_bar_panels', 'my_custom_panel_init' );

 * Initialize my custom debug panel
 * @param array $panels Debug bar panels objects
 * @return array Debug bar panels with your custom panels
function my_custom_panel_init( $panels ) {
    // you'll be extending the Debug_Bar_Panel class provided
    // by the plugin
    class Debug_Bar_Custom_Panel extends Debug_Bar_Panel{
        public function init(){
            // you should set at least the title of your custom
            // panel. it'll be used as the tab title
            $this->title( 'Custom Panel' );
        public function render(){
            // build and echo your relevant output
    // add your custom panel
    $panels[] = new Debug_Bar_Custom_Panel();
    return $panels;

That’s an extremely simple example. You can check a more complex and complete one by viewing the source of one of the Debug Bar extender plugins, such as the Debug-Bar-Shortcodes GitHub repo.

Debugging memory usage in PHP apps

As your app gets increasingly more complex, you might run into Memory exhausted errors, and even though you can always increase the allowed memory usage — either by tweaking php.ini or locally with ini_set() — it should be a better option to find out what’s using so much memory in the first place.

Continue reading

Are you boy-scouting your code?

Simple, humble and effective. Whenever you’re reviewing old code, or other people’s code, apply one simple rule:

Leave it better than you found it

Are you a boy scout?

An Orangutan Has Some Human Rights, Argentine Court Rules

An Argentine court ruled that an orangutan has some human rights. I get that this is exciting news for animalists, but I’m guessing that post/transhumanists and defenders of AI and other sentient beings might also be thrilled, setting legal precedent for nonhuman rights.


Revisiting the “Cookieless Domain” Recommendation

It’s always nice to see someone question established beliefs, specially on the highly evolving world of web development.

Jonathan Klein from Etsy revisits the “cookieless domain” recommendation for serving static assets (CSS in particular) and analyses the pros, cons and the importance of taking DNS lookups and latency into consideration.

Revisiting the “Cookieless Domain” Recommendation

Comments on the Sony hack

That we live in the world where we aren’t sure if any given cyberattack is the work of a foreign government or a couple of guys should be scary to us all

Bruce Schneier – Comments on the Sony hack

Check Sony got hacked hard: what we know and what we don’t know so far from Wired for a broad synthesis of the hack or A breakdown and analysis of the December, 2014 Sony hack from Risk Based Security for a more detailed perspective.