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
agent="$HOME/.ssh-agent-$USER" | |
if [ -S "$SSH_AUTH_SOCK" ]; then | |
case $SSH_AUTH_SOCK in | |
/tmp/*/agent.[0-9]*) | |
ln -snf "$SSH_AUTH_SOCK" $agent && export SSH_AUTH_SOCK=$agent | |
esac | |
elif [ -S $agent ]; then | |
export SSH_AUTH_SOCK=$agent | |
else | |
echo "no ssh-agent" |
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 "oauth" | |
CONSUMER_KEY = 'XXXXXXXXXXXXXXXXXXXX' | |
CONSUMER_SECRET = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
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
# -*- coding: utf-8 -*- | |
require 'resolv' | |
old = Resolv.getaddress("hiroki.jp").to_s | |
p old | |
begin | |
now = Resolv.getaddress("hiroki.jp").to_s | |
sleep(1) | |
p now |
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
# -*- coding: utf-8 -*- | |
require 'nokogiri' | |
require 'open-uri' | |
require 'kconv' | |
page = open "http://www.amazon.co.jp/exec/obidos/ASIN/4048860690/" | |
# page = open "http://www.amazon.co.jp/exec/obidos/ASIN/4774149942/" | |
html = Nokogiri::HTML(page.read, nil, 'Shift_JIS') | |
stock = html.search "//div[@class='buying']//span[@class='availGreen']" |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>#weblogName#: #title#</title> | |
<style type="text/css"> | |
<!-- | |
/* | |
* HTML5 Boilerplate | |
* | |
* What follows is the result of much research on cross-browser styling. |
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
rm /opt/boxen/rbenv/rbenv.d/install/00_try_to_download_ruby_version.bash | |
rbenv uninstall 1.9.3-p429 | |
CONFIGURE_OPTS="--with-readline-dir=/opt/boxen/homebrew/opt/readline --with-openssl-dir=/opt/boxen/homebrew/opt/openssl" rbenv install 1.9.3-p429 | |
rbenv uninstall 2.0.0-p195 | |
RUBY_CONFIGURE_OPTS="--with-readline-dir=/opt/boxen/homebrew/opt/readline --with-openssl-dir=/opt/boxen/homebrew/opt/openssl" rbenv install 2.0.0-p195 |
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 | |
puts 'Hello Gist!' |
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
test |
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
Index: build_mozc.py | |
=================================================================== | |
--- build_mozc.py (revision 326) | |
+++ build_mozc.py (working copy) | |
@@ -214,6 +214,8 @@ | |
# Include subdirectory of win32 and breakpad for Windows | |
if options.target_platform == 'Windows': | |
gyp_file_names.extend(glob.glob('%s/win32/*/*.gyp' % SRC_DIR)) | |
+ elif options.target_platform == 'Mac': | |
+ gyp_file_names.extend(glob.glob('%s/unix/emacs/*.gyp' % SRC_DIR)) |
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
$ cd ~/src/mozc/src | |
$ echo -e '(0 CreateSession)\n(1 SendKey 1 97)' | out_mac/Release/mozc_emacs_helper | |
((mozc-emacs-helper . t)(version . "1.13.1651.101")(config . ((preedit-method . roman)))) | |
((emacs-event-id . 0)(emacs-session-id . 1)(output . ())) | |
((emacs-event-id . 1)(emacs-session-id . 1)(output . ((id . "9469176874988818267")(mode . hiragana)(consumed . t)(preedit . ((cursor . 1)(segment ((annotation . underline)(value . "あ")(value-length . 1)(key . "あ")))))(candidates . ((size . 1)(candidate ((index . 0)(value . "あ")(annotation . ((description . "ひらがな")))(id . 0)))(position . 0)(category . suggestion)(display-type . main)(footer . ((label . "Tabキーで選択")))))(status . ((activated . t)(mode . hiragana)(comeback-mode . hiragana)))(all-candidate-words . ((candidates ((id . 0)(index . 0)(value . "あ")(annotation . ((description . "ひらがな")))))(category . suggestion)))))) |