Skip to content

Instantly share code, notes, and snippets.

View bryanthompson's full-sized avatar

Bryan Thompson bryanthompson

  • http://www.37chairs.com
  • Lincoln, NE
View GitHub Profile
To use with newsbeuter, drop this in your ~/.newsbeuter/config
bookmark-cmd "~/Documents/delicious-bookmark.rb"
Then when you find a story you want to bookmark, hit ctrl+b. Edit the URL and title if necessary.
If you want to add additional tags, put them before your description separated by spaces,
then include a |pipe| character. Example:
description:
toread madebymarket cms | This is the actual description I want to save.
@bryanthompson
bryanthompson / cache_helper.rb
Created January 14, 2010 22:08
Simple fragment caching in sinatra
require 'sinatra/base'
class CacheHelper
module Sinatra
module Helpers
def cache(name, options = {}, &block)
if cache = read_fragment(name, options)
@_out_buf << cache
else
pos = @_out_buf.length