This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Default settings for /etc/init.d/sysstat, /etc/cron.d/sysstat | |
# and /etc/cron.daily/sysstat files | |
# | |
# Should sadc collect system activity informations? Valid values | |
# are "true" and "false". Please do not put other values, they | |
# will be overwritten by debconf! | |
ENABLED="true" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The first element of the path is a directory where the debian-sa1 | |
# script is located | |
PATH=/usr/lib/sysstat:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin | |
# Activity reports every 2 minutes everyday | |
*/2 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1 | |
# Additional run at 23:59 to rotate the statistics file | |
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Verify Git is installed: | |
if [ ! $(which git) ]; then | |
echo "Git is not installed, can't continue." | |
exit 1 | |
fi | |
if [ -z "${RBENV_ROOT}" ]; then | |
RBENV_ROOT="$HOME/.rbenv" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "sudo apt-get update\n" | |
sudo apt-get update | |
echo "curl -sSL https://get.docker.com/ | sh\n" | |
curl -sSL https://get.docker.com/ | sh | |
sudo usermod -aG docker $(whoami) | |
echo "sudo service docker stop\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "==================UPDATE\n" | |
sudo apt-get update | |
echo "==================INSTALL DOCKER\n" | |
curl -sSL https://get.docker.com/ | sh | |
sudo usermod -aG docker $(whoami) | |
echo "==================INSTALL LIBS\n" | |
sudo apt-get install -y python-pip python-dev build-essential | |
echo "==================INSTALL PIP\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trap 'excode=$?; cleanup; echo $excode; exit' EXIT HUP INT QUIT PIPE TERM | |
cleanup() { | |
# TODO: kill web | |
echo "inside cleanup for $1" | |
deregister_service | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
deregister_service() { | |
export CONTAINER_ID=$(cat /proc/self/cgroup | grep "pids:/" | sed 's/\([0-9]\):pids:\/docker\///g') | |
echo "\nDeregistering $CONTAINER_ID with consul server $CONSUL_SERVER\n" | |
curl -XPUT "$CONSUL_SERVER/v1/agent/service/deregister/$CONTAINER_ID" | |
} | |
main() { | |
deregister_service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'INSTALL NEEDED LIBS FOR THE OS' | |
sudo apt-get update | |
sudo apt-get install -y git make g++ git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev ruby-dev libpq-dev yui-compressor | |
echo 'INSTALL nodejs' | |
(curl -sL https://deb.nodesource.com/setup_6.x | sudo sh) && sudo apt-get install -y nodejs | |
echo 'INSTALL rbenv' | |
cd && git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "screen-256color" | |
# Scroll History | |
set -g history-limit 30000 | |
set -g prefix C-a | |
unbind C-b | |
bind a copy-mode | |
bind r source-file ~/.tmux.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
filetype off | |
let mapleader=" " | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'gmarik/Vundle.vim' |