Skip to content

Instantly share code, notes, and snippets.

View javierav's full-sized avatar
😎

Javier Aranda javierav

😎
View GitHub Profile
@javierav
javierav / useful-npm-packages.md
Last active August 29, 2015 14:06
collection of useful NPM packages

Useful NPM packages

Tools

  • 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
fi
@javierav
javierav / Gemfile
Created September 13, 2014 22:36
compare two directories using a sha-256 hash digest
source 'https://rubygems.org'
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:

@javierav
javierav / vim-tips.md
Created October 15, 2014 07:33
vim tips

Vim Tips

search and replace

:%s/search/replace/g

reset search results

:noh

remove endline blank spaces

:%s/\s\+$/

@javierav
javierav / bash-tips.md
Created October 15, 2014 07:34
bash tips

Bash Tips

text replace in some files

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

@javierav
javierav / invisible.rb
Created December 2, 2014 15:27
Ruby Secret Santa
# Ruby Secret Santa
# Javier Aranda <jaranda@nosolosoftware.es>
# 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
javierav / calc.rb
Last active August 29, 2015 14:14
Calculadora Curso de Git
class Calc
def initialize(a, b)
@a = a
@b = b
end
end
@javierav
javierav / Assetfile.rb
Created January 6, 2013 23:05
Development with Rake Pipeline and Guard
# vim: filetype=ruby
require 'rake-pipeline-web-filters'
require 'rake-pipeline-i18n-filters'
class Minispade < Rake::Pipeline::Web::Filters::MinispadeFilter
def initialize(options = {})
super
@sourceURL = options[:source_url]
end
@javierav
javierav / atom-cheatsheet.md
Last active June 14, 2016 20:24
Atom cheatsheet

Atom Cheatsheet

Git Blame

Acción Linux Mac
Toggle Ctrl + b

Terminal Plus