This slideshow could not be started. Try refreshing the page or viewing it in another browser.
Review: Peter Nimble and His Fantastic Eyes
Peter Nimble and His Fantastic Eyes by Jonathan Auxier
My rating: 3 of 5 stars
This was a fun read but I had a hard time getting into it. The narration was a bit inconsistent, the dialog and characters seemed a bit forced. And I had a hard time getting over the fact that what seems obviously like a children’s book has so much blood.
Managing Your Editorial Workflow (WordCamp Toronto 2011)
The video of presentation at WordCamp Toronto 2011 on “Managing your Editorial Workflow” where I talk mostly about Edit Flow.
Looks like the video was cut off, which is probably a good thing since it wasn’t really my best performance (being my first WordCamp presentation and all). I also flail my arms alot.
WordPress Debugging (WordCamp NYC 2012 Talk)
Here’s my presentation slides from WordCamp NYC 2012. Click on the slide below to go full-screen and arrow keys to navigate.
This slideshow could not be started. Try refreshing the page or viewing it in another browser.
Co-Authors Plus v2.6
Co-Authors Plus v2.6: Search user’s display names, change byline order and more | danielbachhuber.
Thanks to Daniel, Co-Authors Plus, which I’ve long neglected, finally has an update with some long-overdue bug fixes and some sweet new features.
Photo: Bloodsucker
We are all WordPress
We all use it, we love it, and we want to learn it, teach others, and help WordPress become even better.
We are all WordPress.
Hello, Automattic
The need to code | jacquesmattheij.com
It’s like a drug. I’m still fascinated by it, even almost 30 years to the day later I still read about languages, new ways to solve old problems, all kinds of developments in software and hardware as though it is the first time that I hear about these things. It is a fascinating world, the world of software.
JavaScript Countdown Timer
I was in search of a JavaScript countdown timer (mainly because I’m too lazy to build it out myself — and because I’m sure millions before me have done the same), but Google wasn’t doing me much good. Most scripts would modify the DOM, directly but not make it easy to programmatically intercept the remaining time.
So, I picked one of the cleanest scripts and cleaned it up a bit.
/** * A sweet js countdown timer with a custom callback that gives you a JSON object! * Heavily modified code originally found on http://www.ricocheting.com/code/javascript/html-generator/countdown-timer * * @param string|Date String representation of when to countdown to. Date objects probably work too * @param callback Function triggered when the interval has passed * @param int Number of milliseconds for the timeout. Defaults to 1000 (1 second) * * @return object Returns a JSON object with properties: days, hours, minutes, seconds */ timer = function(endDate, callback, interval) { endDate = new Date(endDate); interval = interval || 1000; var currentDate = new Date() , millisecondDiff = endDate.getTime() - currentDate.getTime() // get difference in milliseconds , timeRemaining = { days: 0 , hours: 0 , minutes: 0 , seconds: 0 } ; if(millisecondDiff > 0) { millisecondDiff = Math.floor( millisecondDiff/1000 ); // kill the "milliseconds" so just secs timeRemaining.days = Math.floor( millisecondDiff/86400 ); // days millisecondDiff = millisecondDiff % 86400; timeRemaining.hours = Math.floor( millisecondDiff/3600 ); // hours millisecondDiff = millisecondDiff % 3600; timeRemaining.minutes = Math.floor( millisecondDiff/60 ); // minutes millisecondDiff = millisecondDiff % 60; timeRemaining.seconds = Math.floor(millisecondDiff); // seconds setTimeout(function() { timer(endDate, callback); }, interval); } callback(timeRemaining); }
It’s easy to use! You specify an end date (as a string, though Date object’s should work as well) and pass in a callback that gets triggered at a set interval. The callback receives a JSON object with properties for days, hours, minutes and seconds. You can pass in a custom interval if you want the callback triggered at a different period. Examples below.
timer('2011-12-31', function(timeRemaining) { console.log('Timer 1:', timeRemaining); }); // This will run every minute, instead of every second timer('2012-12-31', function(timeRemaining) { console.log('Timer 2:', timeRemaining); }, 60000);
Interested? See it in action: http://jsfiddle.net/mjangda/vGv7J/1/