Skip to content

Instantly share code, notes, and snippets.

View albertohm's full-sized avatar

Alberto Hernández Mateos albertohm

View GitHub Profile
@albertohm
albertohm / graphite.md
Last active February 4, 2019 23:59
Install and configure graphite on ubuntu

Install python-pip

sudo apt-get install python-pip libcairo2 python-cairo

Install Graphite and Dependencies

pip install carbon
pip install whisper
pip install django
pip install django-tagging
pip install graphite-web

Create the container using LVM

You can use lxc-create to create and initialize a new lvm partition

lxc-create -n <name> -t ubuntu -B lvm --lvname <name> --vgname <vgname> --fssize 5GB

Mount the container

Create a directory mkdir /media/volumes/ and edit the /etc/fstab by adding:

site :opscode
cookbook 'mongodb'
cookbook 'apt'
cookbook 'sudo'
cookbook 'conf'
cookbook 'tmux'
cookbook 'git'
cookbook 'haproxy'
cookbook 'java'
@albertohm
albertohm / movies.yml
Created November 9, 2012 17:24
flexget
presets:
global:
# Se asegura que haya al menos 10 gigas disponibles antes de ponerse a descargar.
free_space:
path: /Media
space: 10000
regexp:
reject:
- sub[s][\s\._]: {from: title} # Bloquea todos los torrent que contengan la palabra sub(s) (subtitulos=
@albertohm
albertohm / crap.sh
Created October 23, 2012 18:55
Add torrent magnets to transmission-qt on debian
Modify or create /usr/share/kde4/services/magnet.protocol like this:
exec=transmission "%U"
protocol=magnet
input=none
output=none
helper=true
listing=false
reading=false
writing=false
@albertohm
albertohm / tabularize
Created September 24, 2012 14:58
New ruby syntax tabularize
:'<,'>Tabularize /:/r0r1l1
@albertohm
albertohm / knife-solo
Created September 12, 2012 23:07
knife-solo
gem install knife-solo
knife prepare user@host
knife cook user@host
@albertohm
albertohm / notes.sh
Created September 11, 2012 23:26
lxc debian on arch
lxc-create -n debian -B lvm --lvname debian --vgname vg0 --fssize 4GB
sudo debootstrap wheezy /media/containers/debian http://ftp.us.debian.org/debian
--no-check-gpg
# Start the Xvnc server whatever happens
( ( nc -z -w 1 localhost 5900 || Xvnc4 -geometry 1680x1080 -SecurityTypes None) & ) &>> /tmp/xvnc4.log
export DISPLAY=:0
@albertohm
albertohm / gist:2763071
Created May 21, 2012 16:12
Tests from VNC
vncserver :1
export DISPLAY=:1
Para verlo: vnc :1