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
use strict; | |
use warnings; | |
use Win32::OLE; | |
sub getDriveSpace { | |
my ($drive) = @_; | |
my $wql = 'SELECT DeviceID, FreeSpace FROM Win32_LogicalDisk'; | |
my $items = Win32::OLE->GetObject('winmgmts:/root/CIMV2')->ExecQuery($wql); | |
my %info = map {uc($_->DeviceID) => $_->FreeSpace} Win32::OLE::in $items; | |
return $info{uc($drive)} || 0; |
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
# -*- mode: CPerl ; coding: utf-8 -*- | |
use strict; | |
use warnings; | |
use utf8; | |
use Data::Dumper; | |
# for convert unit test | |
# perl -e "require 'ftpc_proxy.pl';" | |
use IPC::Open2; | |
use Time::Local; |
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
H:\home\karo\Desktop> (2012/04/04 23:02:25.51) | |
$rm -rf ..\.milkode | |
H:\home\karo\Desktop> (2012/04/04 23:02:35.42) | |
$milk init --default | |
create : H:/home/karo/.milkode/milkode.yaml | |
terminate called after throwing an instance of 'std::runtime_error' | |
what(): locale::facet::_S_create_c_locale name not valid | |
This application has requested the Runtime to terminate it in an unusual way. |
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
@if(0)==(0) @echo off & rem -*- Javascript -*- | |
CScript.exe //NoLogo //E:JScript "%~f0" %* | |
exit /b 0 | |
@end | |
var excel = new ActiveXObject("Excel.Application"), | |
WshShell = WScript.CreateObject("WScript.Shell"), | |
BIN_DIR = WScript.ScriptFullName.replace(WScript.ScriptName, ""); | |
WINDOW_CLASS = "HTML Application Host Window Class", | |
//WINDOW_CLASS = "Internet Explorer_Server", |
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
import java.io.File; | |
public class Hoge { | |
protected static String command = "mshta"; | |
protected static String html = (new File(".").getAbsoluteFile().getParent()) + File.separator + "a.html"; | |
public static void main(String[] args) throws | |
java.io.IOException, InterruptedException { | |
System.exit(Runtime.getRuntime().exec(command + " " + html).waitFor()); | |
} | |
} |
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
# -*- Perl -*- | |
use strict; | |
use warnings; | |
use Plack::Request; | |
# for exit in Pod::Perldoc | |
BEGIN {*CORE::GLOBAL::exit = sub { warn 'exit!' };} | |
use Pod::Perldoc; | |
sub { |
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
var host = WScript.Arguments.Named.Item("host") || "localhost"; | |
var telnet_port = WScript.Arguments.Named.Item("telnet_port") || 8023; | |
var ftp_port = WScript.Arguments.Named.Item("ftp_port") || 8021; | |
var telnet = { | |
user: "hoge", pass: "hoge", | |
bin: "telnet.exe", port: telnet_port, | |
dir: "/tmp/", file: "hoge.csv" | |
}; |
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
// test.rc | |
// rc.exe /V test.rc | |
// link /DLL /NOENTRY /NOLOGO /machine:x86 /OUT:test.dll test.res | |
// res://test.dll/JPG/A.jpg | |
A.JPG JPG A.JPG | |
B.JPG JPG B.JPG |
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
use strict; | |
use warnings; | |
use utf8; | |
=DESCRIPTION | |
あいうえお | |
=cut |
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
diff -ruN original\Pod-ProjectDocs-0.40\lib\Pod\ProjectDocs\ArrowImage.pm utf8japanese\Pod-ProjectDocs-0.40\lib\Pod\ProjectDocs\ArrowImage.pm | |
--- original\Pod-ProjectDocs-0.40\lib\Pod\ProjectDocs\ArrowImage.pm Fri Aug 19 12:19:29 2011 | |
+++ utf8japanese\Pod-ProjectDocs-0.40\lib\Pod\ProjectDocs\ArrowImage.pm Tue May 22 05:30:59 2012 | |
@@ -1,6 +1,7 @@ | |
package Pod::ProjectDocs::ArrowImage; | |
use strict; | |
use warnings; | |
+use utf8; | |
use base qw/Pod::ProjectDocs::File/; | |
use MIME::Base64; |