[フレーム]
Joined November 2012
·

dommmel

Switzerland
·
·
·

@coaku: Mhmm - looks like you found an error in my post. Thanks! I think this should say: "Public key" resp. "deploy_rsa.pub". Changing it now.
BTW: Nowadays I use a CI service (in my case wercker.com) to build and deploy my jekyll pages from github to heroku. I found this to be more convenient in my case.

@brbrown25: I don't have a config.rb file

Update: I forgot to mention that the build server uses multiple heroku buildpacks. To configure the app accordingly run heroku config:add BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi.git (thanks Joe Martinez)

You can alias the hub command in your .dotfiles like so

hub_path=$(which hub)
if [[ -f $hub_path ]]
then
 alias git=$hub_path
fi

that gives you the additional github commands

git pull-request Open a pull request on GitHub
git fork Make a fork of a remote repository 
 on GitHub and add as remote
git create Create this repository on GitHub and 
 add GitHub as origin
git browse Open a GitHub page in the default browser
git compare Open a compare page on GitHub

@eveevans : Yeah, give it a shot and let me know if you run into any troubles.

Posted to Free background jobs on heroku over 1 year ago

@jalada Cool - please keep us updated on how it works out

Posted to Free background jobs on heroku over 1 year ago

@jalada Good question. I guess you could use Process.waitpid in some way... haven't done it myself

Posted to Free background jobs on heroku over 1 year ago

@linjunpop - I mentioned sucker_punch in the last paragraph "Alternatives". Anything particular you wanted to say?

Nice, I didn't know you could set ping rates with new relic.
Just to add another way of doing this: I use the following to keep low traffic heroku apps from idling without having to spin up another dyno to do so:

add gem "rufus-scheduler" to Gemfile

heroku config:add HOSTNAME=url.of.the.app

add config/initializers/heroku_keep_alive.rb

require 'rufus/scheduler'
scheduler = Rufus::Scheduler.start_new
 if Rails.env.production?
 scheduler.every '10m' do
 require "net/http"
 require "uri"
 Net::HTTP.get_response(URI.parse(ENV["HOSTNAME"]))
 end
 end

@barapa Yeah - that bit is confusing. I am by no way an expert on this kind of stuff - maybe others can chime in and provide more insightful comments than me - anyway here's my answer

response and request objects

The two accessor methods response and request exist in every
Rails controller. Some details can be found in this section of the rails guides.

async.callback

The async.callback is part of a scheme that was first implemented in thin afaik (see this blog post) and has since found its way into some other server software, including Rainsbows!/EventMachine.

@mattetti Thanks for pointing it out. Would love to know how you would go about it.

From the top of my head: One could use Rack::FiberPool and EM-Synchrony like so

Gemfile

gem 'rack-fiber_pool', :require => 'rack/fiber_pool'
gem 'em-synchrony'

config.ru

...
use Rack::FiberPool
run MyApp::Application

app/controllers/asycn_controller.rb

conn = Faraday::Connection.new(:url => 'http://slowapi.com') do |builder|
 builder.use Faraday::Adapter::EMSynchrony
end
resp = conn.get '/delay/1'
@res = resp.body 
render
Achievements
1,805 Karma
153,220 Total ProTip Views
Honey Badger
Have at least one original Node.js-specific repo
Nephila Komaci
Have at least one original repos where PHP is the dominant language
Velociraptor
Have at least one original repo where Perl is the dominant language
Walrus
The walrus is no stranger to variety. Use at least 4 different languages throughout all your repos
Forked
Have a project valued enough to be forked by someone else
Charity
Fork and commit to someone's open source project in need
Mongoose 3
Have at least three original repos where Ruby is the dominant language
Mongoose
Have at least one original repo where Ruby is the dominant language
Kona
Have at least one original repo where CoffeeScript is the dominant language

AltStyle によって変換されたページ (->オリジナル) /