Skip to content

Instantly share code, notes, and snippets.

View jyunderwood's full-sized avatar

Jonathan Underwood jyunderwood

View GitHub Profile
##
# Will keep all passed in attributes in the `attributes` attribute
# But will allow you to pull out certain attributes that you want as
# getters and setters. Great for accessing with `random_object.some`
#
class RandomObject
WANTED_ATTRS = [:some, :attrs, :you, :want]
attr_accessor :attributes, *WANTED_ATTRS
@jyunderwood
jyunderwood / nginx.conf
Created April 1, 2013 21:07
Serving PHP with Nginx and PHP-FPM
server {
listen 80;
server_name example.com;
root /home/deploy/apps/example.com/public;
index index.html index.php;
client_max_body_size 1G;
fastcgi_buffers 64 4K;
location / {