Bradley Priest

What's new in EmberJS May 7 07 May 2012

I am a huge Ember supporter. I have only been using the framework for 4 weeks now, but I am a complete convert. Hell, I’m building my new startup in it.

I don’t have any cool libraries to share for it just yet, but in the meantime this is the least I can do.

###Weekly Wrapup #1

  • #00b894 updates ContainerView to optionally take a currentView object, which sets a single view inside the continer, great for statemanagers. (I currently use ember-layout, this commit may make that obsolete?)

  • #f96818 Make it easy to inject controllers. I’m gonna be honest, I don’t actually understand what’s happening here, but it looks like they’re working on some big updates.

  • each foo in bar and with foo as bar handlebars helpers were added.

  • A whole lot of refactoring has been done to mutable array and enumerable to help speed things up.

  • PR #229 added the ability to rollback transactions to ember-data, both automatically and manually via person.get('transaction').rollback().

  • PR #230 makes it easier to create child records e.g. blog.get('posts').createRecord().

  • PR #236 fixes lifecycle events and makes didCreate and didUpdate fire correctly.

If I missed anything big please let me know in the comments or on twitter.

P.S. Thanks to Mike Gunderloy for the idea.

Just (f**king) do it 27 Mar 2012

It’s a bit of a cliché these days, but it still makes a helluva lot of sense. Just (f**king) do it.

I’ve been living in Auckland for a few years now, have a comfortable job at a respectable company, a great group of friends. Some people would say I’m pretty settled, I personally would use the word complacent.

So when a few weeks ago the opportunity came to throw myself way out of my comfort zone, I was all for it. Just (f**king) do it.

So, as of Friday I quit my job, gave notice on my apartment and am on my way to Singapore to work on TradeGecko an exciting new startup with my brother Cameron and his business partner Carl.

I’m sure you’ll hear more about it from me over the coming few months, we’ve got 40 days left in the JFDI incubator and quite a prototype to put together. I am so excited right now.

If you’re not completely happy with where you’re at or there’s something else you’re considering. Just (f**king) do it. You only have one life. Make the most of it.

Hacking the Foursquare API for fun and profit?? 26 Mar 2012

So I have a housemate who has a certain fascination with burgers. His favourite ones seem to come from the local BurgerFuel.

For 12 months he was the Foursquare mayor of Burgerfuel Parnel, eating lunch their every second day (healthy right!!). Luckily they had a great two for one deal for the mayor so he always had half price burgers.

However, after a 4 month OE surprisingly he was ousted. Now that he’s back and into his habits again, it seems he just can’t quite get the mayorship back.

So I thought I’d give him a bit of help.

Here’s a quick little ruby script I wrote, use at your own risk, I can almost guarantee it’s against their ToS.

Firstly log in to Foursquare and head to https://foursquare.com/oauth/ to register a new consumer. You can fill in anything for the website and url, make sure to record the callback url though.

Open your console by running irb -r ./foursquare_bot.rb

Run FoursquareBot.get_oauth(client_id, callback_url) to get a url to visit. Authenticate with Foursquare and we’re good to go, just copy down the code parameter from the url you get redirected to.

URL

Now you can checkin whenever you like with this one liner.

  Foursquare.new(insert_client_id).checkin(your_location_id)

Next step is to make it a daemon and we’re ready to go.