Skip to content

Instantly share code, notes, and snippets.

View aanoaa's full-sized avatar
💭
💩 💩 💩

Hyungsuk Hong aanoaa

💭
💩 💩 💩
View GitHub Profile
#!/usr/bin/env perl
use strict;
use warnings;
use Template;
use XML::Smart;
use Pod::Usage;
use Getopt::Long;
use Data::Dump qw/dump/;
use List::Util qw/first/;
use DBI;
#!/usr/bin/env perl
use strict;
use warnings;
use IO::Socket;
use Time::HiRes qw[gettimeofday tv_interval];
my $time=[gettimeofday()];
unless(@ARGV>1) {
die "usage: $0 host port [document+]\n";
}

Synopsis

xmlquery req.xml
xmlquery req1.xml req2.xml req3.xml
echo xml | xmlquery

Install

## local::lib, cpanminus install
wget -O - http://cpanmin.us/ | perl - local::lib App::cpanminus && echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >> ~/.bashrc && . ~/.bashrc
# Failed test 'PUTs existing URI and reports success'
# at t/put_ok.t line 32.
# STDOUT is:
# not ok 1 - Try to PUT goodlinks.html
#
# not:
# ok 1 - Try to PUT goodlinks.html
#
# as expected
# STDERR is:
#!/usr/bin/env perl
use 5.010;
use warnings;
use strict;
use autodie;
use File::MMagic;
#!/usr/bin/env perl -l
use strict;
use warnings;
#use utf8;
use JSON;
use Pod::Usage;
use HTTP::Request;
use HTTP::Response;
use LWP::UserAgent;
use Data::Dumper qw/Dumper/;
#!perl
use strict;
use warnings;
use Pod::Usage;
use Getopt::Long;
pod2usage(0) unless @ARGV;
my %options;
GetOptions( \%options, "--help" );
pod2usage(0) if $options{help};
my $path = q|git web--browse "C:\Program Files\Git\doc\git\html\git-%s.html"|;

#Screen Command

  • Ctrl + a" list
  • Ctrl + a[N] move to 'N'th virtual tty
  • Ctrl + an move to next virtual tty
  • Ctrl + ap move to previous virtual tty
  • Ctrl + aa move to just now before virtual tty
  • Ctrl + ac make new virtual tty and move
  • Ctrl + ad delete virtual tty
public final class Distance
{
public final static int KILOMETERS = 0;
public final static int STATUTE_MILES = 1;
public final static int NAUTICAL_MILES = 2;
public final static double EARTHS_RADIUS[] = {
6378.1, // Kilometers
3963.1676, // Statue miles
3443.89849 // Nautical miles
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Usage;
use Getopt::Long;
use File::Slurp qw/slurp/;
use MIME::Lite;
use Readonly;
Readonly my $CONTENT_SEPARATOR => <<SEPARATOR;