Skip to content

Instantly share code, notes, and snippets.

In Case of Fire: git commit, git push, then leave the building

Guillermo Céspedes Tabárez dertin

  • Uruguay
Block or report user

Report or block dertin

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
dertin /
Last active Apr 4, 2019
Setup git deploy for AWS ec2 Ubuntu instance
# Usage:
# bash /var/www/webdisk/ example my_bucket backup default
# Arguments:
readonly BACKUP_NAME=$2
readonly S3_BUCKET_NAME=$3
dertin / Virtual Box Host Only Static
Created Oct 13, 2018 — forked from pjdietz/Virtual Box Host Only Static
VirtualBox Host-Only Adapter with Static IP
View Virtual Box Host Only Static

VirtualBox Host-Only Static IP

My typical setup for a development box in VirtualBox uses two NICs. The first uses NAT to allow the box to communicate with the outside world through my host computer’s network connection. (NAT is the default, so shouldn't require any setup.) The second is a "host-only" connection that allows my host and guest to interact.

To create a host-only connection in VirtualBox, start by opening the preferences in VirtualBox. Go to the "Network" tab, and addd a Host-only Network. Modify the host-only network, and disable DHCP. Make a note of the IP address. (Feel free to set the IP address as well, if you like.)

Next, assign this host-only adapter to the virtual machine. Select the VM and press "Settings". Go to the "Network" tab, and select "Adpater 2". Enable the adapter, set it to a "Host-only Adapter", and select the adpater you created above.


dertin /
Last active Oct 14, 2018 — forked from xterat/
Hadoop 3.1 on Debian 9.5

INSTALL Hadoop 3.1 on Debian 9.5

  1. Install some dependencies:
   su -
   apt -y install build-essential autoconf automake libtool cmake zlib1g-dev pkg-config libssl-dev libsasl2-dev \
   libsnappy-dev bzip2 libbz2-dev libjansson-dev fuse libfuse-dev zstd \
   clang libc6-dev libtool libzip-dev libncurses-dev liblzo2-dev  \
   software-properties-common dirmngr python python-dev python-setuptools \
dertin / fstab
Last active Dec 13, 2018
AWS EC2 t2.micro / t2.small
View fstab
# /etc/fstab
UUID=XXXXXXXXXXX / ext4 noatime,nodelalloc,barrier=0,i_version,commit=30,inode_readahead_blks=64,rw,errors=remount-ro 0 1
dertin /
Last active Apr 19, 2018
Create swap file on AWS EC2 t2.micro 1gb
sudo dd if=/dev/zero of=/swap bs=1M count=1024
sudo mkswap /swap
sudo chmod 600 /swap
sudo swapon /swap
sudo cp -iv /etc/fstab{,-$(date '+%y%m%d%H%M%S').bak}
sudo nano /etc/fstab
# add line
dertin /
Created Apr 13, 2018
Upload the code from a local project to an EC2 instance in Amazon AWS
# Upload the code from a local project to an EC2 instance in Amazon AWS
# It will be necessary to adapt the script to the needs and requirements of your project
# Use at your own risk
# Configuration
readonly DEPLOY_NAME=DeployTesting
readonly DEPLOY_SOURCE=~/Projects/testing
readonly KEY_PAIRS=~/.ssh/keypairs.pem
dertin / default
Created Mar 27, 2018 — forked from dtomasi/default
Brew Nginx PHP7
View default
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
dertin / xorg.conf
Last active Mar 4, 2018
Olidata 20" w2009s - GTX 560 - xUbuntu
View xorg.conf
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Section "Files"
dertin / compressAndBase64Encode.cpp
Last active Dec 28, 2017
Compress and Encode with Base64 to a DLL
View compressAndBase64Encode.cpp
#include "stdafx.h"
#pragma comment(lib, "ws2_32")
#pragma comment(lib, "crypt32.lib")
#pragma comment(lib, "Cabinet.lib")
#include <Windows.h>
#include <string>
#include <compressapi.h>
#include <wincrypt.h>
You can’t perform that action at this time.