Category Archives: web

Making Flickr badges work with https

Following Eric’s instructions, I switched paulschreiber.com to https. I then had to get rid of the pesky mixed-content warnings. Most were pretty straightforward — I had a few JavaScript files and images that used absolute URLs and HTTP; I switched … Continue reading

TurboVote at Harvard and Personal Democracy Forum

On May 24, Seth Flaxman and I told the story of TurboVote Berkman Center for Internet & Society: Yesterday, we talked TurboVote at Personal Democracy Forum:

How to solve Facebook’s error 1366027

Sometimes, Facebook silently fails when you upload a new profile picture. After clicking Upload Picture, message indicating “your changes have been saved” is displayed. However, the new picture does not appear on your profile. Further, the string success=0&errornum=1366027 is appended … Continue reading

How not to get iPhone users to switch to BlackBerry

HOWTO count words in JavaScript

Here is a handy JavaScript function for counting words: String.prototype.countWords = function(value) { // remove html tags var cleanedText = this.replace(/< .[^]*?>/g, ' ') // remove numbers and punctuation .replace(/[–—.(),;:!?%#$‘’“”'"_+=\/\-]*/g, '') // remove/coalesce space chars .replace(/(&nbsp;|&#160;|[ ])+/gi, ' '); // … Continue reading

Only if I have an equation editor

I’m supposed to sign up for your site how?

HOWTO setup multistage deployment with Capistrano

These instructions are outdated. They were written for Capistrano 2.x. As of March 2016, Capistrano 3.x is current. When I wrote about deploying PHP sites with Capistrano, step 6 was a bit of a throwaway — hey, here's a quick … Continue reading

How to display tweets on a WordPress page

There are a lot of ways to display your tweets on your blog. Many are complicated and ugly. Sometimes, you hit Twitter’s API rate limit. Most require the client to perform additional work. I made a very simple WordPress plugin … Continue reading

How to display the latest blog post on a WordPress page

There are a lot of ways to display the latest blog post. They’re all complicated and ugly. I made a very simple WordPress plugin to handle this. It has no settings or options. All you do is stick [get_latest_post] where … Continue reading

Eric Schmidt at DLD