This file contains hidden or 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 'net/dns/resolver' | |
# Custom Domain | |
# | |
# Require net-dns gem | |
# | |
# A Rack middleware to to resolve the custom domain to original subdomain | |
# for your multi telent application. | |
# | |
# It's all transperant to your application, it performs cname lookup and |
This file contains hidden or 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> | |
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<style type="text/css">@import 'doc.css';</style> | |
<div id='potion'><img src='potion-1.png' /></div> | |
</head><body><div id='central'> | |
<h1 class="kana">ポーション</h1> | |
<h1>A Short Pamphlet</h1> | |
<h4>by why the lucky stiff</h4> | |
<p>Well, here we go. You want to learn Potion<sup class="footnote"><a href="#fn1">1</a></sup>? Sure, okay. But first, bear in mind that Potion isn’t done yet. And it does very little. It’s completely esoteric. So long as we’ve got that straight.</p> |
This file contains hidden or 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
" Vim color file | |
" eclips3remix v0.1 | |
" eclips3remix - | |
" vim version of the eclips3media textmate theme | |
" cool help screens | |
" :he group-name | |
" :he highlight-groups |
This file contains hidden or 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
def fib(n): | |
if n == 0 or n == 1: | |
return n | |
else: | |
return fib(n-1) + fib(n-2) | |
for i in range(36): | |
print "n=%d => %d" % (i, fib(i)) | |
# Python 2.5.4 |
This file contains hidden or 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
# browsing of shared dvds/cds on leopard | |
defaults write com.apple.NetworkBrowser EnableODiskBrowsing -bool true | |
defaults write com.apple.NetworkBrowser ODSSupported -bool true |
This file contains hidden or 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
#! /bin/sh | |
# http://kbeezie.com/view/nginx-and-django/ | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server |
This file contains hidden or 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://www.mikealrogers.com/archives/695 | |
http://gist.github.com/239890 |
This file contains hidden or 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
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(/</, "<") | |
else |
This file contains hidden or 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
# converts sections to chapters, subsections to sections and subsubsections to subsections after processing with pandoc. | |
$ pandoc -t latex -C TeXHeader -s Chapter1 Chapter2 | sed -e 's/\ | |
\section{/\\chapter{/g' \ | |
-e 's/subsection{/section{/g' > book.tex | |
$ pdflatex book.tex |