Skip to content

Instantly share code, notes, and snippets.

View jalvarezsamayoa's full-sized avatar

Javier Alvarez jalvarezsamayoa

View GitHub Profile
@jalvarezsamayoa
jalvarezsamayoa / mesa.json
Created June 25, 2019 18:07
Ejemplo data denormalizada para una una mesa de votacion Elecciones 2019 Guatemala
{
"mesa": 1,
"departamento": 0,
"municipio": 1,
"actas": {
"corporaciones_municipales": {
"tipo_eleccion": 4,
"estado_acta": 2,
"cantidad_papeletas": 286,
"votos": {
@jalvarezsamayoa
jalvarezsamayoa / bump_module_version.sh
Created October 2, 2015 13:15
Bump puppet module version with git-flow plugin
# add this fuction to your .bashrc or .zshrc
# REQUIRES:
# * git
# * git flow plugin (https://github.com/nvie/gitflow)
# bump_module_version
# This function will:
# 1. calculate your next patch version
# 2. open a release branch
@jalvarezsamayoa
jalvarezsamayoa / .jshintrc
Created July 16, 2015 15:27
JsHint Project Config
{
"globals": {
"console": false,
"jQuery": false,
"_": false,
"describe": false,
"it": false,
"before": false,
"beforeEach": false,
"after": false,
# I build my image with the latest tag
docker build –t myapp:latest .
# get the image's id
export latest=“$(docker images | grep myapp:latest | head –n 1 | awk ‘{print $3}’)”
# now here comes the cool part, generate a tag for the image related to the current state of the repo
docker tag $latest “$(git rev-parse –q HEAD)” # sha of the commit
docker tag $latest “$(git describe —always —dirty —tags)” # tag
docker tag $latest “$(git rev-parse –q —abbrev-ref HEAD)” #branch
@jalvarezsamayoa
jalvarezsamayoa / Xoom Guatemala - Tech Devops
Created August 7, 2014 14:02
Xoom Guatemala - Tech Devops Position Available
Xoom Corporation (Nasdaq: XOOM), one of the fastest growing digital money transfer companies in the world is revolutionizing the international money transfer market by providing people with an easy, convenient and cost-effective means of sending money worldwide. We offer a secure, fast and inexpensive means of sending money from our website to both online and offline recipients in over 30 countries around the world. We are looking for talented Dev-ops engineers to help us strengthen our world-class business.
In this role, you will be responsible for helping shape the future of mission critical systems. You will be collaborating closely with engineering, operations and technology groups to define and maintain our production infrastructure.
Qualifications:
• 5+ years of administrative proficiency on Unix systems is a must
• Constant desire to automate
• Expert in at least one major scripting language
• Experience maintaining noSQL solutions e.g. MongoDB, Cassandra, Elastic Search, Neo4J, Redis is a must
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
aptitude -y purge ri
aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide
aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30
aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5
@jalvarezsamayoa
jalvarezsamayoa / tomorrow-night.sh
Created October 22, 2013 13:01
Tomorrow night color scheme from Gnome Terminal
#!/usr/bin/env sh
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/palette "#000000000000:#919122222626:#777789890000:#AEAE7B7B0000:#1D1D25259494:#68682a2a9b9b:#2B2B66665151:#929295959393:#666666666666:#CCCC66666666:#B5B5BDBD6868:#F0F0C6C67474:#8181A2A2BEBE:#B2B29494BBBB:#8A8ABEBEB7B7:#ECECEBEBECEC"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/background_color "#1d1d1f1f2121"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/foreground_color "#c5c5c8c8c6c6"
gconftool-2 -s -t string /apps/gnome-terminal/profiles/Default/bold_color "#8A8ABEBEB7B7"
gconftool-2 -s -t bool /apps/gnome-terminal/profiles/Default/bold_color_same_as_fg "false"
gconftool-2 -s -t bool /apps/gnome-terminal/profiles/Default/use_theme_colors "false"
gconftool-2 -s -t bool /apps/gnome-terminal/profiles/Default/use_theme_background "false"
@jalvarezsamayoa
jalvarezsamayoa / tomorrow.sh
Created October 22, 2013 12:46
Tomorrow color scheme for gnome terminal
#!/usr/bin/env bash
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME=Tomorrow
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG=Tomorrow
[[ -z "$DCONF" ]] && DCONF=dconf
[[ -z "$UUIDGEN" ]] && UUIDGEN=uuidgen
dset() {
local key="$1"; shift
local val="$1"; shift
@jalvarezsamayoa
jalvarezsamayoa / setup_ubuntu_rails_puppet.sh
Last active December 20, 2015 02:49
Install and configure ubuntu 12.04 precise pangolin with Puppet
sudo apt-get update
sudo apt-get upgrade
wget http://apt.puppetlabs.com/puppetlabs-release-precise.deb
sudo dpkg -i puppetlabs-release-precise.deb
sudo apt-get update
sudo apt-get install puppet
puppet module install puppetlabs/stdlib
@jalvarezsamayoa
jalvarezsamayoa / openwolf_setup.sh
Created June 10, 2013 04:36
Configurar Instancia de Centos 6.3 para Sistema OpenWolf v.1.0
yum -y update
yum -y install emacs readline-devel ncurses-devel libevent-devel glib2-devel libjpeg-devel freetype-devel bzip2 bzip2-devel bzip2-libs openssl-devel pcre pcre-devel gpg make gcc yum-utils unzip g++ automke autoconf curl-devel zlib-devel httpd-devel apr-devel apr-util-devel sqlite-devel
yum grouplist |grep -i Development
rpm -ihv http://centos.alt.ru/repository/centos/6/x86_64/centalt-release-6-1.noarch.rpm
rpm -Uvh http://mirrors.ukfast.co.uk/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm