Skip to content

Instantly share code, notes, and snippets.

View kshcherban's full-sized avatar
🏠
Working from home

Konstantin Shcherban kshcherban

🏠
Working from home
View GitHub Profile
@kshcherban
kshcherban / image-service.ini
Created March 18, 2014 08:48
yandex tank config
[phantom]
address=10.241.240.58:8080
rps_schedule = line(100,5000,5m)
ammofile=/data/ammo/elliptics/pluto.ammo
cache_dir=/data/stpd.cache
instances=2000
[monitoring]
config=none
@kshcherban
kshcherban / puppet-unicorn-init
Created June 3, 2014 07:56
init script for unicorn puppet server
#!/bin/bash
# unicorn-puppet
# chkconfig: - 98 02
lockfile=/var/lock/puppetmaster-unicorn
pidfile=/var/run/puppet/puppetmaster_unicorn.pid
RETVAL=0
DAEMON=/usr/bin/unicorn
DAEMON_OPTS="-D -c /etc/puppet/unicorn.conf"
@kshcherban
kshcherban / sysctl.conf
Last active August 29, 2015 14:02
high net load sysctl
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.core_pattern = /tmp/cores/%e.core
net.ipv4.tcp_syncookies = 0
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 68719476736

virtup

Virtup was initially developed to become a partial Vagrant replacement for KVM.

Virtup provides simple command line interface to operate with virtual machines. It can easily import virtual machine from image into hypervisor, start it and provide you with it's ip address to connect via SSH or other preferred method.

Requirements

pcm.!default pulse
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
pcm.bluetooth {
type bluetooth
device "00:0D:FD:35:3A:64"
profile "auto"
}
pcm.!default pcm.bluetooth
ctl.!default ctl.bluetooth
time lz4c -c /tmp/512M-testfile | ssh -carcfour256 index-114 'lz4 -d > /tmp/512M-testfile'
real 0m1.374s
user 0m0.395s
sys 0m0.455s
time lzop -c /tmp/512M-testfile | ssh -carcfour256 index-114 'lzop -d > /tmp/512M-testfile'
real 0m2.176s
user 0m0.621s
@kshcherban
kshcherban / build_pydeb.sh
Last active December 28, 2015 13:53
Script to quickly build python-packages
#!/bin/bash
set -e -u
if [ $# -ne 1 ]; then
echo "Usage: $0 <packagename-version>"
exit 0
fi
PACKAGE="$(echo $1 | awk -F'-' '{$(NF--)=""; print}' | sed -e 's/\s/-/g;s/-$//')"
VERSION="$(echo $1 | awk -F'-' '{print $NF}')"
root@laptop:~# ~/Downloads/seeker /dev/sda
Seeker v2.0, 2007-01-15, http://www.linuxinsight.com/how_fast_is_your_disk.html
Benchmarking /dev/sda [171705MB], wait 30 seconds..............................
Results: 3121 seeks/second, 0.32 ms random access time
root@laptop:~# ~/Downloads/seeker /dev/sda
Seeker v2.0, 2007-01-15, http://www.linuxinsight.com/how_fast_is_your_disk.html
Benchmarking /dev/sda [171705MB], wait 30 seconds..............................
Results: 3294 seeks/second, 0.30 ms random access time