Skip to content

Instantly share code, notes, and snippets.

View martinrusev's full-sized avatar
🌱
01010110

Martin Rusev martinrusev

🌱
01010110
  • Berlin, Germany
View GitHub Profile
@martinrusev
martinrusev / requirements.txt
Last active August 29, 2015 14:26
Amon requirements
Django==1.7.8
django-annoying==0.7.9
django-timezone-field==1.0
docopt==0.4.0
html5lib==1.0b3
httplib2==0.8
pycrypto==2.6.1
python-dateutil==2.2
sqlparse==0.1.10
wsgiref==0.1.2
@martinrusev
martinrusev / update_amon_rpm.sh
Last active August 29, 2015 14:23
Update Amon requirements - RPM
#! /usr/bin/env bash
set -xe
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PACKAGE=amon
export AMON_DIR='/opt/amon'
export AMON_PYTHON_PATH='/usr/share/python'
echo -e "\033[33m\e[1m\n* Installing ${PACKAGE} dependencies \n\033[0m"
@martinrusev
martinrusev / docker_amonagent.sh
Last active August 29, 2015 14:22
Add amonagent to the Docker group
groupadd docker
usermod -a -G docker amonagent
@martinrusev
martinrusev / update_amon_deb.sh
Last active August 29, 2015 14:22
Update Amon Requirements
#! /usr/bin/env bash
set -xe
export DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export PACKAGE=amon
export AMON_DIR='/opt/amon'
export AMON_PYTHON_PATH='/usr/share/python'
echo -e "\033[33m\e[1m\n* Updating deb repository \n\033[0m"
sudo apt-get update > /dev/null
@martinrusev
martinrusev / sysbench-do-diskio
Created May 28, 2015 09:52
Scaleway vs DigitalOcean
Operations performed: 628590 Read, 419060 Write, 1340928 Other = 2388578 Total
Read 9.5915Gb Written 6.3943Gb Total transferred 15.986Gb (54.565Mb/sec)
3492.15 Requests/sec executed
Test execution summary:
total time: 300.0013s
total number of events: 1047650
total time taken by event execution: 282.4702
per-request statistics:
min: 0.07ms
@martinrusev
martinrusev / rails.sh
Last active November 15, 2018 10:50
Installing apps on ARM
# Source
# http://www.iconoclastlabs.com/blog/ruby-on-rails-on-the-raspberry-pi-b-with-rbenv
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6 libreadline6-dev zlib1g zlib1g-dev
sudo apt-get install -y openssl libreadline6-dev git-core zlib1g libssl-dev
@martinrusev
martinrusev / scaleway.com- fio
Last active August 29, 2015 14:21
Cloud Providers - Disk Performance
Jobs: 1 (f=1): [___w] [94.6% done] [0KB/14330KB/0KB /s] [0/3582/0 iops] [eta 00m:13s]
seq-read: (groupid=0, jobs=1): err= 0: pid=3942: Tue May 26 11:25:26 2015
read : io=1024.0MB, bw=19572KB/s, iops=4892, runt= 53576msec
slat (usec): min=24, max=300, avg=30.53, stdev= 2.01
clat (usec): min=366, max=59097, avg=778.07, stdev=463.74
lat (usec): min=429, max=59126, avg=810.40, stdev=463.67
clat percentiles (usec):
| 1.00th=[ 462], 5.00th=[ 502], 10.00th=[ 524], 20.00th=[ 588],
| 30.00th=[ 620], 40.00th=[ 668], 50.00th=[ 780], 60.00th=[ 884],
| 70.00th=[ 900], 80.00th=[ 924], 90.00th=[ 996], 95.00th=[ 1080],
@martinrusev
martinrusev / PagerDuty API
Last active August 29, 2015 14:20
Amon to Pagerduty
https://events.pagerduty.com/generic/2010-04-15/create_event.json
@martinrusev
martinrusev / apache.conf
Created April 24, 2015 08:45
Minimalistic Apache Config
ServerType standalone
HostnameLookups off
User www
Group www
PidFile /tmp/httpd.pid
ServerSignature Off
UseCanonicalName Off
Timeout 50
KeepAlive On
MaxKeepAliveRequests 40
@martinrusev
martinrusev / gist:2208c612d0c0b34d7d2b
Last active August 29, 2015 14:19
mysql_slow_queries
#my.cnf within [mysqld] / [mysqld_safe]
slow_query_log = 1
long_query_time = 3
log_output = TABLE
general-log
expire_logs_days = 1
http://www.rackspace.com/knowledge_center/article/access-slow-query-and-general-logs-for-cloud-databases