Skip to content

Instantly share code, notes, and snippets.

View nassor's full-sized avatar

Nassor Paulino da Silva nassor

View GitHub Profile
@chriswhitcombe
chriswhitcombe / main.go
Last active August 14, 2020 04:38
Implementing a graceful shutdown of http that is docker compatible
package main
import (
"fmt"
"io"
"net/http"
"os"
"os/signal"
"syscall"
"time"
package xpto
import (
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"strings"
"testing"
@jnx
jnx / rbenv-install-system-wide.sh
Created October 1, 2011 20:09
rbenv install and system wide install on Ubuntu 10.04 LTS.
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path: