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
# settings for ARCHI | |
if [ -f $ZDOTDIR/.archi.linux ]; then export ARCHI="linux" | |
elif [ -f $ZDOTDIR/.archi.cygwin ]; then export ARCHI="cygwin" | |
elif [ -f $ZDOTDIR/.archi.dummy ]; then export ARCHI="dummy" | |
elif which uname > /dev/null; then | |
case "`uname -sr`" in | |
Linux*); export ARCHI="linux" ; touch $ZDOTDIR/.archi.$ARCHI ;; | |
CYGWIN*); export ARCHI="cygwin" ; touch $ZDOTDIR/.archi.$ARCHI ;; | |
*); export ARCHI="dummy" ; touch $ZDOTDIR/.archi.$ARCHI ;; |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# JAMAICA solver | |
# by takehikom (http://d.hatena.ne.jp/takehikom/) | |
# Usage: | |
# ruby jamaica.rb | more | |
# ruby jamaica.rb 25 1 3 2 4 1 |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# A tiny combo simulator of Puzzle & Dragons | |
# by takehikom (http://d.hatena.ne.jp/takehikom/) | |
# Usage: | |
# ruby padsim.rb | |
# ruby padsim.rb 111234 511123 451116 234234 234234 |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# A tiny combo checker for Puzzle & Dragons | |
# by takehikom (http://d.hatena.ne.jp/takehikom/) | |
# You can find the updated version: | |
# https://gist.github.com/takehiko/5750263 | |
# Usage: |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# threeposition.rb by takehikom | |
# ruby threeposition.rb 541 => "541-145=396, 396+693=1089" | |
# ruby threeposition.rb | |
# Inspired by | |
# 藤井斉亮「数学的問題解決過程における文字式の役割と機能」, |
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
# settings for installing and utilizing Ruby snapshots | |
# function: | |
# ruby-snss-install | |
# ruby-snapshot-install | |
# ruby-sn-install | |
# ruby-stable-snapshot-install | |
# ruby-ss-install | |
# ruby-install | |
# use-ruby-snapshot |
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
*** aws.orig.rb 2013-02-24 22:10:49.823223500 +0900 | |
--- aws.rb 2013-02-24 22:14:02.582248700 +0900 | |
*************** | |
*** 9,15 **** | |
require 'amazon' | |
require 'amazon/aws/cache' | |
require 'enumerator' | |
! require 'iconv' | |
require 'rexml/document' | |
require 'uri' |
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
*** aws.rb.orig 2013-02-24 19:27:57.448147103 +0900 | |
--- aws.rb 2013-02-24 21:23:29.332241237 +0900 | |
*************** | |
*** 9,15 **** | |
require 'amazon' | |
require 'amazon/aws/cache' | |
require 'enumerator' | |
! require 'iconv' | |
require 'rexml/document' | |
require 'uri' |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
# grid-explorer.rb : Solver of Grid Search Problems | |
# by takehikom (http://d.hatena.ne.jp/takehikom/) | |
if RUBY_VERSION < "1.9" | |
$KCODE = "u" | |
end |
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
;; 領域を選択して M-x url-quote-region-utf8 で," => URLエンコード文字列" を | |
;; 挿入します.UTF-8 でエンコードします. | |
;; また直後に C-x C-x や C-w などとすると,URLエンコード文字列に対する | |
;; 領域処理となります. | |
;; Thanks: https://gist.github.com/436913 | |
;; もし (load "htmlutils") をしていなければ | |
;; 以下のコメントを外してください. | |
;(defun url-escape-point (c) |