Skip to content

Instantly share code, notes, and snippets.

@seaofclouds
seaofclouds / gist:9218
Created September 7, 2008 00:57 — forked from defunkt/gist:9214
it works, sucka!
require 'rubygems'
require 'atom' # sudo gem install atom
require 'net/http'
require 'uri'
feed_url = 'http://search.twitter.com/search.atom?q=meh'
begin
feed = Atom::Feed.new(Net::HTTP::get(URI::parse(feed_url)))
feed.entries.each do |entry|
# BAD:
foo.bar = 25
foo.biz = 'Hello World'
foo.bazzle = 42
# GOOD:
foo.bar = 25
foo.biz = 'Hello World'
foo.bazzle = 42
@seaofclouds
seaofclouds / staticizer.rb
Created March 14, 2009 02:49 — forked from rtomayko/staticizer.rb
add static file export to sinatra apps!
# http://groups.google.com/group/sinatrarb/browse_thread/thread/84d525759af8615a
require 'fileutils'
class Staticizer
def initialize(app, cache_path)
@app = app
@cache_path = cache_path
end
def call(env)
h1 {
font-size:210%;
text-shadow: 1px 1px 5px black;
font-weight:bold;
text-transform:uppercase;
background: -webkit-gradient(linear, 0% 35%, 0% 79%, from(#FAFAFA), to(#A1A1A1), color-stop(.4,#C9C9C9)), none;
-webkit-background-clip: text;
color:transparent;
}
@seaofclouds
seaofclouds / Tendercrawl.md
Created June 17, 2011 21:25 — forked from dylanegan/Tendercrawl.md
Tenderloin bar crawl
@seaofclouds
seaofclouds / gist:3364564
Created August 15, 2012 23:11 — forked from ejholmes/gist:3364440
Base google map style
window.gmaps_style = [
{
featureType: 'all',
elementType: 'all',
stylers: [
{ color: '#1B1B23' }
]
},
{
featureType: 'administrative',
@seaofclouds
seaofclouds / appcache.manifest
Last active February 22, 2017 17:47 — forked from autioch/index.html
Charades - JS example.
CACHE MANIFEST
# Cache manifest version 0.0.1
# If you change the version number in this comment,
# the cache manifest is no longer byte-for-byte
# identical.
index.html
NETWORK:
# All URLs that start with the following lines