Mar 1, 2012

Badass JavaScript: CoffeePhysics: A Fast New Physics Engine Written in CoffeeScript


Justin Windle has just released a new physics engine called CoffeePhysics, which as it’s name states, is written in CoffeeScript. It is quite lightweight (minified, it’s just 8KB), but also very powerful.

There are a number of demos that show the performance and features of the library,…

Jan 17, 2012

How I Program Stuff

I love programming. I can truly say that of all the things I enjoy, I enjoy programming the most. There’s nothing quite like the feeling you get when you create something. Writing code is a lot like building your own little universe. When you build stuff, you’re in complete control, and, no matter how hard you fight it, your code directly reflects yourself. If you write sloppy code, I can almost guarantee you’ll be a sloppy person. If you haphazardly throw code around with any care or passion, it’s likely you treat yourself the same way.

Dec 30, 2011

Sweet, sweet vindication

It’s been awhile since I have written an eye-poker post. I’ve been trying be more reserved, professional, and politically correct. But that basically had a cooling effect on my writing. So it’s time we turn up the heat and let the rage flow.

Dec 17, 2011

9 reasons you must install Sublime Text 2. Code like a man, man.


Hello, fellow code monkeys.

Look at your editor. Now back at mine. Now back at yours. Now back to mine. Sadly your editor is not like mine. But if you stopped using noob-scented editor, and switched to Sublime Text 2, your editor could look like mine.

Look down. Back up. Where are you?

You are on a desk with the editor your editor could look like. 

What’s in your hand? Back at me. I have it! It’s a package control with several handy plugins that you would love. Look again. The plugins are now diamonds. Anything is possible when your editor looks like Sublime Text 2 and not Eclipse.

I’m on a horse.

Read More

(Source: 1p1e1)

Dec 16, 2011

Design is Horseshit!


In direct response to:

I’ve created products / services in the past that have garnered praise for their design. I love good design and I am good at design. But I’ve never called myself a designer.

Here’s my pitch. This talk of designers as the new…

(Source: yongfook)

Dec 16, 2011

Cassette - Web asset manager for .NET with support for Less and CoffeeScript


Asset packaging is a hot topic these days. Andrew Davey brings the fun to .NET with Cassette, an asset bundler for .NET web apps. Much like Jammit or Sprockets for Ruby apps, Cassette concatenates, minifies, and manages dependencies between scripts:

<!DOCTYPE html>
  <title>Web App</title>

… which yields individual scripts in debug mode:

<!DOCTYPE html>
  <title>Web App</title>
  <script src="/Scripts/lib/jquery.js?a4babad4b" type="text/javascript"></script>
  <script src="/Scripts/lib/jquery-ui.js?53dd39212" type="text/javascript"></script>
  <script src="/Scripts/app/tools.js?4d03ae0b" type="text/javascript"></script>
  <script src="/Scripts/app/widgets.js?cf319fe0b" type="text/javascript"></script>
  <script src="/Scripts/app/page.js?485f05e21" type="text/javascript"></script>

… and concatenated, minified assets in production mode:

<!DOCTYPE html>
  <title>Web App</title>
  <script src="/_assets/scripts/Scripts/lib_4bad47afb" type="text/javascript"></script>
  <script src="/_assets/scripts/Scripts/app_b7c29fecc" type="text/javascript"></script>

Cassette even supports Less and CoffeeScript. Please, someone fork this and bless the community with the pure goodness that is Sass.

(Source: thechangelog)

Feb 24, 2011


Everyone loves the Google CDN right? Even Microsoft runs their own CDN.

The problem is, they only host the most popular libraries. 

We host the other stuff.

Feb 19, 2011

Using Node.js & Mono websites together seamlessly

This is a sort of follow on post from my previous post on installing the above components.

As it stands I have apache & Mono running my .Net App on port 80 and my node.js app running on port 8000.

I want to be able to run my node.js server on port 80 and use the webservices provided by my .Net application.

I am making requests using ajax and because of the XmlHTTPRequest Same Origin Policy it is not possible to make a request to a different port, even though it is the same server.

As a solution I am using http-proxy, a node.js proxying module to proxy requests off to the relevant port. My, rather crude looking, App.js currently looks something like this:

  var httpProxy = require(‘http-proxy’);

  httpProxy.createServer(function(req, res, proxy) {

    var segs, test;

    segs = req.url.split(‘/’);

    test = segs[1] === ‘Data’

    console.log(segs[1] + ’  ’ + test);

    if (test) {

      return proxy.proxyRequest(8080, ‘localhost’);

    } else {

      return proxy.proxyRequest(8081, ‘localhost’);



The proxy server is now running on port 80 (sudo is required to start node on any port less than 1024). My .Net application is running on 8080 and my node.js appliation is running on 8081. So from an end-user point of view the entire thing looks seamless.

Note: To change ports used by apache you need to edit /etc/apache2/ports.conf

NameVirtualHost *:8080

Listen 8080

and also change the first line your website conf file /etc/apache2/sites-available/FILENAME.conf

<VirtualHost *:8080>

These are just brief notes, if I need to explain anything further or I am missing an easier slicker solution, please let me know!

Feb 19, 2011

Installing Node.js, NPM, Apache & Mono on Ubuntu

I recently decided to try and migrate a project to Linux so I could take advantage of node.js in its native environment. The back-end to this project is currently .Net and I wanted to still be able to use the web services it provides as well as utilize WebSockets on via

This process worked for me, but obviously there is no guarantees it will for everyone.

After a bit of experimentation, this is the solution I came up with:

1. Download & install Ubuntu 

Fairly simple task, I am using desktop version 10.10 for now but may repeat this process on the server version at some point. 

Note: Don’t use root account for anything, always create a user account and use sudo when necessary!

2. Open Terminal and install some prerequisites:

apt-get install make sudo build-essential

sudo apt-get install g++ curl libssl-dev apache2-utils

3. Install Node.js

These instructions are from here, where there are also alternative options for installing Node

echo ‘export PATH=$HOME/local/bin:$PATH’ » ~/.bashrc

. ~/.bashrc

mkdir ~/local

mkdir ~/node-latest-install

cd ~/node-latest-install

curl | tar xz —strip-components=1

./configure —prefix=~/local

make install

4. Install NPM 

NPM is an excellent little package manager for Node.js

curl | sh

5. Install Node.js modules

Install whatever node modules you need, there are plenty to choose from and most likely one that will do want you need

npm install zappa connect http-proxy

6. Install Mono

This is a snap thanks to Nathan Bridgewater's install scripts. The latest is 2.8.2 at the time of writing, but keep and eye on his github

wget —no-check-certificate

chmod 755


This takes a while, so time to go make a cup of coffee or eat a sandwich or something.

7. Enable Mono in Apache.

We now need to copy the mod_mono.conf file to the available mods folder and then link it into the enabled mods folder.

sudo mv /etc/apache2/mod_mono.conf /etc/apache2/mods-available

sudo ln -s /etc/apache2/mods-available/mod_mono.conf /etc/apache2/mods-enabled/mono.conf

8. Create an Apache conf file for your website

Using the GoMono config builder utility this again is very simple. Download the resulting file to your home folder, move it to the apache sites folder and again link the file, but this time into the sites-enabled folder.

Its worth noting that you may want to clear out any existing files in your sites-enabled folder as they may be using the port you require. i.e 80

# sudo rm /etc/apache2/sites-enabled/*  # - OPTIONAL! - delete existing confs

sudo mv ~/FILENAME.conf /etc/apache2/sites-available

cd /etc/apache2/sites-enabled

sudo ln -s ../sites-available/FILENAME.conf FILENAME.conf

9. Restart Apache service & test

sudo service apache2 restart


Feb 16, 2011

« To the past Page 1 of 2
Subscribe via RSS.