This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The idea here is to emulate Groovy's delegate= pattern for closures. | |
# We define a builder module. This will receive method calls | |
# from our builder. It could be an instance of an object if we wanted. | |
module FamilyBuilder | |
def self.parent(name) | |
puts "Parent: #{name}" | |
end | |
def self.child(name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// © 2011-2014 Phillip N. Calvin, James Coleman | |
// For use in a setter. | |
// Signs up self to receive KVO notifications about given properties | |
// on any new value and removes self as an observer from the old value. | |
// For example, to observe properties of a property called customer | |
// (backed by ivar _customer): | |
// PCPropertyObserver(customer, @"allowSubscriptionPurchase", @"availableProducts"); | |
// You'd need to write this selector yourself: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# These instructions were tested on Ubuntu 12.04 64bit | |
# Be prepared to wait a while... | |
sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev libxext-dev libpq-dev libx11-dev | |
git clone git://github.com/antialize/wkhtmltopdf.git | |
git clone git://github.com/jcsalterego/wkhtmltopdf-qt.git | |
cd wkhtmltopdf | |
mkdir static-build | |
ln -s ../wkhtmltopdf-qt static-build/qt | |
./scripts/static-build.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: pumacontrol | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Puma web server | |
### END INIT INFO |