Skip to content

Instantly share code, notes, and snippets.

Javier Aranda javierav

Block or report user

Report or block javierav

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
javierav /
Last active Aug 29, 2015
collection of useful NPM packages

Useful NPM packages


  • utils-merge: Merges the properties from a source object into a destination object.
  • wildcard: Apply a wildcard search in string, arrays or objects.
#!/usr/bin/env bash
bundle exec rspec
set +e
# integration
if [ -e rerun.txt ]; then
rm -f rerun.txt
javierav / Gemfile
Created Sep 13, 2014
compare two directories using a sha-256 hash digest
View Gemfile
source ''
gem 'sequel'
gem 'sqlite3'

Create a root CA certificate

To begin with, you need to generate the root CA key (this is what signs all issued certs):

openssl genrsa -out rootCA.key 2048

Generate the self-signed (with the key previously generated) root CA certificate:


Vim Tips

search and replace


reset search results


remove endline blank spaces



Bash Tips

text replace in some files

grep -rl "windows" . | xargs sed -i "s/windows/linux/g"

javierav / invisible.rb
Created Dec 2, 2014
Ruby Secret Santa
View invisible.rb
# Ruby Secret Santa
# Javier Aranda <>
# MIT license
# friends list
@friends = [
{ name: 'Jesús Taguas', alias: 'jtaguas' },
{ name: 'Rafa García', alias: 'rgarcia' },
{ name: 'Jesús González', alias: 'jgonzalez' },
{ name: 'Paco Hidalgo', alias: 'fhidalgo' },
javierav / calc.rb
Last active Aug 29, 2015
Calculadora Curso de Git
View calc.rb
class Calc
def initialize(a, b)
@a = a
@b = b
javierav / removedir.php
Created Apr 7, 2012
Script PHP para borrar de forma recursiva un directorio
View removedir.php
* this function removes a directory and its contents.
* use with careful, no undo!
function rmdir_recursive($dir) {
$files = scandir($dir);
array_shift($files); // remove '.' from array
array_shift($files); // remove '..' from array
javierav / Assetfile.rb
Created Jan 6, 2013
Development with Rake Pipeline and Guard
View Assetfile.rb
# vim: filetype=ruby
require 'rake-pipeline-web-filters'
require 'rake-pipeline-i18n-filters'
class Minispade < Rake::Pipeline::Web::Filters::MinispadeFilter
def initialize(options = {})
@sourceURL = options[:source_url]
You can’t perform that action at this time.