Skip to content

Instantly share code, notes, and snippets.

@niwo
niwo / puma
Last active December 15, 2022 08:49
puma with rbenv on CentOS 6
#!/bin/sh
#
# puma - this script starts and stops the puma daemon
#
# chkconfig: - 85 15
# description: Description \
# goes here...
# processname: puma
# config: /etc/puma.conf
# pidfile: /home/stanislaw/apps/micro-apps/puma/puma.pid
@tillsc
tillsc / eager_loading.rb
Created July 23, 2012 07:02
Eager Loading DM associations
# Usage:
#
# customers = Customer.all
# customers.eager_load(Customer.orders.line_items.item, Customer.address)
#
module DataMapper
module EagerLoading
def eager_load(*query_paths)