Twitter

Categories

JavaScript, jQuery

Click to ‘select all’ on the PRE element

When you want to display code, you’re probably working with pre elements. The fact that they can contain markup make them really effective for syntax highlighting. I’ve used Knockout en comment binding to generate code into a pre field and that’s really cool.

Video

William Lawson’s Commercials – No Rules

William Lawson’s keeps coming up with great commercials with a consistent theme: real man are rough and have humor. I think their campaigns are a great example on how a brand can connect with its audience.

WordPress

Serving SASS files for WordPress theme on IIS

I love SASS. What’s not to love? Well… it can’t be served directly by the web server like CSS. It needs to be pre-compiled before it is served. Fortunately there is a PHP SASS compiler that can be used to make PHP compile and serve SASS. I’m using an IIS installation, so I’ll be explaining how it can be done on a Windows machine.

.NET

How to scrape a photo from a Twitter Photo URL with C#

Twitter uses its url shortener to place photo’s in Tweets. I’ve tried processing these URLs in the browser, but cross site scripting measures prevented me from processing the result with jQuery.

I decided to resolve it in C# (as I’m using ASP.Net). The following script leverages a WebClient and a regular expression to extract the photo URL from the shortened URL. This code could be added to a handler or a webservice that can be called from script.

WordPress Theme built by Shufflehound. ©2010-2019 by Kees C. Bakker, all code is licensed under MIT.