Skip to content

Instantly share code, notes, and snippets.

View elmendalerenda's full-sized avatar

Miguel Ángel Fernández elmendalerenda

View GitHub Profile
@elmendalerenda
elmendalerenda / gist:4348427
Created December 20, 2012 20:48
run cucumber in a environment without gui
sudo apt-get install xvfb
sudo apt-get install firefox
xvfb-run cucumber

Setup

git clone <repo>

clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS

Add colors to your ~/.gitconfig file:

@elmendalerenda
elmendalerenda / install-modern-ie
Last active December 14, 2015 13:09
install modern ie in ubuntu
1. install virtualbox from oracle repo: https://www.virtualbox.org/wiki/Linux_Downloads (disable source repo)
2. install linux-headers-generic package
3. instal p7zip-full package
4. download image from http://www.modern.ie/en-us/virtualization-tools
5. 7z e <zipfile>
6. import image from virtualbox
@elmendalerenda
elmendalerenda / gist:5691347
Created June 1, 2013 18:49
Search Dublin apartments in Luas green line
//do to http://www.daft.ie/lettings/ and run:
function selectOption(selector, optionsToSelect){
var items = document.querySelectorAll(selector + ' > option');
for (var item of items) {
for(var i = 0; i < optionsToSelect.length; i++){
if(item.text.match(optionsToSelect[i]) ){
item.selected = true;
console.log(item.text);
}
@elmendalerenda
elmendalerenda / links
Last active August 29, 2015 13:56
links
@elmendalerenda
elmendalerenda / coin_change.rb
Created February 12, 2014 14:33
coin change
def coin_change(amount, denominations, partial_acc = [], acc = [])
denominations.each { |e|
acc.push(partial_acc.sort) if amount == 0
if amount - e >= 0
immutable_partial_acc = partial_acc.dup.push(e)
coin_change(amount - e, denominations, immutable_partial_acc, acc)
end
}
return acc.uniq
end
@elmendalerenda
elmendalerenda / gist:9682905
Created March 21, 2014 09:50
misc settings
#.bashrc
alias ber='bundle exec rspec'
alias be='bundle exec'
export TERM=xterm-256color
--type-add=css=.sass,.less,.scss
--type-add=ruby=.rake,.rsel,.builder,.thor
--type-add=html=.haml,.html.erb,.html.haml
--type-add=js=.js.erb,.coffee
--type-set=cucumber=.feature
--type-set=c=.c,.cpp,.ino,.pde,.h
--ignore-dir=vendor
--ignore-dir=log
--ignore-dir=tmp
--ignore-dir=doc
@elmendalerenda
elmendalerenda / enc.sh
Created April 27, 2014 10:12
pgp encryption in dropbox
#decrypt
gpg -o ./Desktop/personal.tgz -d ./Dropbox/personal.tgz.gpg && cd ./Desktop/ && tar xvzf personal.tgz && rm personal.tgz && cd ..
#encrypt
cd ./Desktop/ && tar cvzf - personal/ | gpg -esr $PGP_RECIPIENT > ../Dropbox/personal.tgz.gpg
set encoding=utf-8
set nocompatible " Must come first because it changes other options.
syntax enable " Turn on syntax highlighting.
set tabstop=2 " Global tab width.
set shiftwidth=2 " And again, related.
set expandtab " Use spaces instead of tabs
set softtabstop=2 " Makes the spaces feel like real tabs