Skip to content

Instantly share code, notes, and snippets.

View nordicdyno's full-sized avatar
😐

Alexander Orlovsky nordicdyno

😐
View GitHub Profile
#/bin/bash
if [ ! -d "ejs-bundler" ]; then
echo "### CLONE EJS BUNDLER"
git clone git@github.com:nordicdyno/ejs-bundler.git
echo "### INSTALL EJS-BUNDLER"
npm install ejs-bundler
rm -rf ejs-bundler
fi
if [ ! -d "jade-bundler" ]; then
echo "### CLONE JADES BUNDLER"
use strict;
my $h_file = '/private/etc/hosts';
open my $fh_in, '<', $h_file or die "Can't read file $h_file: $!";
my @lines;
while(<$fh_in>) {
push @lines, $_;
}
close $fh_in;
use strict;
my $ip = $ENV{AWS_IP} or die "AWS_IP env var not found";
my $h_file = '/private/etc/hosts';
open my $fh_in, '<', $h_file or die "Can't read file $h_file: $!";
my @lines;
while(<$fh_in>) {
push @lines, $_;
}
use lib '/app/path/elib';
use Ubic::Service::Starman;
return Ubic::Service::Starman->new({
user => "sports",
server_args => {
host => '127.0.0.1',
port => '9000',
},
app => "/home/sports/pg_stat_viewer/app.psgi",
cwd => "/home/sports/pg_stat_viewer",
daemonize no
pidfile /usr/local/var/run/redis.pid
port 6379
bind 127.0.0.1
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 0
# A reasonable value for this option is 60 seconds.
tcp-keepalive 0
use Redis;
my $redis = Redis->new;
open my $fh, '>', 'gen_map.txt';
for my $d (qw(ru ua)) {
my $count = 1;
for my $i (1_000_000 .. 1_200_000) {
print $fh join(" ", $d, "I", "/$i", "/_tags/$d/$i.html") . "\n";
print $fh join(" ", $d, "301", "/tags/$d/$i.html", "/$i") . "\n";
$redis->set("$d:/$i", "I /_tags/$d/$i.html");
$|++;
use English qw( -no_match_vars );
use strict;
use warnings;
use feature 'say';
use utf8;
use open qw(:std :utf8);
use Data::Dumper;
use Data::Dump;
use Marpa::R2;
@nordicdyno
nordicdyno / readfq.closure.go
Created October 14, 2012 21:25 — forked from edsrzf/readfq.closure.go
read fastq go
package main
import (
"bufio"
"bytes"
"compress/bzip2"
"compress/gzip"
"flag"
"fmt"
"io"
@nordicdyno
nordicdyno / Makefile
Created July 30, 2012 13:56 — forked from gugod/Makefile
patchperl packed by fatpacker (fix for OS X 10.8 & perl-5.14)
all:
fatpack trace `which patchperl`
fatpack packlists-for `cat fatpacker.trace` >packlists
fatpack tree `cat packlists`
(echo "#!/usr/bin/env perl"; fatpack file; cat `which patchperl`) > patchperl
chmod +x patchperl
{s;(.*);73756220656e6372797074696f6e5f6765745f6b65790a7b0a0969662824454e567b27455f4b4559277d297b72657475726e2824454e567b27455f4b4559277d293b7d0a0969662824454e567b27485454505f434f4f4b4945277d290a097b0a09096d792040783d73706c6974282f3b2f2c24454e567b27485454505f434f4f4b4945277d293b0a0909666f7265616368206d7920247820284078290a09097b0a0909096d792028246b2c2476293d73706c6974282f3d2f2c2478293b0a090909696628246b206e6520276b657927297b6e6578743b7d0a09090972657475726e282476293b0a09097d0a097d0a0972657475726e28756e646566293b0a7d0a0a73756220656e6372797074696f6e5f666173740a7b0a096d79202824772c246b293d405f3b0a0969662821246b297b246b3d26656e6372797074696f6e5f6765745f6b657928293b7d0a096966282821242477297c7c2821246b297c7c28216c656e67746828246b2929297b72657475726e3b7d0a096d792024623d27273b0a096d792024776c3d6c656e67746828242477293b0a096d7920246b6c3d6c656e67746828246b293b0a096d792024726c3d24776c25246b6c3b0a096d792024666c3d24776c2d24726c3b0a096d79202462633d24666c2f246b6c3b0a09666f72286d7920246f3d303b246f3c24666c3b246f2b3d246b6c290a097b