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
% cat create.php | |
<?php | |
include('rhaco3.php'); | |
$dbc = new \org\rhaco\store\db\Dbc( | |
'{"type":"org.rhaco.store.db.module.Sqlite","dbname":"board"}' | |
); | |
$dbc->query('create table board(' | |
.'id integer primary key autoincrement' | |
.',name text,comment text,created_at text)' | |
); |
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
PHP 5.3.2 (cli) (built: Oct 13 2010 13:09:53) | |
Copyright (c) 1997-2010 The PHP Group | |
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies | |
with XCache v1.3.0, Copyright (c) 2005-2009, by mOo |
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
% cat unko.php | |
<?php | |
define('HOGE', 'hogehoge'); | |
echo HOGE | |
?> | |
% php unko.php | |
hogehoge |
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
# gem install watchr でインストールできるよ | |
# watchr hogehoge.rb で実行するよ | |
require 'watchr' | |
target_file = 'hogehoge.rst' | |
watch(target_file) do |md| | |
system("date;rst2html.py #{md[0]} #{File.basename(md[0], '.rst')}.html") | |
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
:035 > 100000.to_s(16).reverse.scan(/.{1,4}/).join(':').reverse | |
=> "1:86a0" | |
:036 > 102400.to_s(16).reverse.scan(/.{1,4}/).join(':').reverse | |
=> "1:9000" | |
:037 > 102400.to_s(16) | |
=> "19000" |
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
def x_rotate(x, y, r) | |
(x * Math.cos(r/180.0 * Math::PI)) - (y * Math.sin(r/180.0 * Math::PI)) | |
end | |
def y_rotate(x, y, r) | |
(x * Math.sin(r/180.0 * Math::PI)) + (y * Math.cos(r/180.0 * Math::PI)) | |
end | |
def rotate(x, y, r); | |
{:x => x_rotate(x, y, r), :y => y_rotate(x, y, r)} |
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
# lib/review/htmlbuilder.rb | |
def headline(level, label, caption) | |
prefix, anchor = headline_prefix(level) | |
puts '' if level > 1 | |
a_id = anchor.nil? ? "" : "h#{anchor}" | |
if caption.empty? | |
# ここの出力が何が正しいのかよくわかんないんだよなー | |
unless label.nil? | |
puts %Q[<a id="#{a_id}" >#{a_id}</a>] unless a_id.empty? |
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
0. %uname -a | |
Darwin gram.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 | |
1. %svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby_src_20111023 | |
リビジョン: 33510 | |
2. %autoconf | |
3. %./configure --prefix=$HOME/rubies/ruby_20111023 | |
4. %make | |
CC = gcc | |
LD = ld | |
LDSHARED = gcc -dynamic -bundle |
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
= 結果 = | |
9791 tests, 2208074 assertions, 26 failures, 72 errors, 46 skips | |
= 環境 = | |
% uname -a | |
Darwin gram.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 | |
== 以下ログ == | |
%svn co http://svn.ruby-lang.org/repos/ruby/trunk/ ruby_src_20111024/ | |
(略) |
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
定期的に実行 | |
Updating http://svn.ruby-lang.org/repos/ruby/trunk | |
U ChangeLog | |
U version.h | |
U test/ruby/test_path.rb | |
U file.c | |
At revision 33528 | |
[workspace] $ /bin/sh -xe /var/folders/zz/zzzivhrRnAmviuee+++++E++++2/-Tmp-/hudson3121286858741482101.sh | |
+ ORG_HOME=/var/root | |
+ HOME=/Users/Shared/Jenkins/Home |