Skip to content

Instantly share code, notes, and snippets.

Alexander Sapozhnikov shoorick

Block or report user

Report or block shoorick

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shoorick
shoorick / MyApp-Model-DBI.pm
Created Dec 23, 2010
DBI model for Catalyst with UTF-8 support
View MyApp-Model-DBI.pm
package MyApp::Model::DBI;
use strict;
use warnings;
use base 'Catalyst::Model::DBI';
# skipped some configuration statements
__PACKAGE__->config(
'dsn' => 'dbi:mysql:' . $config->{'sql'}->{'database'} . ':' . $config->{'sql'}->{'host'},
View list-png-not-symlink
@shoorick
shoorick / tab-separated-fields-as-pod-list.sh
Created Aug 19, 2011
Print field list from tab-separated file as POD-formatted list
View tab-separated-fields-as-pod-list.sh
head -n 1 tab-separated.txt \
| perl -na -F'\t' \
-e 'map { printf "=item %d\n\n%s / %s\n\n", $i++, chr(0x40+$i), $_ } @F '
@shoorick
shoorick / lingua-translit-russian.pl
Created Sep 7, 2011
Compare transliteration tables for Russian
View lingua-translit-russian.pl
#!/usr/bin/perl
use Lingua::Translit;
my $sample = 'Эй, жлоб! Где туз? Прячь юных съёмщиц в шкаф.';
my $tr;
for ( 'ALA-LC RUS', 'ISO 9', 'DIN 1460 RUS', 'GOST 7.79 RUS', 'GOST 7.79 RUS OLD' ) {
$tr = new Lingua::Translit( $_ );
printf "%17s %s\n", $_, $tr->translit( $sample );
@shoorick
shoorick / scalar-assign.pl
Created Sep 15, 2011
Assigning @list in scalar context works as length @list
View scalar-assign.pl
#!/usr/bin/perl -l
my @array = qw( alice bob charlie daddy elf );
print @array; # alicebobcharliedaddyelf
my $size = @array;
print $size; # 5, same as length @array
@shoorick
shoorick / arbitrary-sort.pl
Created Sep 19, 2011
Sort list in desired order
View arbitrary-sort.pl
#!/usr/bin/perl -l
# COMPANY: South Ural State University
# CREATED: 09/20/2011 02:09:31 AM
use strict;
use warnings;
=head1 USAGE
./sort.pl
@shoorick
shoorick / link-extractor.pl
Created Oct 7, 2011
Extract http-links from HTML and plain text
View link-extractor.pl
@shoorick
shoorick / accordion-vertical-css3-transition.html
Created Jan 10, 2012
CSS3 transition sample - Vertical Accordion
View accordion-vertical-css3-transition.html
<!DOCTYPE html>
<html>
<head>
<title>CSS3 Transition - Accordion sample</title>
<!-- 2012-01-10 - Alexander Sapozhnikov - http://shoorick.ru/ -->
<style>
body {
font-family: "Liberation Sans",sans-serif;
color: #000;
background-color: #fff;
@shoorick
shoorick / accordion-horizontal-css3-transition.html
Created Jan 12, 2012
CSS3 transition sample - Horizontal Accordion
View accordion-horizontal-css3-transition.html
<!DOCTYPE html>
<html>
<head>
<title>CSS3 Transition - Accordion sample</title>
<!-- 2012-01-12 - Alexander Sapozhnikov - http://shoorick.ru/ -->
<style>
body {
font-family: "Liberation Sans",sans-serif;
color: #000;
background-color: #fff;
@shoorick
shoorick / sphinxdrupal-ru.po
Created Apr 6, 2012
Russian translation for Sphinxdrupal
View sphinxdrupal-ru.po
# Russian translation for sphinxdrupal https://bitbucket.org/ivinco/drupal-7-sphinx-search-module/
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-04-05 18:45+0600\n"
"PO-Revision-Date: 2012-04-06 13:40+0600\n"
"Last-Translator: Alexander Sapozhnikov <shoorick@cpan.org>\n"
You can’t perform that action at this time.