Yeah Totally! http://yeahtotally.org Most recent posts at Yeah Totally! posterous.com Mon, 13 Dec 2010 10:30:00 -0800 Convert javascript to coffeescript http://yeahtotally.org/convert-javascript-to-coffeescript http://yeahtotally.org/convert-javascript-to-coffeescript

js2cs by jsilver

A JavaScript To CoffeeScript Converter, written in JavaScript and using PEG.js parser generator LIVE DEMO

Contact

jsilver (jsilver@mindynamics.com)

get the source code on GitHub : jsilver/js2cs

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Thu, 09 Dec 2010 06:53:00 -0800 Kinect finally fulfills its Minority Report destiny (video) -- Engadget http://yeahtotally.org/kinect-finally-fulfills-its-minority-report-d http://yeahtotally.org/kinect-finally-fulfills-its-minority-report-d

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Mon, 06 Dec 2010 12:29:00 -0800 CHRIS BURDEN: Metropolis II http://yeahtotally.org/chris-burden-metropolis-ii http://yeahtotally.org/chris-burden-metropolis-ii

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Sat, 04 Dec 2010 12:01:00 -0800 Free 155MB of Girl Talk http://yeahtotally.org/free-155mb-of-girl-talk http://yeahtotally.org/free-155mb-of-girl-talk
Media_httpillegalartn_prhed

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Sun, 21 Nov 2010 18:43:00 -0800 Chigra: Amusing tea infuser http://yeahtotally.org/chigra-amusing-tea-infuser http://yeahtotally.org/chigra-amusing-tea-infuser
Media_httprelogikcomd_ilijb

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Fri, 19 Nov 2010 16:46:00 -0800 Technical Revenue: A Google Interviewing Story http://yeahtotally.org/technical-revenue-a-google-interviewing-story http://yeahtotally.org/technical-revenue-a-google-interviewing-story
Given that our range of characters is limited. We could assign each character to a prime number starting at 2. After that we could 'multiply' each character of the large string and then 'divide' by each character of the small string. If the division operation left no remainder, we'd know we have a subset.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Thu, 18 Nov 2010 17:41:00 -0800 The One Thousand Hour Rule http://yeahtotally.org/the-one-thousand-hour-rule http://yeahtotally.org/the-one-thousand-hour-rule
1000-hours gives you enough time to let your idea mature so you can build something of value.  Something that solves a real problem.  Something that people are happy to pay for.  

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Thu, 18 Nov 2010 13:33:00 -0800 Node-Twilio http://yeahtotally.org/node-twilio http://yeahtotally.org/node-twilio

Typically when developing a Twilio application, there is an ugly and confusing separation between making REST requests to Twilio's API servers, and setting up the response handlers that reply back to Twilio with TwiML instructions. For example, when you POST to the /Calls resource in order to initiate an outgoing call, you specify a StatusCallback URL. When the call is answered, Twilio requests that StatusCallback URL. Your application then must respond back with valid TwiML, and Twilio executes your instructions.

In truth, this all is very straightforward no matter what library, language, or platform you're using to build your Twilio app. You make some REST requests, ensure there's some sensible and valid TwiML at the URLs you specify, and you're good to go.

Here's an example of what I mean, borrowed from the Python Twilio helper library:

# Instantiate a Twilio REST account object 
account = twilio.Account(SID, AUTH_TOKEN); 
# Call my parents req_data = { 
    'From': MY_CALLER_ID, 
    'To': '867-445-1795', 
    'Url': 'http://hostname/path/to/my/love/filled/parental/greeting.xml' 
} 
print account.request('/2010-04-01/Accounts/%s/Calls' % \ 
    ACCOUNT_SID, 'POST', req_data)

Before your request is POSTed to Twilio, this code assumes you've set up a webserver on your machine, and you've gone and put your TwiML (either statically or dynamically generated) in the path you've specified. The file probably looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<Response>
        <Say>
                Hey mom and dad! It's your baby boy! I love you!
        </Say>
</Response>

Granted, nothing above is really difficult (who can't configure nginx or apache and write some XML, after all?), but it still is pretty annoying to have separate controllers for your Twilio REST requests and your TwiML responses. Additionally, if your app includes lots of complex logic (suppose, for instance, you have various different responses you want to deliver based on an incoming caller's geographic location), it becomes a cumbersome and error-prone process to maintain all your different REST controllers and TwiML response generators.

Enter: Node-Twilio.

Node-Twilio is a Twilio helper library for Node.js. Now, Node-Twilio's not your average Twilio helper library; It doesn't simply provide you with a few simple method calls for making REST requests and a few functions to ensure you generate valid TwiML (but it does include both of those). Node-Twilio takes care of provisioning all the URLs you deliver to Twilio to deliver TwiML, and it exposes all of Twilio's functionality as EventEmitter objects.

Perhaps an example is in order. Again, let's call my parents (they're great, and I want to make sure they really know it), but this time, let's do it with Node-Twilio.

// First, we have to require TwilioClient and the TwiML helper
var TwilioClient = require('twilio/client'),
    Twiml = require('twilio/twiml');

// Now, let's instantiate our client with our credentials and hostname
var client = new TwilioClient(ACCOUNT_SID, AUTH_TOKEN, HOSTNAME);

// Ok, great! Now, let's get a new PhoneNumber object
// Note: We can pass in either a Twilio phone number
// associated with our account, or the SID of same.
var phone = client.getPhoneNumber('+16067777777');

// Alright, we're ready to make a call
phone.makeCall('+18674451795', null, function(call) {
    // Call is an OutgoingCall object
    // It is an EventEmitter
    call.on('answered', function(callParams, response) {
        // callParams is simply a map of the POST vars
        // Twilio sends with its request.
        // response is a Twiml.Response object
        response.append(new Twiml.Say('Hey mom and dad! It's your baby boy! I love you!'));
        response.send();
    });
    
    call.on('ended', function(params) {
        console.log('Call ended');
        process.exit(0);
    });
});

Past all that into a file called app.js, substitute in your credentials, and you're ready to call my parents.

Now, what about incoming calls (and SMS, too)? Well, they're just as simple to handle. The PhoneNumber object returned by the TwilioClient is also an EventEmitter. It emits 'incomingCall' and 'incomingSms' events. So, if you wanted to respond to SMS messages, you'd do something like this:

phone.on('incomingSms', function(smsParams, response) {
    // No matter what the incoming message is, respond back with a 
    // quote from your favourite recent novel (Adam Levin's The Instructions)
    response.append(new Twiml.Sms('We are on the side of damage!'));
    response.send();
});

Simple, isn't it? Node-Twilio makes developing Twilio apps simpler and more rapid than any other platform or application. In addition to providing a clear EventEmitter interface to Twilio's REST API, Node-Twilio includes wrapper methods for every one of the resources defined in the API, so if you want to get into the nitty-gritty, you're easily able to.

Interested in trying it out? Check out Node-Twilio on github, take a look at the documentation (which is still slightly in-progress), and give it a whirl!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Thu, 18 Nov 2010 12:45:00 -0800 Tons of @#$#-ing Sequins http://yeahtotally.org/tons-of-ing-sequins http://yeahtotally.org/tons-of-ing-sequins

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Mon, 15 Nov 2010 10:56:00 -0800 The Pragmatic Bookshelf Free Magazines http://yeahtotally.org/the-pragmatic-bookshelf-free-magazines http://yeahtotally.org/the-pragmatic-bookshelf-free-magazines
Media_httpassets3prag_dkzel

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Mon, 15 Nov 2010 10:07:00 -0800 Sniff browser history for improved user experience http://yeahtotally.org/sniff-browser-history-for-improved-user-exper http://yeahtotally.org/sniff-browser-history-for-improved-user-exper
Media_httpsniallkenne_bahma

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Thu, 11 Nov 2010 10:21:00 -0800 An umbrella that withstands 100mph winds http://yeahtotally.org/an-umbrella-that-withstands-100mph-winds http://yeahtotally.org/an-umbrella-that-withstands-100mph-winds
Media_httpadminsenzum_dlpvi

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Sat, 06 Nov 2010 15:11:00 -0700 Rails Searchable API Doc http://yeahtotally.org/rails-searchable-api-doc http://yeahtotally.org/rails-searchable-api-doc
Media_httprailsapicom_glqtw

Now with more localhost!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Sat, 06 Nov 2010 14:59:00 -0700 Is the tech bubble about to burst? http://yeahtotally.org/is-the-tech-bubble-about-to-burst http://yeahtotally.org/is-the-tech-bubble-about-to-burst
Over the past week, Microsoft’s own Steve Ballmer has sold off 49,341,653 shares–$1,334,893,666 worth of stock–and claims he is just “diversifying his portfolio”. This comes only after Bill Gates, with a number of his offshore accounts, sells $272,299,995 worth of MSFT stock. Google holders’ have sold off $1,021,205,084 of stock; Amazon, $642,497,312; Oracle, $1,192,828,629; and Sybase stockholders, $3,794,698,248–again, all within the past week.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Fri, 05 Nov 2010 20:58:00 -0700 Outsourced form file uploads http://yeahtotally.org/outsourced-form-file-uploads http://yeahtotally.org/outsourced-form-file-uploads
Media_httptransloadit_wlcoi

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Fri, 05 Nov 2010 10:14:00 -0700 the aerogel-weight mobile javascript framework http://yeahtotally.org/the-aerogel-weight-mobile-javascript-framewor http://yeahtotally.org/the-aerogel-weight-mobile-javascript-framewor

 

Zepto.js is a minimalist JavaScript framework for mobile WebKit browsers, with a jQuery-compatible syntax.

The goal: a 2k library that handles most basic drudge work with a nice API so you can concentrate on getting stuff done.

Zepto.js presentation →

Zepto.js is currently in early beta, and you can help to make it awesome by contributing code, documentation and demos.

Follow our progress on Twitter @zeptojs.

Download v0.1.1

download package

2k min+gzip
Nov 1, 2010

Source & Docs

github

Zepto.js is released under the MIT license.

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Tue, 02 Nov 2010 22:38:00 -0700 More evidence that Flash sucks http://yeahtotally.org/more-evidence-that-flash-sucks http://yeahtotally.org/more-evidence-that-flash-sucks
Having Flash installed can cut battery runtime considerably—as much as 20 percent in our testing

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Tue, 02 Nov 2010 00:37:00 -0700 One Page Per Day: A web typewriter for authors. http://yeahtotally.org/one-page-per-day-a-web-typewriter-for-authors http://yeahtotally.org/one-page-per-day-a-web-typewriter-for-authors
Check out this website I found at onepageperday.com

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Sat, 30 Oct 2010 19:42:00 -0700 iMarionette: Facetime for Partytime http://yeahtotally.org/imarionette-facetime-for-partytime http://yeahtotally.org/imarionette-facetime-for-partytime
Media_httpwwwhivemind_cvdyt

I just made this. If you add your facetime ID or iphone 4 phone number, 1 of 3 "avatars" will call you from a big Seattle halloween party. Each has full video and amplified audio so you can fully interact with party goers. Give it a try!

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown
Tue, 26 Oct 2010 22:25:00 -0700 Balloon filled with ground coffee makes ideal robotic gripper http://yeahtotally.org/balloon-filled-with-ground-coffee-makes-ideal http://yeahtotally.org/balloon-filled-with-ground-coffee-makes-ideal

Permalink | Leave a comment  »

]]>
http://files.posterous.com/user_profile_pics/684434/flippyhead-crop.jpg http://posterous.com/users/4wjDD9EZha81 Peter Brown yeahtotally Peter Brown