Skip to content

Instantly share code, notes, and snippets.

View ogawa's full-sized avatar
💭
I may be slow to respond.

Hirotaka Ogawa ogawa

💭
I may be slow to respond.
View GitHub Profile
@ogawa
ogawa / socks-proxy.sh
Created August 1, 2011 11:16
This script for handling SSH-Socks Proxy on Mac OS X.
#!/bin/sh
#
# Step 1. Install proctools to use "pgrep" command.
#
# Step 2. Configure your .ssh/config to include:
#
# Host proxy-host
# HostName proxy-host.example.com
# User a12345
# DynamicForward localhost:1080
@ogawa
ogawa / homebrew-emacs-23.3b.diff
Created July 22, 2011 16:40
emacs.rb with emacs-inline and fullscreen patches.
diff --git a/Library/Formula/emacs.rb b/Library/Formula/emacs.rb
index 856a34a..20654fd 100644
--- a/Library/Formula/emacs.rb
+++ b/Library/Formula/emacs.rb
@@ -28,6 +28,7 @@ class Emacs < Formula
def patches
p = []
+ p0 = []
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# --- From: http://docs.python.org/library/csv.html
# --- BEGIN
import csv, codecs, cStringIO
class UTF8Recoder:
"""
Iterator that reads an encoded stream and reencodes the input to UTF-8
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# EDIT HERE!
OUTPUT_DIR = '/tmp/'
# --- From: http://docs.python.org/library/csv.html
# --- BEGIN
import csv, codecs, cStringIO
@ogawa
ogawa / breadcrumb-example.html
Created November 11, 2010 10:18
Breadcrumb example
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.example.com/dresses" itemprop="url">
<span itemprop="title">洋服</span>
</a> ›
<div itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.example.com/dresses/real" itemprop="url">
<span itemprop="title">ドレス</span>
</a> ›
<div itemprop="child" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.example.com/clothes/dresses/real/green" itemprop="url">
@ogawa
ogawa / fc.py
Created October 19, 2010 07:55
FacebookCommander - an early prototype of a command-line interface for Facebook
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys, getopt
import os, yaml
import cgi
import urllib
import webbrowser
import facebook