Skip to content

Instantly share code, notes, and snippets.

View sergeyromanov's full-sized avatar

Сергей Романов sergeyromanov

View GitHub Profile

Keybase proof

I hereby claim:

  • I am sergeyromanov on github.
  • I am sromanov (https://keybase.io/sromanov) on keybase.
  • I have a public key ASD9agQ-PhjlrIHSnvvyc_Z2u1c6BrCrPzNvlup6bm6rDQo

To claim this, I am signing this object:

// jsbootcamp, task1
// by Sergey Romanov
// simple test function
function ok(got, expect, desc) {
if (got === expect) {
console.log('ok --', desc);
} else {
console.log("fail\n\tgot:", got, "expected:", expect, '--', desc);
}
// jsbootcamp, task0
// by Sergey Romanov
var text = " \n\
The sky above the port was the color of television, tuned \n\
to a dead channel. \n\
\n\
`It's not like I'm using,' Case heard someone say, as he \n\
shouldered his way through the crowd around the door of the \n\
Chat. `It's like my body's developed this massive drug defi- \n\
ciency.' It was a Sprawl voice and a Sprawl joke. The Chatsubo \n\
@sergeyromanov
sergeyromanov / gist:5834660
Created June 21, 2013 21:57
potion issue
It seems that potion assumes that Unicode code points are 4 hex max:
sromanov@killdozer ~/mydev/potion $ cat example/unicode.pn
"I'm snowman - \u2603\n" print
"I'm bactrian - \u1f42b\n" print
sromanov@killdozer ~/mydev/potion $ bin/potion example/unicode.pn
I'm snowman - ☃
I'm bactrian - ὂb
@sergeyromanov
sergeyromanov / authors.pl
Last active December 14, 2015 15:39
List to update Acme::CPANAuthors::Russian
#!/usr/bin/env perl
use 5.014;
use HTTP::Tiny;
my $url = 'http://backpan.perl.org/authors/id';
my %authors = (
ADTIM => 'Тимур Кондратьев',
ALBOVA => 'Alexey Bovanenko',
ALXPLDEV => 'Kononov Alexey',
@sergeyromanov
sergeyromanov / pgessays.py
Created November 19, 2012 09:52 — forked from olasitarska/pgessays.py
Builds epub book out of Paul Graham's essays.
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <ola@sitarska.com>
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""
import re, ez_epub, urllib2, genshi
@sergeyromanov
sergeyromanov / zip_codes.pl
Last active October 12, 2015 10:27
Scrape St. Petersburg ZIP codes by district
#!/usr/bin/env perl
use 5.014;
use Encode qw(decode);
use Mojo::UserAgent;
use List::MoreUtils qw(pairwise);
use YAML qw(DumpFile);
my $SOURCE_URL = 'http://www.spbindex.ru/listindex.html';
my $OUT_FILE = 'sp_indices.yml';
@sergeyromanov
sergeyromanov / sample.txt
Created September 18, 2012 22:31
RNC result output
"gr" property
--------------------------------------------------------
| left -1 | lemma | right 1 | right 2 |
--------------------------------------------------------
| (20)PR,norm= | веник | (54)CONJ,norm= | (26)PR,norm= |
--------------------------------------------------------
"lex" property
---------------------------------------------
| left -1 | lemma | right 1 | right 2 |
@sergeyromanov
sergeyromanov / unicode-introduction.pod
Created August 17, 2012 15:31
unicode tutorial draft

NAME

Unicode introduction

LANGUAGE

en

@sergeyromanov
sergeyromanov / gen_qr.pl
Created March 6, 2012 12:34
generate QR code
#!/usr/bin/env perl
use strict;
use Imager::QRCode qw(plot_qrcode);
my %params = (
size => 15,
margin => 2,
version => 1,
level => 'M',
casesensitive => 1,