Search
The Way of the Software Engineer

Archive for the 'how to' Category

Application Configuration for Node.js

Posted by admin on April 27th, 2011

I’ve seen a few blog posts on reading in config files to node.js apps. This can be done with an eval() (which is potentially dangerous) or by reading in a file and JSON.parse()-ing it. I wanted a solution that would work on both a node app, and could also be called as JSONP in the [...]

Static Sites with Dynamic Content

Posted by admin on March 15th, 2011

In my last post, I was showing how a proxy can be used to circumvent XSS rules and said there are some interesting applications. Well, it’s time I posted one. Take a look at this very simple site (Please ignore the messy CSS, this is just a prototype) : Twitter Search This is being served [...]

Nginx Bypassing Single-Origin Policy

Posted by admin on March 11th, 2011

Anyone building a web application knows that XmlHttpRequest can only be made to the same domain and port that the page was loaded from. This is known as the ‘single origin’ policy for web browsers. Bypassing this restriction is known as Cross-Site Scripting or XSS. While there are some very real security reasons for only [...]

Simulating Bezier Curves with CSS

Posted by admin on November 18th, 2010

I recently had to make a visual editor that included lines between different boxes to define the ‘flow’ of a process (think UML). Rendering something like this in a web page is sometime tricky when you want the line to look fluid between it’s two connecting points. What I wanted was something like Bezier curves. [...]

Mayor / Celebrity Programming Puzzle

Posted by admin on November 10th, 2010

Also known as the “mayor problem” or “mayor puzzle”, this is a directed graph puzzle where a group of people have single directed relationships. That is person A knows person B, but person B may or may not know person A. The puzzle is to find a person in this group that everyone knows, but [...]

OCR with Tesseract

Posted by admin on May 13th, 2008

Optical Character Recognition is one of those technologies that has been around for a long time and never quite met customer demands. This is a common AI application, but I thought I’d see what’s currently available publicly instead of trying to write my own from scratch. The primary options I found were PHPOCR, GOCR, and [...]

Getting Started with OpenAds Development

Posted by admin on October 4th, 2007

There are a few critical things you’ll need to get started with OpenAds development: – Subversion – Java VM (JDK 6) – Ant builder – PHPDocumentor I’m quite sure this isn’t the only way to set up this environment, so you’ll need to modify my instructions to suit your own needs. This assumes you are [...]