Better HN
topnewbestaskshowjobs
Log inSign up

timriley

100 karma · joined Dec 14, 2010 (15y ago) · 17 submissions

Submissions

1.

A change-positive Ruby web application architecture(icelab.com.au ↗)

4 points · by timriley · 10y ago · discuss

2.

Better Ruby with an inversion of control container(icelab.com.au ↗)

2 points · by timriley · 10y ago · discuss

3.

Functional command objects in Ruby(icelab.com.au ↗)

1 points · by timriley · 10y ago · discuss

comment 14y ago · link · parent

You can see these (frequently updated) TextMate 2 release notes here: https://github.com/textmate/textmate/blob/master/Application...

comment 14y ago · link · parent

You actually have a fair bit of flexibility here, if that helps: https://github.com/angular/angular.js/blob/master/CHANGELOG....

comment 14y ago · link · parent

+1 for AssetSync and S3 hosting when you're running an app on Heroku. I wouldn't do it any other way anymore.

comment 14y ago · link · parent

Aside from the obvious benefits, even just streaming certain responses can be useful when your app lives on the Heroku cedar stack and you want to keep connections alive for longer than the default 30 seconds. I put this to use (albeit with an older Rails technique) for processing credit cards. Long description of it here: http://icelab.com.au/articles/money-stress-and-the-cloud/

comment 15y ago · link · parent

Without the gem, making your RESTful routes have the right plural/singular forms takes something like this:

    match 'jobs' => 'jobs#index', :via => :get, :as => :jobs
    match 'jobs' => 'jobs#create', :via => :post
    resources :job, :controller => 'jobs', :except => [:index, :create]
For a bunch of resources, it's certainly much easier to use the one-line `tasteful_resources` helper instead.

It's your call as to whether you think this is worthwhile, but we think that these small details matter, even in URLs.

9.

A tasteful variation on the RESTful Rails routes(icelab.com.au ↗)

30 points · by timriley · 15y ago · 15 comments

comment 15y ago · link · parent

Ah, that's very useful! Thanks for the heads up.

comment 15y ago · link · parent

The configs that Foreman generates for upstart or standard init system include the 'respawn' keyword, which makes sure that these processes are restarted if they crash for any reason. In this way, it can replace monit's basic functionality. What's not there at the moment is a way of restarting the processes when they, for example, use too much memory or CPU. Ideally you'd have something check for this as well.

comment 15y ago · link · parent

Yes, this is absolutely right. The commands in your Procfile don't have to be rake tasks, they can be any executable system command.

comment 15y ago · link · parent

While Foreman is written in Ruby, you don't actually have to use it in any way that is connected to a Ruby or Rails app. All you need is a Procfile and the foreman gem installed on your system.

Then, you can run the processes in the foreground with `foreman start` (eg. on your dev machine), or export the processes to config files for the init system of your choice (eg. on your server). Once the processes have config files in the init system, Foreman is out of the picture: your processes are run and managed by the init system.

Of course, this all works very well in a Rails app (hence my blog post), but that's only one of many uses. Hope that helps!

14.

Run Your Own Piece of Heroku with Foreman(icelab.com.au ↗)

47 points · by timriley · 15y ago · 15 comments

comment 15y ago · link · parent

Great point. A good reason to keep them around in some form, even if you only revisit them occasionally.

comment 15y ago · link · parent

I had about 400 yet-to-be-completed items in my to-do list before I started afresh. Seemed like way too many. How about you?

17.

TaskPaper and To-Do List Bankruptcy Without the Trauma(icelab.com.au ↗)

14 points · by timriley · 15y ago · 4 comments