How to use the PHP ternary operator

Written on

When I learned how to use the ternary operator years ago, I fell in love with it. What a cool way to simplify assignments based on a condition. If you're not sure what the ternary operator is or how it works, you're missing out on a really cool piece of programming knowledge.

Five things I've learned about taking risks

Written on

I had a cush job at a university with great benefits, decent pay, and normal hours. Five years ago, I took a risk and gave it all up to start a company. Here are the five most important lessons I've learned about risk-taking.

Using the classList API

Written on

jQuery makes it easy to add, remove, and toggle classes on various elements. It's too bad this stuff wasn't built into JavaScript. But wait — it is now!

TinyPNG: A better way to compress PNG images

Written on

By now, you know that optimizing images and other resources can reduce bandwidth and help your website load faster. Perhaps you've even used a tool like Pngcrush before to make your images smaller. Now, there's an even better solution.

What is my browser? This tool will tell you

Written on

Last week I wrote about how to get faster and better help from support. One of my suggestions was to tell them what browser, OS, etc. you're using. Here's a free tool that will make that so much easier.

Smaller volume increments in macOS

Written on

Ever wish you turn the volume up or down just a tiny bit more on your Mac? Well, you can.

Link to a specific page in a PDF file

Written on

Both Chrome and Firefox render PDF files in the browser, making them easier for users to view. Today I wanted to send someone a link to a certain page in a PDF user's manual. Here's how I did it.

Lessons from my 20s: a presentation by Ryan Allis

Written on

Author and entrepreneur Ryan Allis shares 1,264 slides about life, entrepreneurship, and the world.

How to get the dominant colors of an image with Color Thief

Written on

You know how Dribbble shows a color palette for each shot users upload? They always look perfect right? Here's a tool that can give you the same quality results using pure JavaScript.

PlayCanvas: an easy, open source WebGL game engine

Written on

Last week I wrote about faster JavaScript animations using VelocityJS. As if that wasn't impressive enough, today I'm giving you a dose of HTML5 and WebGL greatness.