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 / hola_mundo.rb
Created February 16, 2012 13:41
Hola mundo
puts "Hola mundo"
@albertohm
albertohm / bad_thing
Created February 20, 2012 13:14
Git Grayskull power
git rev-parse 304439d > .git/refs/heads/master
git checkout master
git push -f origin
@albertohm
albertohm / launch_xbmc.sh
Created March 3, 2012 01:13
Launch XBMC adjusting screen
#! /bin/bash
STATUS=0
WINCLASS=xbmc.bin.xbmc.bin
DISPLAY=:0.0
SLEEPDELAY=1
/usr/bin/xbmc "$@" &
while [ $STATUS -eq 0 ]
@albertohm
albertohm / update_xbmc_library.sh
Created March 3, 2012 01:14
Update XBMC library
curl --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.ScanForContent", "id": "mybash"}' -H 'content-type: application/json;' http://localhost:8080/jsonrpc
@albertohm
albertohm / .vimrc
Created March 14, 2012 10:05
My .vimrc
""PATHOGEN ------------------------------------
"call pathogen#runtime_append_all_bundles()
"call pathogen#helptags()
"filetype off " required!
"VUNDLE --------------------------------------
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" let Vundle manage Vundle
@albertohm
albertohm / gist:2763071
Created May 21, 2012 16:12
Tests from VNC
vncserver :1
export DISPLAY=:1
Para verlo: vnc :1
# 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 / 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
@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 / tabularize
Created September 24, 2012 14:58
New ruby syntax tabularize
:'<,'>Tabularize /:/r0r1l1