rewriteルールを適用するための Rack ミドルウェアです。 Apache mod_rewrite ルールを書く代わりに使えます。
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
# Send Japanese mail using Gmail SMTP server. You need tlsmail. | |
# $ sudo gem install tlsmail | |
require "rubygems" | |
require "tlsmail" | |
require "nkf" | |
require "net/smtp" | |
def sendgmail(from, to, subject, body, user, pass, host = "smtp.gmail.com", port = 587) | |
body = <<EOT |
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 "net/http" | |
require "enumerator" | |
# Example Usage: | |
# | |
# use Rack::Proxy do |req| | |
# if req.path =~ %r{^/remote/service.php$} | |
# URI.parse("http://remote-service-provider.com/service-end-point.php?#{req.query}") | |
# end | |
# end |
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
;; -*- mode:lisp; package:markdown-mode -*- | |
;; markdown.l ( http://www.geocities.jp/kiaswebsite/xyzzy/markdown.html ) | |
;; Rev: 227 を元に改変 | |
;; | |
;; License | |
;; ======= | |
;; | |
;; Copyright (c) 2011 Yousuke Ushiki <citrus.yubeshi@gmail.com> | |
;; Copyright (c) 2005,2006 kia |
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
install | |
url --url http://ftp.iij.ad.jp/pub/linux/centos/6.3/os/x86_64/ | |
# if you use proxy | |
# url --url http://ftp.iij.ad.jp/pub/linux/centos/6.3/os/x86_64/ --proxy http://proxy-ip:8080/ | |
lang en_US.UTF-8 | |
keyboard us | |
network --bootproto=dhcp | |
rootpw password | |
firewall --disabled | |
authconfig --enableshadow --passalgo=sha512 |
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
#TODO | |
# package周り調整 | |
# ディスク部分を外出しできるように。CentOS6で%ksappendがうまく動かなくて全部ベタ書きになってる | |
install | |
text | |
url --url=http://192.168.1.10/mrepo/centos6-x86_64/disc1/ | |
lang ja_JP.UTF-8 | |
keyboard jp106 | |
network --onboot yes --device eth0 --bootproto dhcp --noipv6 |
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/ruby | |
#数値を16進数文字列に | |
p 65.to_s(16) #=> "41" | |
#数値をASCII文字に | |
p 65.chr #=> "A" | |
#文字列を16進数とみなして数値に | |
p "41".hex #=> 65 |
tl;dr IdotabaのGemfileは"全プレ"になりました。ご笑納ください。→ Gemfile
rebuild.fmのep36でお知らせさせていただきました、Idobataの最新版Gemfileプレゼントをお届けいたします。 過日はIdobata会議01への多数のご参加ありがとうございました。おかげさまで盛況なミートアップとなりました。 (当日会場を提供いただいたEngine Yardさまのブログにて、Idobata会議01当日の様子がまとめられています。ありがとうございます!)