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 -uNr /usr/local/nagios/lib.bak/Opsview/Keyword.pm /usr/local/nagios/lib/Opsview/Keyword.pm | |
--- /usr/local/nagios/lib.bak/Opsview/Keyword.pm 2010-09-27 12:06:20.000000000 +0900 | |
+++ /usr/local/nagios/lib/Opsview/Keyword.pm 2010-10-07 10:52:12.000000000 +0900 | |
@@ -26,6 +26,8 @@ | |
__PACKAGE__->table("keywords"); | |
+__PACKAGE__->utf8_columns( qw/description/ ); | |
+ | |
__PACKAGE__->columns( Primary => qw/id/ ); |
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 -uNr /usr/local/opsview-web.bak/lib/Opsview/Web/ControllerBase/WrapCGI.pm /usr/local/opsview-web/lib/Opsview/Web/ControllerBase/WrapCGI.pm | |
--- /usr/local/opsview-web.bak/lib/Opsview/Web/ControllerBase/WrapCGI.pm 2010-09-27 11:09:44.000000000 +0900 | |
+++ /usr/local/opsview-web/lib/Opsview/Web/ControllerBase/WrapCGI.pm 2010-10-07 11:27:13.000000000 +0900 | |
@@ -161,7 +161,8 @@ | |
if ( $c->stash->{div_id} ) { | |
$body_data = '<div id="' . $c->stash->{div_id} . '">' . $body_data . "</div>"; | |
} | |
- $c->stash( cgi_output => $body_data ); | |
+ use Encode qw/encode decode/; | |
+ $c->stash(cgi_output => decode('utf8',$body_data)); |
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
# UNIX | |
perl -MLWP::Simple -e 'foreach my $n (227180..227196){ my @imgs = (my $t=get("http://gall.dcinside.com/list.php?id=racinggirl&no=$n")) =~ m!(http://dcimg1.dcinside.com/viewimage.php[^'"'"']+)!g; foreach (0..$#imgs) { print "Getting -> $imgs[$_]\n"; getstore($imgs[$_], $n."_".$_.".jpg") } }' | |
# Windows | |
perl -MLWP::Simple -e "foreach my $n (227180..227196){ my @imgs = (my $t=get(qq{http://gall.dcinside.com/list.php?id=racinggirl&no=$n})) =~ m!(http://dcimg1.dcinside.com/viewimage.php[^']+)!g; foreach (0..$#imgs) { print qq/Getting -> $imgs[$_]\n/; getstore($imgs[$_], $n.'_'.$_.'.jpg') } }" |
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 perl | |
# Usage: twit2irc.pl irc.example.com 6667 nickname '#channel1' '#channel2' '#channel3' | |
use strict; | |
use warnings; | |
use Encode qw/encode decode/; | |
use URI::Escape; | |
use utf8; | |
use String::IRC; | |
use AnyEvent::IRC::Client; | |
#use AnyEvent::Socket; |
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 python | |
# -*- coding: utf-8 -*- | |
import urllib | |
import re | |
class KoreanSpeller: | |
def __init__(self, text): | |
self.text = text |
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 perl | |
# 사용법 | |
# perl demacboogi.pl *.zip #zip파일만 변환 | |
# perl demacboogi.pl #모든파일 변환 | |
use 5.010; | |
use strict; | |
use warnings; | |
use Encode qw/encode decode/; | |
use Unicode::Normalize qw/compose/; | |
use File::Copy; |
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
* Bo.pm | |
package Bo; | |
sub new { | |
my ($class) = @_; | |
return bless { buff => 0 }, $class; | |
} | |
sub buff { |
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
'How to use -> cscript remote_exe.vbs hostname "cmd /c dir" | |
strComputer = Wscript.Arguments(0) | |
strCommand = Wscript.Arguments(1) | |
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process") | |
errReturn = objWMIService.Create( strCommand , Null, Null, intProcessID ) | |
Select Case errReturn | |
Case 0 WScript.Echo "Command successfully completed " & "Process ID: " & intProcessID | |
Case 2 WScript.Echo "Access Denied" | |
Case 3 WScript.Echo "INsufficient Privilege" |
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 perl | |
#How to use -> perl remote_exe.pl hostname "cmd /c dir" | |
use 5.010; | |
use strict; | |
use warnings; | |
use Win32::OLE; | |
use Win32::OLE::Variant; | |
my ($strComputer, $strCommand) = @ARGV; | |
my $objWMIService = Win32::OLE->GetObject("winmgmts:{impersonationLevel=impersonate,(security)}//$strComputer\\root\\cimv2:Win32_Process"); |
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 perl | |
#How to use | |
#> perl remote_wmi.pl hostname Win32_ComputerSystem | |
#> perl remote_wmi.pl hostname Win32_PerfFormattedData_PerfOS_System | findstr SystemUpTime | |
# Here's a list of a few Helpful classes to get you started. | |
# http://msdn.microsoft.com/en-us/library/windows/desktop/aa394084%28v=vs.85%29.aspx | |
# Win32_ComputerSystem | |
# Win32_Processor | |
# Win32_TimeZone | |
# ... |