Skip to content

Instantly share code, notes, and snippets.

View msoap's full-sized avatar
🇺🇦

Serhii Mudryk msoap

🇺🇦
  • Kyiv, Ukraine
  • 01:18 (UTC +03:00)
View GitHub Profile
@msoap
msoap / http-mojo-server-test.pl
Created March 16, 2012 20:11
test http server for static files via Mojo::Server::Daemon
#!/usr/bin/perl
=head1 NAME
http-mojo-server-test.pl
=head1 DESCRIPTION
test http server via Mojo::Server::Daemon
@msoap
msoap / http-server-test.pl
Created March 17, 2012 16:10
test http server via Net::Server::HTTP for static files
#!/usr/bin/perl
=head1 NAME
http-server-test.pl
=head1 DESCRIPTION
test http server via Net::Server::HTTP for static files
@msoap
msoap / flac2mp3.rb
Created March 25, 2012 12:09 — forked from mxcl/flac2mp3.md
Simplest functional FLAC to MP3 converter script you can make
#!/usr/bin/env ruby
# http://gist.github.com/gists/124242
# Deps: brew install flac lame
filename = ARGV[0]
abort "Usage: flac2mp3 FLACFILE" if filename.nil?
map = {"TITLE" => "--tt", "ARTIST" => "--ta", "ALBUM" => "--tl", "TRACKNUMBER" => "--tn", "GENRE" => "--tg", "DATE" => "--ty"}
args = ""
@msoap
msoap / E.pm
Created March 26, 2012 20:46
E.pm - module for perl oneliners
package E;
=head1 DESCRIPTION
module for perl oneliners
=head1 SYNOPSIS
perl -ME -e 'p [map {"$_$_"} qw/q w e/]'
perl -ME -e 'j {%ENV}'
@msoap
msoap / wgethtml.pl
Last active June 9, 2020 09:46
save html page with css/js/images
#!/usr/bin/perl
#################################################
#
# load html with css/js/img and embed it
#
#################################################
use warnings;
use strict;
@msoap
msoap / Raspberry Pi httpd benchmark.md
Last active September 26, 2018 16:09
Raspberry Pi httpd benchmark with wrk

Raspberry Pi httpd benchmark

Total RPS

All:

               Go/fasthttp (10 thr): 930.0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

Nginx (10 thr): 826.1 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

@msoap
msoap / Go vs Perl memory usage.md
Last active April 11, 2018 07:13
Go vs Perl memory usage

Go vs Perl memory usage

{int}->{int} = int:
  lang (keys² q-ty): MB of memory
  Go   (1500²):   66.38 ■■■■■■■■■■■■■■■■■■■■■■■■■■
  Perl (1500²):  131.46 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

  Go   (1000²):    40.8 ■■■■■■■■■■■■■■■■

Perl (1000²): 57.65 ■■■■■■■■■■■■■■■■■■■■■■■

@msoap
msoap / http-honeypot.go
Last active August 29, 2015 14:11
Honeypot for http tracking
/*
Honeypot for http tracking.
sudo sh -c 'echo "127.0.0.1 google-analytics.com" >> /etc/hosts'
sudo sh -c 'echo "127.0.0.1 googleads.g.doubleclick.net" >> /etc/hosts'
sudo sh -c 'echo "127.0.0.1 mc.yandex.ru" >> /etc/hosts'
go build http-honeypot.go
sudo ./http-honeypot
@msoap
msoap / script.go
Last active October 8, 2022 17:23
Run Go program as script
//usr/bin/env go run $0 "$@"; exit
package main
import (
"fmt"
"os"
)
func main() {
fmt.Println("Hello world!")
@msoap
msoap / golang-quality-check.sh
Created September 13, 2018 12:05
Quick and easy golang project quality check
find . -name '*.go' | xargs grep -r 'interface{}' | wc -l