Skip to content

Instantly share code, notes, and snippets.

View josellausas's full-sized avatar
🏠
Working from home

Jose josellausas

🏠
Working from home
View GitHub Profile
@josellausas
josellausas / install_openvpn.sh
Created May 23, 2017 05:53
Install VPN on raspberry pi
sudo apt-get install openvpn
# Copy over the .tar.gz with the config files
sudo mv $$$$_linux.tar.gz /etc/openvpn
cd /etc/openvpn
sudo tar -xf $$$$_linux.tar.gz
# Enable up/down
sudo chmod +x /etc/openvpn/update-resolv-conf
# Use this to start:
@josellausas
josellausas / install_ruby_rpi.sh
Created May 23, 2017 05:40 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.4 on the Raspberry Pi (Raspbian)
#!/bin/bash
# --------------------------------------------------------------------------------------------
# Installs Ruby 2.4 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s https://gist.githubusercontent.com/blacktm/8302741/raw/install_ruby_rpi.sh)
# --------------------------------------------------------------------------------------------
# Welcome message
@josellausas
josellausas / restart_postgres.sh
Created May 18, 2017 18:01
Restart postgresql
sudo service postgresql restart
@josellausas
josellausas / clean_docker.sh
Created May 15, 2017 14:06
Cleans docker stale obects.
#!/usr/bin/env bash
# Remove dangling images
docker rmi $(docker images -f dangling=true -q)
# Remove all exited containers
docker rm $(docker ps -a -f status=exited -q)
# Remove dangling volumes
docker volume rm $(docker volume ls -f dangling=true -q)
@josellausas
josellausas / exists.bash
Created May 7, 2017 01:32
Checks if a command exists in bash
exists()
{
command -v "$1" >/dev/null 2>&1
}
if exists figlet; then
figlet "Hello"
else
echo ''
echo '----------------'
@josellausas
josellausas / install_lapis.sh
Created April 17, 2017 03:20
Install Lapis on Raspberry Pi 3
#!/usr/bin/env bash
# This installs Leafo's Lapis (http://leafo.net/lapis/) on Raspberry Pi 3
sudo apt-get update &&\
sudo apt-get upgrade &&\
sudo apt-get install nginx postgresql lua luajit libpq-dev &&\
sudo apt-get install libpcre3 libpcre3-dev libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential curl &&\
sudo apt-get update &&\
# Install Openresty
mkdir openresty &&\
cd openresty &&\
@josellausas
josellausas / ElasticSearchFix.sh
Created December 13, 2016 18:30
Script to fix Elastic search
clear
echo ""
echo "------------------"
echo "Elastic Search Fix"
echo "------------------"
echo ""
echo "[*] Creating Directory ..."
sudo mkdir /var/run/elasticsearch
echo ""
echo "[*] Chowning Directory ..."
@josellausas
josellausas / Testing environment with Tmuxinator.md
Last active November 14, 2016 20:06
Instructions for setting up a testing environment with Tmuxinator

Tmuxinator test environment

  1. Install things

Install tmux and tmuxinator (I used brew and gem install tmuxinator)

  1. Create a new tmuxinator project

@josellausas
josellausas / ContractKillerEspañol.md
Created June 16, 2016 18:33
Contract Killer en Español

Fecha: [fecha]

Entre nosotros [nuestra empresa] y ustedes [nombre del cliente]

Compromiso:

Nuestro compromiso es hacer siempre lo mejor para satisfacer las necesidades y cubrir las expectativas de nuestros clientes, y es importante que ambas partes tengamos las cosas claras y por escrito de manera que todos entendamos qué es qué, quién debe hacer qué, cuándo debe hacerlo, y qué va a pasar si algo no sale como se planeó. Este convenio es muy sencillo y no encontrarán en él complicados términos legales o largos párrafos difíciles de entender. Buscamos lo mejor para ambas partes, ahora y en el futuro.

Antecedentes:

#!/bin/sh
# kills Simulator if running, then erases all simulator data
killall "Simulator"; xcrun simctl erase all
echo "Done cleaning simulator"