Skip to content

Instantly share code, notes, and snippets.

View slok's full-sized avatar
⚙️
Building reliable solutions

Xabier Larrakoetxea Gallego slok

⚙️
Building reliable solutions
View GitHub Profile
@slok
slok / gist:ef8b1297a0dccd0be7e5
Created December 9, 2014 21:57
docker ansible issue
https://github.com/ansible/ansible/issues/9648
python ./test-module -I "ansible_python_interpreter=/home/slok/.virtualenvs/ansible_test/bin/python" -m ../lib/ansible/modules/core/cloud/docker/docker.py -a "image=\"ubuntu\" ports=\"5000\" name=\"hoooool1\""
http://www.regexr.com/3a1vd
Habéis sido varios los que habéis pedido la receta:
En primer lugar aclarar que no las he hecho yo, solo he supervisado y aprendido a hacerlas, el merito para mi novia.
Aquí va la original. Luego pongo los cambios que ha metido para esta:
Ingredientes:
150 gr. de azúcar
2 huevos
@slok
slok / keybase.md
Created August 14, 2014 12:31
keybase.md

Keybase proof

I hereby claim:

  • I am slok on github.
  • I am slok (https://keybase.io/slok) on keybase.
  • I have a public key whose fingerprint is 2443 AC61 D9BC B985 E943 2944 3C43 C30E 61FC 98FE

To claim this, I am signing this object:

@slok
slok / docker_tips.md
Last active June 18, 2017 17:16
Docker shortcuts

Stop all the containers:

docker stop `docker ps -q`

Remove all the containers:

docker rm `docker ps -aq`

Delete all unnamed/untagged images:

@slok
slok / Vagrantfile
Last active August 29, 2015 14:04
TB devbox vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
######################### EDIT AFTER THIS LINE #################################
projects_folder = "/home/slok/projects"
###################### DO NOT EDIT AFTER THIS LINE #############################
VAGRANTFILE_API_VERSION = "2"
ENV['VAGRANT_DEFAULT_PROVIDER'] ||= 'docker'
@slok
slok / shell_colors.sh
Last active August 29, 2015 14:02
Shell colors
# Normal Colors
BLACK='\e[0;30m' # Black
RED='\e[0;31m' # Red
GREEN='\e[0;32m' # Green
YELLOW='\e[0;33m' # Yellow
BLUE='\e[0;34m' # Blue
PURPLE='\e[0;35m' # Purple
CYAN='\e[0;36m' # Cyan
WHITE='\e[0;37m' # White
@slok
slok / devops_course.sh
Last active December 28, 2017 06:33
devops course dependencies
#!/bin/bash
echo -e "\e[1;33mAdd multiverse repo\e[0m"
sudo add-apt-repository multiverse
sudo apt-get update
echo -e "\e[1;33mInstall common dependencies\e[0m"
sudo apt-get install python python-pip python-dev git ruby ruby-dev build-essential
echo -e "\e[1;33mInstall virtualbox\e[0m"
#!/bin/bash
ACTUAL_PATH=$1
FILES=$ACTUAL_PATH/svg/*.svg
DPI=118
mkdir $ACTUAL_PATH/wmf
mkdir $ACTUAL_PATH/svg2
for f in $FILES
#!/bin/bash
CMD="python /opt/sageDispenser/queueworkers/rund.py worker"
if [ `ps aux |grep worker\ [p]ayments |wc -l` -lt 1 ]
then
$CMD payments
fi
if [ `ps aux |grep worker\ [u]sers |wc -l` -lt 1 ]

Main installation

Install Pyenv

$ git clone git://github.com/yyuu/pyenv.git .pyenv

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile