Skip to content

Instantly share code, notes, and snippets.

View ahoward's full-sized avatar
💭
probably outside if i'm not hacking.

ara.t.howard ahoward

💭
probably outside if i'm not hacking.
  • https://drawohara.io
  • Palmer, Alaska
  • 23:05 (UTC -08:00)
  • Instagram drawohara
View GitHub Profile
@protocool
protocool / caveatPatchor.js
Created February 14, 2011 02:29
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@nathos
nathos / lorem.rb
Created November 11, 2010 21:24
LoremHelper - a placeholder content generator for Webby
# LoremHelper - a placeholder content generator for Webby
# =======================================================
# based on Travis Dunn's Frank - lorem.rb:
# - https://github.com/blahed/frank/blob/master/lib/frank/lorem.rb
# - original license: https://github.com/blahed/frank/blob/master/LICENSE
#
# LoremHelper creates placeholder content for your Webby [http://webby.rubyforge.org/] projects.
# It's great for quickly prototyping/wireframing a site.
#
# USAGE:
#Kind of like tail -f -n1
db = Mongo::Connection.new(mongo_hostname).db(mongo_dbname)
coll = db.collection(mongo_collection)
start_count = coll.count
tail = Mongo::Cursor.new(coll, :tailable => true, :order => [['$natural', 1]]).skip(start_count- 1)
loop do
if doc = tail.next_document
puts doc
else
sleep 1