All articles tagged code

Image for Playing with Pickle Security

Playing with Pickle Security

Reading about the latest vulnerabilities in Rails, got me thinking about a similar issue we have in Python. It is well known that using pickle on untrusted data is insecure to the point of allowing arbitrary code execution. Or at …
Image for Introduction to Django Selenium Testing

Introduction to Django Selenium Testing

If you’ve never heard of Selenium, put simply, it’s a tool that allows you to create tests that are run in the browser and interact with your UI in the same way as if you were manually testing your website …
Image for What is WebRTC?

What is WebRTC?

WebRTC, short for Web Real Time Communications, is a specification and project adding JavaScript APIs in the browser to: 1. Access a user’s webcam and microphone: getUserMedia. 2. Connect directly to another browser: PeerConnection and DataChannel. The main use case …
Image for What is SPDY?

What is SPDY?

This is HTTP A big friendly unsecured clear-text, line-oriented bear. This is SPDY A multi-plexed binary TLS-wrapped protocol from the future. SPDY (pronounced speedy) is a replacement for HTTP, and feels like a wrapper for it. SPDY is a packet …
Image for Referrer Blocking is Hard

Referrer Blocking is Hard

One of my recent tasks in Ginger was to ensure that we weren’t leaking referrer URLs when you click on an external link in Ginger. It seemed like an easy task and one that’s probably been solved before. What I …
Image for Using Django Inside the Tornado Web Server

Using Django Inside the Tornado Web Server

Inspired by Eric Florenzano’s talk, Using Django in Non-Standard Ways (slides in PDF) at DjangoCon and the announcement of Tornado (tornadoweb.org), I decided to try building a small application using the Django Form library and Django ORM inside Tornado. The …
Image for Highlighting Named Anchors with jQuery

Highlighting Named Anchors with jQuery

I’ve always disliked the way named anchors (<a href="#name">...</a>) behave in browsers. It jumps your viewport to a different part of the page, but it’s rarely obvious which section you have landed on. If the page is long enough, the …