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 | |
use strict; | |
use warnings; use utf8; | |
use Benchmark qw(cmpthese); | |
use URI; | |
use URI::Split qw(uri_split); | |
my $uri = 'https://www.example.com/path/2016/10/my-awesome-photo.jpg?utm=aaa#anchor1'; | |
cmpthese(200000, { |
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 | |
use strict; | |
use Mojo::JSON qw(j); | |
use Storable qw(thaw nfreeze); | |
use Data::Dumper; | |
use Symbol qw(delete_package); | |
my $json = j('{"boolean":true,"string":"this is string"}'); | |
warn Dumper($json); | |
my $bin = nfreeze($json); |
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 | |
use strict; | |
use warnings; | |
package Foo { | |
sub new { bless {}, shift } | |
sub AUTOLOAD { | |
my $self = shift; | |
our $AUTOLOAD; |
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
# name : perl | |
# -- | |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Getopt::Long qw( :config posix_default no_ignore_case gnu_compat ); | |
use Pod::Usage; |
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
## -*- mode: perl; coding: utf-8 -*- | |
requires 'DBI'; | |
requires 'DBD::mysql'; | |
requires 'Digest::SHA'; | |
requires 'Plack'; | |
requires 'CGI::PSGI'; | |
requires 'CGI::Parse::PSGI'; | |
requires 'CGI::Compile'; | |
requires 'XMLRPC::Transport::HTTP::Plack'; | |
requires 'HTML::Entities'; |
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
➜ cpandiff Cache::Memcached::Fast 0.19 0.20 | head -40 | |
diff -Npurw Cache-Memcached-Fast-0.19/Changes Cache-Memcached-Fast-0.20/Changes | |
--- Cache-Memcached-Fast-0.19/Changes 2010-04-24 04:35:28.000000000 -0700 | |
+++ Cache-Memcached-Fast-0.20/Changes 2013-04-03 10:35:44.000000000 -0700 | |
@@ -1,6 +1,24 @@ | |
Revision history for Perl extension Cache::Memcached::Fast. | |
+0.20 2013-04-03 | |
+ - finally fix magic.t failure. Magic handling introduced in |
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 | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
my ($pkg, $from, $to) = @ARGV; | |
$pkg =~ s/::/-/g; | |
my $content = get("http://search.cpan.org/diff/${pkg}-${from}-${pkg}-${to}.-w.diff") | |
or die "oops. no content. try again!\n"; |
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
use strict; | |
use warnings; | |
use FindBin; | |
use MogileFS::Client; | |
use Plack::Builder; | |
use Plack::MIME; | |
my $mog; |
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 --git a/mysqld/python_modules/DBUtil.py b/mysqld/python_modules/DBUtil.py | |
index 21b7522..db2bfbb 100644 | |
--- a/mysqld/python_modules/DBUtil.py | |
+++ b/mysqld/python_modules/DBUtil.py | |
@@ -86,7 +86,7 @@ def parse_innodb_status(innodb_status_raw): | |
innodb_status['active_transactions'] | |
for line in innodb_status_raw: | |
- istatus = line.split() | |
+ istatus = line.replace(',', '').split() |
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
;;;; -*- mode: lisp-interaction; syntax: elisp; coding: iso-2022-7bit -*- | |
(provide 'init-color) | |
(require 'font-lock) | |
(global-font-lock-mode t) | |
;; basics | |
(set-face-foreground 'default "white") | |
(set-face-background 'default "black") | |
(set-cursor-color "green") |
NewerOlder