2010-07-01から1ヶ月間の記事一覧
By default, an object inherits permissions from its parent object, either at the time of creation or when it is copied or moved to its parent folder. The only exception to this rule occurs when you move an object to a different folder on t…
$PSCP = "C:\tools\putty\pscp.exe -p" # -p は timestamp を保持 $7Z = "C:\Program Files\7-Zip\7z.exe" @( @{ "host" = "192.168.0.1" "user" = "user" "pass" = "password" "src" = "/var/log/httpd/*.1" "dst" = "d:\backup\web1" }, @{ "host" = "192.…
$7z = 'C:\Program Files\7-Zip\7z.exe' $dir = 'f:\Exchange\LogFiles' Get-ChildItem $dir -Recurse | foreach { if ($_.Name -match '.+log$') { $orig = $_.FullName $zip = $_.FullName + '.zip' & $7z a -tzip $zip $orig rm $orig } }
NTEmacs で Shift_JIS のファイルを開くと文字化けになって、C-x RET r で Shift_JIS として開くも、一部 \372 とか \373 などと化けて表示される。で、他のエディタで開くと「はしご高」とかが化けてるのがわかって、要は IBM 拡張文字は Shift_JIS の範囲…
どうでもいいけど、このはてなダイアリーのテーマ (Monotone-flower) の CSS でフォント名が間違っている。いや、どうでもよくないか。 body { font-family:arial, sans-sarif; } h1 { font-family:arial, sans-sarif; } 正しくは sans-serif ね。
Encode::decode #!/usr/bin/perl # utf8 で保存しとくこと use strict; use warnings; use Data::Dumper; use Encode; my $input = "あ"; print Dumper($input); #=> $VAR1 = '縺・; バイト列 print Dumper( decode("utf8", $input) ); #=> $VAR1 = "\x{3042…
base64エンコード $str = "たちあがれ日本" # 文字列からバイト列 (utf-8) に変換する $byte = [System.Text.Encoding]::UTF8.GetBytes( $str ) # 文字列からバイト列 (iso-2022-jp) に変換する # $enc = [System.Text.Encoding]::GetEncoding("iso-2022-jp"…