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 -*- | |
# ひとり Wiki ファイルのリネームスクリプト。 | |
# | |
# ひとり Wiki のファイルは EUC-JP での 16 進表現になっているので、 | |
# これを Shift_JIS に変換してリネームしつつ、必要なディレクトリを | |
# 作っていく。 | |
# | |
# 例: | |
# BEF0CAF3B8BB2F554E4958B4D8CFA2.txt | |
# ↓ |
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
diff --git a/lib/perl5/site_perl/Git.pm b/lib/perl5/site_perl/Git.pm | |
index 6d38dd1..e21fae0 100644 | |
--- a/lib/perl5/site_perl/Git.pm | |
+++ b/lib/perl5/site_perl/Git.pm | |
@@ -1277,9 +1277,20 @@ sub _command_common_pipe { | |
open (STDERR, '>&', $opts{STDERR}) | |
or die "dup failed: $!"; | |
} | |
+ require Encode; | |
+ foreach my $arg (@args) { |
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
diff --git a/lib/milkode/cdweb/app.rb b/lib/milkode/cdweb/app.rb | |
index 839bae3..95390b0 100644 | |
--- a/lib/milkode/cdweb/app.rb | |
+++ b/lib/milkode/cdweb/app.rb | |
@@ -17,14 +17,14 @@ require 'milkode/cdweb/lib/mkurl' | |
set :haml, :format => :html5 | |
-get '/' do | |
+get '/milkode/' do |
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
# Oracle で「set colsep ','」として出力された固定長 CSV を | |
# 通常の CSV に変換するスクリプト | |
# | |
# カレントディレクトリの *.csv に対して処理を行い、new_*.csv に結果を出力します。 | |
# 先頭行のカンマ位置を基準にフィールドの区切りを検出するため、 | |
# 先頭行のデータ部分にカンマが含まれないことを確認のうえ実行してください。 | |
Dir.glob("*.csv").each do |file| | |
puts file | |
output = "" |
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 | |
# decode "?\xxx" | |
comments = $stdin.read.gsub(/\?\\(\d{3})/) {$1.to_i.chr} | |
TIMELOG_RE = / | |
( | |
((\d+)(h|hours?))((\d+)(m|min)?)? | |
| | |
((\d+)(h|hours?|m|min)) |
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-shell-cmd.php~ Tue Jul 05 19:13:26 2011 | |
+++ php-shell-cmd.php Thu Sep 08 13:33:32 2011 | |
@@ -48,8 +48,25 @@ | |
* @param mixed $errctx ... | |
*/ | |
function __shell_default_error_handler($errno, $errstr, $errfile, $errline, $errctx) { | |
+ global $__shell_exts; | |
+ | |
+ // use integers for PHP versions compatibility | |
+ $warnings = array( |
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
import groovy.swing.SwingBuilder | |
import java.awt.Font | |
text = "!\"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~‚ ƒAˆŸ[‚Ï" | |
font_names = [ | |
"Monospaced", "Courier New", "Consolas", "Inconsolata", "MS Gothic", "MeiryoKe_Console", | |
"M+2VM+IPAG circle", "Migu 1M", "Ricty", "Ricty Discord" | |
] | |
new SwingBuilder().edt { | |
frame(title:'Frame', show: true, pack: true) { |
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
cr cr cr |
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
@echo off | |
node.exe "%~dp0node_modules\coffee-script\bin\coffee" %* |
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 | |
class My_Auth_Adapter_Doctrine2 implements Zend_Auth_Adapter_Interface | |
{ | |
/** | |
* Doctrine Entity Manager | |
* | |
* @var \Doctrine\ORM\EntityManager | |
*/ | |
protected $_em = null; |