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
View kubernetes.md

Kubernetes

Guía de uso sencilla para gente que está empezando.

Pods

Obtener la lista de pods

$ kubectl -n CLUSTER get pods
@javierav
javierav / json-to-csv.rb
Created Apr 4, 2018
Convert JSON translations strings into an awesome CSV document
View json-to-csv.rb
require 'json'
require 'csv'
class Key
attr_reader :file, :key, :translations
def initialize(file, key)
@file = file
@key = key
@translations = {}
@javierav
javierav / kernel.sh
Created Mar 5, 2018
How to install latest kernel in Ubuntu
View kernel.sh
sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get update && sudo apt-get install ukuu
sudo ukuu --install-latest
View system-backup.sh
#!/usr/bin/env bash
#
## Este script ejecuta un backup del sistema en Amazon S3
#
export AWS_ACCESS_KEY_ID=""
export AWS_SECRET_ACCESS_KEY=""
export AWS_BACKUP_NAME="example-bucket"
@javierav
javierav / sync.sh
Created Nov 22, 2017
IMAP email migrating with Docker and ImapSync
View sync.sh
#!/usr/bin/env bash
EMAIL="john.doe@example.org"
FROM_PASSWD="foobarfoo"
TO_PASSWD="foobarbaz"
DOCKER_IMAGE_NAME="${EMAIL/@/-}"
DOCKER_CONTAINER=$(docker run -d --name "$DOCKER_IMAGE_NAME" gilleslamiral/imapsync imapsync \
--host1 X.X.X.X --user1 "$EMAIL" --password1 "$FROM_PASSWD" \
View attribute_lazy_loaded.rb
# El atributo manifest se evalua la primera vez que se pide y se cachea su resultado
class A
def manifest
if !@manifest.is_a?(Sprockets::Manifest) && @manifest.respond_to?(:call)
@manifest = @manifest.call
else
@manifest
end
end
attr_writer :manifest
View atom-cheatsheet.md

Atom Cheatsheet

Git Blame

Acción Linux Mac
Toggle Ctrl + b

Terminal Plus

@javierav
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
end
end
@javierav
javierav / invisible.rb
Created Dec 2, 2014
Ruby Secret Santa
View invisible.rb
# 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' },
View bash-tips.md

Bash Tips

text replace in some files

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

You can’t perform that action at this time.