Skip to content

Instantly share code, notes, and snippets.

View LBRapid's full-sized avatar
🏠
Working from home

John Dyer LBRapid

🏠
Working from home
View GitHub Profile
  • Install Xcode (App Store)
  • Install command line tools (Xcode preferences > Additional downloads)
  • Install Homebrew
#!/usr/local/bin/ruby
#
# This script installs to /usr/local only. To install elsewhere you can just
# untar http://github.com/mxcl/homebrew/tarball/master anywhere you like.
#
#
# 30th March 2010:
# Added a check to make sure user is in the staff group. This was a problem
# for me, and I think it was due to me migrating my account over several
# versions of OS X. I cannot verify that for sure, and it was tested on
module HTML
class StathamSanitizer < WhiteListSanitizer
protected
def tokenize(text, options)
super.map do |token|
if token.is_a?(HTML::Tag) && options[:parent].include?(token.name)
token.to_s.gsub(/</, "&lt;")
else