christmasgorilla:

From Tyler Surfboards, courtesy of Lane Wood.

christmasgorilla:

From Tyler Surfboards, courtesy of Lane Wood.

Inspecting node.js traffic with Charles and tunnel

If you’ve ever had to debug network traffic, you know the value of a good tool like Fiddler or Charles. There are some immensely useful features, like the ability to edit and replay requests, but you can also get a lot of value just from inspecting network traffic.

Charles will automagically set itself up as a proxy for browser traffic, but things can get a little trickier when you want to intercept http requests in node.js.

This is where tunnel comes in. Tunnel let’s you tunnel traffic through a proxy with a simple tunneling agent.

When you set up your http request, you’ll usually specify a host and a port:

var http = require('http');

var req = http.request({
  host: 'example.com',
  port: 80
});

With tunnel, you can specify a tunneling proxy agent like so:

var http   = require('http'),
    tunnel = require('tunnel');

var tunnelingAgent = tunnel.httpOverHttp({
  proxy: {
    host: 'localhost',
    port: 8888 // default Charles proxy port
  }
});

var req = http.request({
  host: 'example.com',
  port: 80,
  agent: tunnelingAgent
});

Viola! Load up Charles and watch the magic happen.

Tunnel has some pretty sweet ssl support as well.

[We] calibrated details ranging from color shifts, saturation, and contrast, to the shape and blend of the vignettes before handing the specifications over to Aviary, a company specializing in photo editing. They applied their expertise to build the algorithms that matched our filter specs.

-

Twitter Engineering: How our photo filters came into focus

Read about how @twitter worked with @aviary to build out their new photo filters. Mad props to both teams!

A crowded market is actually a good sign, because it means both that there’s demand and that none of the existing solutions are good enough. A startup can’t hope to enter a market that’s obviously big and yet in which they have no competitors. So any startup that succeeds is either going to be entering a market with existing competitors, but armed with some secret weapon that will get them all the users (like Google), or entering a market that looks small but which will turn out to be big (like Microsoft).

-

Paul Graham : Essay on How to Get Startup Ideas (via msg)

Definitely worth a read.

»

photojojo:

With the help of finger sweat-bands and a few pallets of energy drinks, 300 developers made 70 hacks in a short 24 hours!

Which ones were the best? Read more at the link below!

1. Pics with Friends: A guessing game! Figure out what a portion of a photo from a friend actually is.
2. Sizzly: Turns photo-editing into group collaboration. Post a photo & other users will edit it or vice versa.
3. Just a Second: Turns 1 second phone videos into GIFs that you can post on Tumblr & elsewhere.

Photo Hacks to Make Your Day

That reminds me, I’ve gotta get on my own write-up…

msg:

Aviary launched a showcase app of our mobile SDK this week. It seems like developers aren’t the only ones who like the app :)
http://itunes.apple.com/us/app/photo-editor-by-aviary/id527445936?mt=8&ls=1

Not too shabby eh?

msg:

Aviary launched a showcase app of our mobile SDK this week. It seems like developers aren’t the only ones who like the app :)

http://itunes.apple.com/us/app/photo-editor-by-aviary/id527445936?mt=8&ls=1

Not too shabby eh?

»
»

Date.now() in IE8

Been tracking down all kinds of fun issues in ie7/8 browsers recently. Here’s the latest gem.

Date.now() 

Date.now() wasn’t added to the JavaScript spec until ECMAScript 5, which means it won’t work in any version of IE < IE9. (See full table here http://kangax.github.com/es5-compat-table/#showold)

This can be especially tricky to catch since it works just fine in IE9 with IE8 compatibility turned on. Yay IE!

For an easy fix, put the following at the top of your JavaScript context.

Date.now = Date.now || function() { return +new Date; }; 

Note: +new Date is shorthand for ToInt32(GetValue(new Date) or new Date.valueOf() see http://es5.github.com/#x11.4.6 <- this might be the best takeaway

sources/links:

http://stackoverflow.com/questions/9430357/please-explain-why-and-how-new-date-works-as-workaround-for-date-now-in
http://stackoverflow.com/questions/221294/how-do-you-get-a-timestamp-in-javascript
http://blog.yjl.im/2012/01/datenow-in-ie8-or-before-ie9.html
http://www.microsoft.com/en-us/download/details.aspx?id=11575  

Bits and Prattle, powered by Tumblr, Beckett theme by Jonathan Beckett