Articles by

Chris Coyier

Founder, writer, designer, spam-deleter, email personality

Kickstarter Funding Closing

Direct Link

As I type, 36 hours left on the Kickstarter project for redesigning this website. Backing the project will get you the least expensive access ever offered to the video library of it all.…

Default Arguments for Functions

// Combiner of passed arguments and defaults (usable with any function)
Object.prototype.combine = function(_args){
  for(var i in this) {
    if(typeof _args[i] == "undefined") {
      _args[i] = this[i];
    }
  }
};

// Specific example function with defaults
function feedTheCat(args){
  var defaults 

Generate Expiring Amazon S3 Link

You don’t have to make files on Amazon S3 public (they aren’t by default). But you can generate special keys to allow access to private files. These keys are passed through the URL and can be made to expire.

<?php 

  

Reader Survey

Direct Link

I’d love to gather some statistical data from ya’ll if you have a few seconds. It will help with the big redesign.…

Podcasts I Like

I do this podcast called ShopTalk Show with Dave Rupert. If you like this blog you’ll probably like that show. We bring on guests but it’s mostly a listener Q&A show. I’ve had a few folks ask me what …

#112: Using CodePen

CodePen is an app for sharing and playing around with front end code. I made it with some friends of mine: Alex Vazquez and Tim Sabat. In this typical ramble-ridden screencast I introduce what it is, what it’s for, how …

(Updated on )

KeyboardEvent Value (keyCodes, metaKey, etc)

When a KeyboardEvent fires, you can test which key was pressed because that event contains information you can write logic against.

document.addEventListener("keydown", function(event) {
  console.log(event.which);
})

For example, by pressing a, you’ll get 65. Apparently it’s best to …

(Updated on )