Skip to content

Instantly share code, notes, and snippets.

@breezhang
breezhang / issue.txt
Created May 6, 2014 04:53
issue for scrooloose/syntastic perl file syn check return abnormal 1
perl file syn check all error return abnormal 1
patch .....\Perl\Critic\Command.pm
sub run {
use Data::Dumper::Concise;
my %options = _get_options();
@files = _get_input(@ARGV);
my ($violations, $had_error_in_file) = _critique(\%options, @files);
@breezhang
breezhang / gist:11498660
Created May 3, 2014 14:17
perl5 build very easy
perl build very easy
1. git source code
2. change some Makefile eg Win32->Makefile so int->64bit ... ithread ...vc
free ..
3. just nmake -f Makefile can ok
4 test maybe has iuuse
maybe iuuse "Can't extract version from pod/perldelta.pod at
Porting/pod_lib.pl"
like change
@breezhang
breezhang / gist:11491085
Created May 3, 2014 03:21
win32 computer basic info
@echo computer name
@wmic csproduct get name, identifyingnumber
@echo "BIOS"
@wmic BIOS get Name ,Manufacturer,SerialNumber
@echo display adapter
@wmic path win32_videocontroller get Name
@breezhang
breezhang / b.pl
Created May 2, 2014 05:31
wget cary download not for mainland china .....
echo off
@for %%i in (%*) do @start wget --no-check-certificate --header="Accept: text/html" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0" %%i
@breezhang
breezhang / d.pl
Created May 1, 2014 12:01
perl5 Win32::CLR .net Several versions first call new add full name
#!perl -w
use Win32::CLR;
use Data::Dumper::Concise;
$a = Win32::CLR->create_instance(
"System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
2007, 8, 9, 10, 11, 12
);
print $a;
@breezhang
breezhang / gist:11414838
Created April 29, 2014 23:53
set ip address use netsh
Netsh interface ip set address name=”local area connection”
source=static addr=static_ip_ address
mask=subnet_mask gateway=gateway_ip 1
@breezhang
breezhang / gist:11360350
Created April 28, 2014 02:19
ack Multi Path search some stuff for win32 cmd script
@echo off & setlocal
setlocal EnableDelayedExpansion
set t=%path%
:loop
for /f "tokens=1* delims=;" %%a in ("%t%") do (
set tt=%%a
set ttt=!tt:~-1!
set tttt=!tt:~0,-1!
IF "%ttt%"=="\" (
use Win32::GUI;
my $Window = new Win32::GUI::Window(
-name => "Window",
-left => 100,
-top => 100,
-width => 250,
-height => 150,
-title => "Win32::GUI::Timer test",
);
@breezhang
breezhang / testwhoami.pl
Last active August 29, 2015 14:00
whois API
use feature ":5.14";
use JSON;
use Data::Dumper::Concise;
#my $a = `curl http://api.whoapi.com/?domain=github.com&r=whois&apikey=**b0f747f971c11f22ce1d76cf6d0025`;
#my $b = `curl http://api.whoapi.com/?domain=github.com&r=geo&apikey=**b0f747f971c11f22ce1d76cf6d0025`;
#my $b = `curl http://api.whoapi.com/?domain=google.com&apikey=**b0f747f971c11f22ce1d76cf6d0025&r=cert`;
#my $b = `curl http://api.whoapi.com/?domain=whoapi.com&apikey=**b0f747f971c11f22ce1d76cf6d0025&r=blacklist`;
#my $b = `curl http://api.whoapi.com/?domain=whoapi.com&apikey=**b0f747f971c11f22ce1d76cf6d0025&r=blacklist`;
#my $b = `curl http://api.whoapi.com/?domain=whoapi.com&apikey=**b0f747f971c11f22ce1d76cf6d0025&r=social`;
@breezhang
breezhang / testref.pl
Created April 18, 2014 15:06
perl tie %{}' '@{}'
use feature ":5.14";
use Data::Dumper::Concise;
package two_refs;
use overload '%{}' => \&gethash, '@{}' => sub { ${ shift() } };
sub new {
my $p = shift;
bless \[@_], $p;
}