Posted on May 22, 2013
Stitches is a fantastic CSS sprite sheet generator that has saved me a ton of time on our past 2 sites. I won’t go into why css sprites are awesome, but if you’ve got icons/badges in your WP headers/sidebars then you should consider using sprites.
Just upload your images and Stitches creates a sprite sheet .png file for you, along with corresponding CSS and HTML snippets. You can even download the source from Github and run it locally.
Grateful thanks to Matthew Cobb for this wonderful tool.
Posted on May 10, 2013
If you love Font Awesome as much as I do, you’ll be psyched to know that it’s been updated to 3.1. There are a some spiffy new icons, including icon-exclamaton which I’ve wanted on a couple of occasions. Plus the ability to rotate/flip/stack. But probably the coolest update isn’t an icon update at all – now you can create custom kits with only the icons you’re using right here. If you only use a couple icons per site, using a custom kit can shave 25 Kb+ off your site loads.
Posted on May 9, 2013
I’m sure you remember Digg – the social content site that was all the rage back in the early 00′s. You also may remember what a total mess it ended up morphing into, the horrible design decisions (DiggBar!), and the eventual bottoming out of the userbase and sale to Betaworks for peanuts in 2012. Well guess what, Digg lives on. And now it’s actually pretty good.
The design is clean and easy on the eyes, though not responsive (gasp!). The iOS app is also clean and slick. These are huge improvements over the eyesore I remember. Digging (upvoting posts) is still there but the comments are gone in favor of Twitter/Facebook integration. Personally I don’t miss the comments – we have Reddit for that now. But it bums some people out. The redesign is great, but it’s not the best part of the new Digg.
The best part is the content. Visit the site and I guarantee you’ll find at least 1 article that you’ll want to read. More likely, you’ll find several which you can save for later right inside of Digg. And I mean actual stories, not dumb clips of news anchors accidentally dropping F-bombs (ok that’s actually kind of funny). I use their iPhone app nearly every day, and I always end up saving more articles than I have time to read.
Give Digg a try, it’s a great place to find interesting stuff to read.
Posted on May 7, 2013
Second verse, same as the first!
I ran into this frustrating issue on another site. Navigating to page 2 via the ‘Previous Posts’ link just reloaded the same posts from page 1. Since I was using the same loop code I usually use to display blog posts, and it’s worked fine on other sites, I was baffled. After a few hours of Googling and applying/removing suggestions, I ran across this tidbit in the WordPress forums:
I should also clarify that this is refering only to static pages being set as the home page. I went back and tried the code on a static page NOT set as the home page and get_query_var(‘paged’) worked fine.
Using get_query_var(‘page’) seems to only be necessary if you’re using query posts in a custom page template that you’ve set as your homepage.
Holy. Crap. I just so happen to be using this query in a custom page template that I’ve set as the homepage! Lo and behold, changing get_query_var(‘paged’) in my query to get_query_var(‘page’) fixed it.
$paged = (get_query_var('page')) ? get_query_var('page') : 1; query_posts( array( 'post_type' => 'post','category_name' => 'Blog','paged'=>$paged, 'showposts'=>0) ); if (have_posts()) : while ( have_posts() ) : the_post();
Posted on April 25, 2013
There were 2 things that happened over the past month or so caused me to develop a new psychosis. That psychosis is the persistent desire to monitor the websites I’ve created.
The first instance was with this very site. Upon visiting one day I was greeted with a large “could not connect to database” error. Now it’s not like I’m hosting Facebook here, but it still bummed me out that my site was down and I didn’t know. After poking through some Linux logs and reading about MySQL memory allocation, it appears to have been caused by a low memory issue. I say “appears to” because this is a real photo of me looking through Linux logs and attempting MySQL memory tuning:
The second problem was with a client site that I noticed was horrifically slow. Sucuri detected malware, and they were right. Boy were they right.
Both of these issues have caused me to be obsessed with website and server monitoring over the past month. So I went looking for monitoring services. My criteria were:
- Must be cheap or free. We’re a tiny operation (10 sites max). Anything over $10 a month isn’t justifiable.
- Must provide a historical timeplot of site response times. The sexier the graphs (and overall UI of the service) the better!
- Must provide the same for server monitoring – I want memory utilization over time, with the ability to drill down by process.
- Must have an alerting mechanism that’s not SMS. I don’t need more texts in my life. Ideally Pushover/Boxcar or via a mobile app.
- Must be easy to setup and teardown. I am not a Linux wizard (see image above).
- Nice to have – a slick mobile app capable of push notifications.
I didn’t care for the UI at all. Seems like a decent service, lots of features and a free plan. I really couldn’t get past the UI.
I used Pingdom for a good month and have no complaints. $10 for 10 sites is manageable, but for more than 10 sites it skyrockets to $40/month. The UI is slick and the reporting is great. They offer features like transaction-based checks and Real User Monitoring (RUM…though only 1 site). The mobile app can be clunky but it pushes alerts and displays timeplots. I’d easily recommend them. The only reason why I left is that I found a service which offers a bit more for the money.
My current site monitoring service. They offer everything Pingdom does and more. Their free plan includes unlimited sites and RUM, plus 5 minute checks. Paid plans offer malware scanning, 404 scanning, and more. The UI is nice, and alerting options include Pushover or Boxcar. No iOS app, but you can create some neat things with their API. Support questions are answered promptly. Almost perfect, but there is one thing missing…
Probably one of the most useful pieces of information when dealing with site response time is the HAR (HTTP Archive) data. Often this can tell you exactly what component of your site is responsible for slow load times. GTMetrix saves the HAR from each site check, in addition to the current PageSpeed and YSlow ratings. These ratings and response times are available via timeplot. Unfortunately, the free plan only offers 5 sites with checks once a day. Paid plans are reasonable but only offer hourly checks. This is a dealbreaker if you’re interested in monitoring site uptime. There is no mobile app and alerts are via email. I still keep my top 5 sites in here anyway on the free plan, as I can’t tell you how useful being able to reference the HAR for slow sites has been.
This was my first foray into server monitoring. CopperEgg is a cool service. They offer a free developer plan which covers 1 server and 2 sites, which is a bit light. The agent was easy to install, though the individual custom probes (Apache, MySQL, etc) were a little more complicated. I was able to monitor both my server and response times from my site with ease. I noticed a few quirks with their UI, but overall the dashboards + metrics were very cool. The iOS app left a bit to be desired, as I couldn’t seem to reliably get my web probes to show metrics. Overall I’d recommend CopperEgg, if it weren’t for the utter beast of a service I’m about to drop on you…
Prepare to wet your pants, and I’m not even kidding. New Relic makes you feel like Picard on the bridge of the Enterprise. The data that’s captured is displayed in delicious moving eye-candy widgets. The ability to drill into each metric is astounding. I can see how long the MySQL calls took when you just loaded this page. Best of all, the metrics and graphs are understandable and usable. Setup of both the server agent and the application (PHP) agent were a breeze. I find myself logging into New Relic several times a day just to marvel at the data. Did I also mention the iPhone app is incredibly slick as well?
I’m still working though my Pro trial, so it’s tough to tell what I’ll lose when I move to the free tier. Pro is just way too expensive for me, and it’s possible the free tier is gimped to all hell. One other caveat (and this is a big one) since monitoring requires an agent install, I’m not going to be able to use it to monitor sites that aren’t on my VPS. Which accounts for a large portion of the sites I want to watch. But damn…the data…the…data…
- StatusCake (with a GTMetrix chaser) for everyday use.
- New Relic when I want to travel into the future and fire photon torpedoes at Romulans.
Posted on April 19, 2013
Posted on April 15, 2013
Updated 19-April: Return JSON instead of writing to file using a cron job.
Status Board is a nifty little iPad app from Panic that displays information from various sources in a slick interface. I’ll admit at first I was a little disappointed with the limited number of out-of-the-box widgets/sources available. But as it turns out, I was just just being lazy – this app is awesome and has tons of potential for those willing to fiddle. Here’s what I whipped up last weekend.
The Idea: StatusCake on Status Board
I recently moved my site monitoring service from Pingdom to StatusCake. Couldn’t be happier with the service so far, though I have developed a borderline-OCD habit of checking my site load times. Usually several times a day. What can I say, I love graphs and the StatusCake dashboard is quite nice to look at. I noticed that StatusCake offers a Geckoboard widget, so I wondered if i could create something similar in Status Board. As with most monitoring services StatusCake has an API. It’s not the most robust API in the world, but it does return JSON, and Status Board happens to graph JSON. So we’re in business.
Step 1: Getting Perf Data From StatusCake
This is the easy part. The StatusCake API clearly displays the cURL commands required. Running them inside Terminal should successfully return the last 100 site load times in JSON. If you’re looking for your TestIDs, just view the test in the StatusCake dashboard and note the URL.
Step 2: Grab the JSON Results
Once you’ve got the cURL statements, capture the results in an array.
Step 3: Create JSON for Status Board
The last step in the script is to create the JSON according to the Status Board Graph tutorial, and insert your results array as the datapoints. Here’s the final script:
You may notice that the StatudsCake API specifies an Order argument (DESC/ASC). Since we’re making a timeplot graph, it would make sense to use ASC in our request to pull results from earliest to latest. But this was giving me odd results – it was pulling the first 100 test results instead of the last 100. I worked around this by flipping the array using array_reverse().
Step 4: Upload the PHP file to your web server
Upload the file to your web server. Add a new graph widget to Status Board with the URL format: http://www.example.com/SBCakePerf.php?title=YourSite&testid=12345. To get the test ID, go to the StatusCake dashboard and open one of your tests. The URL will contain the test ID.
Posted on April 15, 2013
If you don’t have a server – a machine sitting somewhere in the cloud for you to mess around with - go get one now.
No, it’s not too expensive.
Digital Ocean offers high-quality Linux virtual private servers for $5/month. Say what, 5 bucks? Yeah, less than the cost of an Extra Value Meal. If you like to futz around on the web, it’ll be the best $5 you’ll ever spend. Linode offers pricier VPS’s at $20/month for what appears to be more power + features. Honestly I haven’t tried Linode yet as these $5/month Digital Ocean images so cheap that they become addictive. But I have been eyeballing Linode.
No, it’s not too difficult.
Digital Ocean has step by step guide on how to setup + secure your server, install a LAMP stack, etc. If you can follow directions and type in Terminal, you can setup your very own web server. The great thing about DO is you can snapshot your images and rollback. Screw something up? No problem, rollback to your last snapshot and try it again. Another confession – I like the Linode Library better than the Digital Ocean docs, and sometimes follow their documented setup steps instead. They’re worth a look.
Why do I need this?
Because you’re a nerd and it’s something you’ve always wanted to do. You’re sick of paying GoDaddy $15 a month for crappy slow hosting. Or just because it’s cheap and easy, and it’s your very own freakin’ server in the cloud running 24/7. You can host your own website, use it to brush up on web technologies, do something cool like create your own Dropbox clone…or use it to stash JSON files for use with Panic’s new Status Board app. Which I’m going to do in my next post.
Posted on March 20, 2013
Google Keep isn’t quite in the same league as Evernote. At least not yet.
Posted on March 20, 2013
We saw this coming. Despite the slaughter of 20 innocents in Newtown, Conn., three months and six days ago, a proposed ban on assault weapons was stripped out of a gun violence bill in the Senate
The 2nd Amendment might be the worst thing that’s ever happened to this country.