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 / Gruntfile.js
Created June 4, 2014 09:18
Example grunt file
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
compass: {
dist: {
options: {
sassDir: 'static/sass',
cssDir: 'static/css'
}
}
@martinrusev
martinrusev / select2_angular.js
Created June 9, 2014 10:39
Select2/Angular Integration
"use strict";
var el;
var underscore = angular.module('underscore', []);
underscore.factory('_', function() {
return window._;
});
var app = angular.module('DashboardApp', ['underscore'])
.controller('DashboardCtrl', function($scope){
$scope.AddMetric = function(name) {
@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 / 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": {