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 'watir-webdriver' | |
browser = Watir::Browser.new | |
browser.goto 'http://bit.ly/watir-example' | |
browser.text_field(:name => 'entry.0.single').set 'Watir' | |
browser.button(:name => 'submit').click | |
puts browser.title == 'Thanks!' |
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 'net/imap' | |
require 'kconv' | |
require 'pit' | |
require 'logger' | |
class ImapFetcher | |
def initialize(pit_name) | |
@pit = Pit.get( |
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
#!/bin/sh | |
echo $(cd $(dirname $0) && pwd)/$(basename $0) |
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
<?php | |
$map = array(); | |
for ($i = 0; $i < 10; $i++){ | |
$map[] = chr(ord('0') + $i); | |
} | |
for ($i = 0; $i < 26; $i++){ | |
$map[] = chr(ord('A') + $i); | |
} |
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://doruby.kbmj.com/trinityt_on_rails/20081022/Ruby_Google_ | |
require 'rubygems' | |
require 'gcalapi' | |
$KCODE = "utf8" | |
# アカウントメールアドレス | |
mail = "{{address}}" | |
# パスワード | |
pass = "{{password}}" | |
# Googleカレンダーの「カレンダー設定」画面から取得した非公開URL |
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
(* | |
This script is modified by akkunchoi to change filename rule. | |
The original source of this script is written by veritrope.com. | |
http://veritrope.com | |
Apple Mail -- Text File Exporter | |
Version 1.1 | |
January 17, 2011 | |
Project Status, Latest Updates, and Comments Collected at: | |
http://veritrope.com/code/export-apple-mail-messages-and-notes-to-text-files |
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
<?php | |
/** | |
* | |
* $ sqlite3 hoge.db | |
* | |
* sqlite> create table hoge(id integer, name varchar(16)); | |
* sqlite> insert into hoge values('1', 'userA'); | |
* sqlite> .quit | |
* | |
*/ |
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
config.yml |
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
#!/usr/bin/bash | |
# Get Markdown.pl http://daringfireball.net/projects/markdown/ | |
mkdir ./html | |
for i in foo.md bar.md | |
do | |
out=${i/.md/.html} | |
content=`perl ./Markdown.pl $i` |
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
#!/usr/bin/env ruby | |
# | |
# Fetch my current address from mac addresses on wi-fi for MacOSX | |
# | |
# via http://unknownplace.org/memo/2012/07/21/1/ | |
# | |
# GeolocationAPI | |
# http://code.google.com/p/gears/wiki/GeolocationAPI | |
# Reverse Geocoding | |
# https://developers.google.com/maps/documentation/geocoding/?hl=ja#ReverseGeocoding |