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 / install.pip.sh
Last active August 29, 2015 14:02
Install Pip
curl https://bootstrap.pypa.io/get-pip.py | sudo python
@martinrusev
martinrusev / iops.sh
Created July 21, 2014 12:38
Test IOPS
iozone -l 32 -O -i 0 -i 1 -i 2 -e -+n -r 4K -s 4G
@martinrusev
martinrusev / current_line.py
Created July 25, 2014 17:16
Print current file/line in python
from inspect import currentframe, getframeinfo;frameinfo = getframeinfo(currentframe());print frameinfo.filename, frameinfo.lineno
@martinrusev
martinrusev / Dockerfile
Created August 1, 2014 12:19
Install mongo plugin
FROM mongo:latest
MAINTAINER Martin Rusev
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv AD53961F
RUN echo 'deb http://bg.archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list && \
echo 'deb http://bg.archive.ubuntu.com/ubuntu precise-updates universe' >> /etc/apt/sources.list
RUN echo 'deb http://packages.amon.cx/repo amon contrib' >> /etc/apt/sources.list
### Keybase proof
I hereby claim:
* I am martinrusev on github.
* I am martinrusev (https://keybase.io/martinrusev) on keybase.
* I have a public key whose fingerprint is E353 444E 05E5 E1C3 13D1 0AE1 D455 88EF 9307 989E
To claim this, I am signing this object:
@martinrusev
martinrusev / debian_6_squeeze.sh
Last active July 20, 2018 19:15
Ansible install on Debian
echo 'deb http://http.debian.net/debian-backports squeeze-backports(-sloppy) main' > /etc/apt/sources.list.d/backports.list
apt-get update
apt-get -t squeeze-backports install "ansible"
@martinrusev
martinrusev / agent_beta.sh
Last active August 29, 2015 14:07
Install amonagent beta
sudo sh -c "echo 'deb http://beta.packages.amon.cx/repo amon contrib' > /etc/apt/sources.list.d/amonagent.list"
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv AD53961F
sudo apt-get install -y --force-yes python-software-properties software-properties-common
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update
sudo apt-get install -y --force-yes amon-agent ansible
@martinrusev
martinrusev / remove_docker_images.sh
Last active August 29, 2015 14:08
Remove untagged Docker images
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
@martinrusev
martinrusev / facts.json
Created November 8, 2014 13:32
Ansible Facts
"ansible_all_ipv4_addresses": [
"REDACTED IP ADDRESS"
],
"ansible_all_ipv6_addresses": [
"REDACTED IPV6 ADDRESS"
],
"ansible_architecture": "x86_64",
"ansible_bios_date": "09/20/2012",
"ansible_bios_version": "6.00",
"ansible_cmdline": {
ID=$(docker run -d image-name /bin/bash)
docker export $ID | docker import – flat-image-name