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 / 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 / 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
@albertohm
albertohm / startup
Created September 19, 2013 23:35
Fluxbox startup
#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.
# Change your keymap:
xmodmap "/home/alberto/.Xmodmap"
# Applications you want to run with fluxbox.
@albertohm
albertohm / README.md
Created November 4, 2013 22:41 — forked from ayosec/README.md

Xvnc

The scripts in this gist will start an Xvnc server with a basic window manager (IceWM). This is intended to use in a virtual machine, where we can need to start a browser to run a test suite.

Installation on Debian

All commands have to be run as root

apt-get install icewm vnc4server
@albertohm
albertohm / gist:8014984
Created December 17, 2013 23:50
Heroku
git remote add heroku git@heroku.com:project.git
git push heroku <branch>:master
@albertohm
albertohm / knockout.haml
Created December 16, 2013 11:20
knockout debugging
%pre{"data-bind" => "text: ko.toJSON($data, null, 2)"}
@albertohm
albertohm / asound.conf
Created December 2, 2013 12:07
Max sound on pulseaudio. Copy on /etc/asound.conf
pcm.!default {
type plug
slave.pcm "softvol"
}
pcm.softvol {
type softvol
slave {
pcm "dmix"
}
<!DOCTYPE html>
<html>
<head>
<link type='text/css' rel='stylesheet' href='style.css'/>
<title>Hello, World!</title>
</head>
<body>
<?php
@albertohm
albertohm / gist:7290725
Created November 3, 2013 14:18
knockout.js debugging
%pre{"data-bind" => "text: JSON.stringify(ko.toJS($data), null, 2)"}

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: