воскресенье, 26 апреля 2015 г.

how add gist code to blogger

It's very simple

1. Make gist

https://gist.github.com/


2. https://gist.github.com/mishin/a955752a26e3c6baa3b6
Copy Embed html


3. So, we got <script src="https://gist.github.com/mishin/a955752a26e3c6baa3b6.js"></script>
4. And put this code to end of html
5.




Thats is!!
#This is my perl tips collection:
http://grep.cpan.me/?q=author%3A%28MIYAGAWA%7CDCONWAY%7CBDFOY%7CSZABGAB%29+shift
author:(MIYAGAWA|DCONWAY|BDFOY|SZABGAB) shift
http://eax.me/perl5-oop/
http://grep.cpan.me/?q=author%3A%28MIYAGAWA%7CDCONWAY%7CBDFOY%29+__DATA__
author:(MIYAGAWA|DCONWAY|BDFOY) __DATA__
→ milla-tutorial$ sp_ch () {(cat $1|aspell --lang=ru-yo list|aspell --lang=en list); };sp_ch lib/POD2/RU/perlretut.pod
{ (cat $1|aspell --lang=ru-yo list|aspell --lang=en list); }
sp_ch () {(cat $1|aspell --lang=ru-yo list|aspell --lang=en list); };sp_ch lib/POD2/RU/perlretut.pod
perl -M"File::Slurp qw(edit_file)" -e "edit_file { s/=item (\d+)/=item C<$1>/g } 'lib/POD2/RU/perlretut.pod' "
perl -pi.bak -e 's/=item (\d+)/=item C<$1>/g' lib/POD2/RU/perlretut.pod
view raw perl_gist.pl hosted with ❤ by GitHub

how hack git

Hi, my script to full github history and make longest stick:
https://github.com/mishin/presentation/blob/master/01_test_git.pl






use Modern::Perl;
use Git::Repository;
use File::Slurp qw( :edit );
my $url = 'https://github.com/mishin/perldoc-ru.git';
my $dir = '/home/mishin/github/test_repo';
#Git::Repository->run( clone => $url => $dir );
my $r = Git::Repository->new( work_tree => $dir );
use DateTime;
use DateTime::Format::Strptime;
my $dt = DateTime->new(
year => 2015,
month => 02,
day => 07,
hour => 16,
minute => 12,
second => 47,
nanosecond => 500000000,
time_zone => 'Europe/Moscow',
);
#'Fri Jul 26 19:34:15 2013 +0200';
my $formatter =
DateTime::Format::Strptime->new( pattern => '%a %b %d %H:%M %Y %z' );
$dt->set_formatter($formatter);
my $n = 1;
for ( 1 .. 50 ) {
#inplace edit
edit_file { s/__NUMBER\d+__/__NUMBER${n}__/ }
$dir . '/pod2-ru/POD2-RU/scripts/get_pod_one_liners.md';
say "iteration №${n}";
say 'edit ok';
$r->run( add => '.' );
say 'add ok';
my $date = $dt->_stringify();
$r->run( commit => '-m', "my $n commit message", "--date=$date" );
say 'commit ok';
$dt->add( days => 1 );
$n++;
}
view raw 01_hack_git.pl hosted with ❤ by GitHub

суббота, 25 апреля 2015 г.

letter to perl-thanks@perl.org

According to Gabor post http://perlmaven.com/improve-your-communication-skills
I decided to write something on english every day.

Some times ago I write to perl-thanks@perl.org

Thanks a lot for all beautifull things, that you got
Hi, Larry!! Good luck!
I never mind what i could do without perl.
Use Perl or die!! Perl is my paycheck!!

best regards,
Nikolay Mishin

So I've got answer from Ricardo Signes