Skip to content

Instantly share code, notes, and snippets.

use 5.14.1;
use charnames ':full';
binmode(STDOUT, 'encoding(utf-8)');
my $i = 0;
my %digit = map { $i++ => $_ }
qw(ZERO ONE TWO THREE FOUR FIVE SIX SEVEN EIGHT NINE);
my $str = $ARGV[0] || die "usage: bold 'string to bold-ify'\n";
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "kraihlight"
@keedi
keedi / gist:3897623
Created October 16, 2012 06:54 — forked from yongbin/gist:3897476
Re: [Perlweekly] #64 - Is Mojolicious anti-CPAN or is it a gateway-drug?
> from: Gabor Szabo [email protected]
> to: yongbin <[email protected]>
> date: Tue, Oct 16, 2012 at 3:08 PM
> subject: Re: [Perlweekly] #64 - Is Mojolicious anti-CPAN or is it a gateway-drug?
> mailed-by: gmail.com
> signed-by: gmail.com
> : Important mainly because of your interaction with messages in the conversation.
>
> I have posted the link to the PW social networks and will try to do a bit more.
> How many people do you expect at the event?
@keedi
keedi / gist:3922144
Created October 20, 2012 05:30
KWP 2012

KPW2012 Schedule

본 세션

Perl 101 - @aer0

14:30 - 14:50 (20분)

@keedi
keedi / anyevent.html
Created October 22, 2012 08:59 — forked from asergeyev/anyevent.html
Anyevent example for websockets to support old websocket proto from some agents (Safari, Chrome on Google TV)
<!DOCTYPE html>
<!-- mostly borrowed from Mojo -->
<html>
<head>
<title>WebSocket</title>
</head>
<body>
Testing WebSockets, please make sure you have JavaScript enabled.
@keedi
keedi / app.psgi
Created October 29, 2012 18:19 — forked from hdp/app.psgi
# vim: ft=perl:
use strict;
use warnings;
use Plack::Builder;
use Plack::App::WrapCGI;
use Plack::App::URLMap;
builder {
enable 'Static',
@keedi
keedi / gist:4030374
Created November 7, 2012 09:27 — forked from JEEN/gist:4015791
티타임 #5 타임테이블
#perl-kr 티타임 #5 타임테이블
19:25 - 19:30 : 개회사(@y0ngbin)
19:30 - 20:00 : Perl6 이야기 (@am0c)
20:00 - 20:30 : ISUCON2 리뷰 (@JEEN_LEE)
20:30 - 20:50 : 휴식
20:50 - 21:20 : 펄 커뮤니티에 제언 (@JellyPooo) - Advent Calendar 이렇게 했으면 좋겠다.
21:20 - 21:55 : 조별대담 겸 @yuni_kim 에게 묻는 미국 IT, Perl
21:55 - 22:00 : 폐회사 (@y0ngbin)
'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"
#!/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");
#!/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
# ...