I hereby claim:
- I am mpearce on github.
- I am mtpearce (https://keybase.io/mtpearce) on keybase.
- I have a public key ASDpPwUrEpXZUXsyiOAMfTG9QUhFKJFGIYPzPCSsRifxdwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env sh | |
if ! which md5sum > /dev/null; then | |
echo Install md5sum | |
exit 1 | |
fi | |
if ! which curl > /dev/null; then | |
echo Install curl | |
exit 1 |
# http://book.git-scm.com/4_setting_up_a_private_repository.html | |
# Setting up a new git repo on a server. I always forget the --bare and instead get receive.denyCurrentBranch errors. Thanks Scott for the book. | |
$ git clone --bare /home/user/myrepo/.git /tmp/myrepo.git | |
$ scp -r /tmp/myrepo.git myserver.com:/opt/git/myrepo.git |
## How to warm caches_page with delayed_job (or any other async worker) | |
## Why build it on the fly, when you can build it in advance. | |
def perform | |
require 'action_controller/integration' | |
app = ActionController::Integration::Session.new | |
app.host! thing_host # for a system with subdomains | |
app.get thing_path | |
app.get next_thing_path | |
end |
require 'action_controller/integration' | |
ActionController::Base::expire_page("/sitemap.xml") | |
app = ActionController::Integration::Session.new | |
app.host = "notexample.com" | |
app.get("/sitemap.xml") |