Skip to content

Instantly share code, notes, and snippets.

View dspencerr's full-sized avatar

Spencer Rose dspencerr

View GitHub Profile
# Based off of Rails, by way of http://www.raulparolari.com/Rails/class_inheritable
class Class
def class_inheritable_reader(*syms)
syms.each do |sym|
class_eval <<-EOS
def self.#{sym}
read_inheritable_attr(:#{sym})
end
EOS
@maccman
maccman / widget.rb
Created October 19, 2010 09:48
MacRuby Webkit Interface
framework "WebKit"
class Widget
class RPC
class << self
public :include
end
def initialize(widget)
@widget = widget
@redoPop
redoPop / .gitignore
Created June 18, 2010 22:08
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your