This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.__ ___. .__ __ .__ .___ | |
| |__ _____ ______ ______ ___.__. \_ |__ |__|_______ _/ |_ | |__ __| _/_____ ___.__. | |
| | \ \__ \ \____ \ \____ \< | | | __ \ | |\_ __ \\ __\| | \ / __ | \__ \ < | | | |
| Y \ / __ \_| |_> >| |_> >\___ | | \_\ \| | | | \/ | | | Y \/ /_/ | / __ \_\___ | | |
|___| /(____ /| __/ | __/ / ____| |___ /|__| |__| |__| |___| /\____ | (____ // ____| | |
\/ \/ |__| |__| \/ \/ \/ \/ \/ \/ | |
_____ ___ ___ ___ ___ ___ | |
/ /::\ / /\ / /\ /__/\ /__/\ /__/| ___ | |
/ /:/\:\ / /:/_ / /:/_ \ \:\ \ \:\ | |:| / /\ | |
/ /:/ \:\ / /:/ /\ / /:/ /\ \ \:\ \ \:\ | |:| / /:/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
punctuation woes: | |
This is my fancy address-like note | |
Harrison’s Office | |
8 Fancy Bldg. / 27 Fancy Drive | |
Fancyville, Fl 12345 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".tweet").tweet({ | |
username: ["robbmajor","MattFid","chadengle","seaofclouds"] | |
count: 9, | |
loading_text: "loading tweets..." | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BAD: | |
foo.bar = 25 | |
foo.biz = 'Hello World' | |
foo.bazzle = 42 | |
# GOOD: | |
foo.bar = 25 | |
foo.biz = 'Hello World' | |
foo.bazzle = 42 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get git branch name | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
# set prompt | |
PS1="\[\e[37;45;1m\][\u@\h]\[\e[0m\[\e[35m\] \w\$(parse_git_branch) #\[\e[0m\] " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feeling meh? you're not the only one: http://meh.seaofclouds.com | |
itz beganz az ze rainy dayz experiment in parzings ze informationz on ze twitterz | |
-- Skwisgaar Skwigelf | |
bundled with sinatra in two versions: | |
1) atom/nethttp/uri | |
2) httparty/json | |
haven ze fun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
en: | |
good: good | |
good_intro: you're using | |
good_outro: ", a good web browser." | |
good_browser: good browser | |
good_badge_intro: show the world you care about web standards and put the browser challenge badge on your site. | |
bad: bad | |
bad_intro: treat yourself to something good. | |
bad_outro: upgrade to <a href='http://www.apple.com/safari/download/'>safari</a> or <a href='http://firefox.com/'>firefox</a> today! | |
bad_browser: bad browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%form#form_name.form_type | |
%fieldset | |
%label label | |
%input.text{:type=>"text"} | |
%p.help | |
%small this is a help for the preceding field | |
%button.submit |