A couple days ago I ran a report over at GTMetrix and the screenshot looked terrible. No CSS was loading. Sure enough, when I went to the site it looked just as bad to me.
A couple days ago I ran a report over at GTMetrix and the screenshot looked terrible. No CSS was loading. Sure enough, when I went to the site it looked just as bad to me.
A few months ago I needed a way to cross post from a WordPress blog to a Pinterest board. Yes, there are plugins that claim to do this. But the few free ones that I tried never actually posted, and I didn’t want to spend money on a paid plugin that might not work. So I came up with my own solution.
One note though. This isn’t a WordPress plugin, although I may write one eventually. This is a script that runs from a cron job on your server. You can setup cron jobs through control panels like cPanel or directly from the command line. Either way, most people will find it a bit more complicated than just activating a plugin.
I ended up spinning this into a normal WordPress plugin that will automatically create pins when a post is published. If you’re interested you can find the Pinterest Auto Post plugin at Reliti.com.
The idea is that I didn’t really care that new posts were immediately posted to Pinterest as long as they got there relatively quickly and I didn’t have to do it manually.
It’s also important that posts only go to Pinterest once, so there needs to be a way to keep track of what’s already been posted.
What I ended up with is a script that runs every 30 minutes through a cron job, although you could change the timing to whatever you want. It pulls the most recent published post from WordPress and posts the link to a Pinterest board.
One caveat. Since Pinterest is visual and requires images, this script skips any posts that don’t have a featured image.
With that, let’s get it actually working.
A couple of weeks ago I needed a way to convert a number of seconds to a more user friendly format for a project I’m working on. I’ve seen these called “ago” functions. They take a raw number of seconds and convert it to something friendly like “3 seconds ago” or “5 minutes ago.” Not quite what I wanted though. I was looking for something that counted seconds up to a minute and then minutes and seconds after that. For what I need, it wouldn’t ever go past minutes.
Earlier this week I was working on a JUnit test for one of the AP free response questions from 2016 where you’re given an array…
Working on a small weekend project I needed an easy way to validate that a string contained a valid Twitter username. Not necessarily an active…
Spent more time than I’d like to admin banging my head against my keyboard when NetBeans wouldn’t minify a specific JavaScript file. Instead of correctly…
For a project that I’m working on I needed a way to fade out an image before overlaying text on to it. Text I’ve done.…
I’ve usd the 320press Bootstrap WordPress theme as a parent theme on a couple of projects, including this site. Overall, it’s great. But there’s been…
Learned an important lesson today. I spent a good chunk of yesterday working on a new project. It’s a Moodle plugin that, when finished, will…