Skip to content

Instantly share code, notes, and snippets.

abstract class Comment
{
public abstract void Generate(StringBuilder builder);
public string Generate()
{
StringBuilder builder = new StringBuilder();
this.Generate(builder);
return builder.ToString();
}
#!/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
# ...
#!/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");
'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"
# 256 colors
set -g default-terminal "screen-256color"
# C-b is not acceptable -- Vim uses it
set-option -g prefix C-a
bind-key C-a last-window
# Start numbering at 1
set -g base-index 1
name = Dummy-Module
author = Keedi Kim - 김도형 <[email protected]>
license = Perl_5
copyright_holder = Keedi Kim
copyright_year = 2013
version = 0.003
[@Basic]
[MetaJSON]
@keedi
keedi / gist:5260793
Last active December 15, 2015 12:29
#!/usr/bin/env perl
use 5.010;
use utf8;
use strict;
use warnings;
# while <> 구문은 표준입력 또는 명령줄 인자를
# 파일로해서 모든 컨텐츠를 줄단위로 받아들임
while (<>) {
diff --git a/examples/lib/SnipMate/Snippets.pm b/examples/lib/SnipMate/Snippets.pm
index ef345d4..49b38b2 100644
--- a/examples/lib/SnipMate/Snippets.pm
+++ b/examples/lib/SnipMate/Snippets.pm
@@ -11,9 +11,11 @@ use Moose;
use MooseX::Types::Path::Class;
+use Template::Caribou;
use Template::Caribou::Utils;
# This chunk of stuff was generated by App::FatPacker. To find the original
# file's code, look for the end of this BEGIN block or the string 'FATPACK'
BEGIN {
my %fatpacked;
$fatpacked{"Archive/Zip.pm"} = <<'ARCHIVE_ZIP';
package Archive::Zip;
use strict;
BEGIN {
@keedi
keedi / firefox.desktop
Created February 12, 2013 14:24
/home/askdna/.local/share/applications
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Name=Firefox
Name[bg]=Firefox
Name[ca]=Firefox
Name[cs]=Firefox
Name[el]=Firefox
Name[es]=Firefox