Skip to content

Instantly share code, notes, and snippets.

View yogeek's full-sized avatar

Guillaume Dupin yogeek

View GitHub Profile
@yogeek
yogeek / .pypirc
Last active August 8, 2017 15:51
Python module management
# Pypi configuration file : ~/.pypirc
```
[distutils]
index-servers =
nexus
[nexus]
repository = http://<NEXUS_URL>/repository/<PYTHON_REPOSITORY_NAME>/
username = *******
@yogeek
yogeek / install-gosu-centos.md
Created August 16, 2017 11:42 — forked from rafaeltuelho/install-gosu-centos.md
installing gosu in a centos-based docker image
# Setup gosu for easier command execution
RUN gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
    && curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64" \
    && curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.2/gosu-amd64.asc" \
    && gpg --verify /usr/local/bin/gosu.asc \
    && rm /usr/local/bin/gosu.asc \
    && rm -r /root/.gnupg/ \
    && chmod +x /usr/local/bin/gosu
[http]
sslverify = false
[user]
name = Guillaume Dupin
email = guillaume.dupin@xxx.fr
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status
@yogeek
yogeek / tmux_build_from_source_CentOS.sh
Last active October 17, 2017 17:21 — forked from P7h/tmux__CentOS__build_from_source.sh
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
# C compiler must be installed ! e.g. "yum -y install gcc"
VERSION=2.5
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
@yogeek
yogeek / traefik-compose.sh
Created October 29, 2017 23:49
Traefik demo
# Get compose file
wget https://raw.githubusercontent.com/containous/traefik/master/examples/compose-traefik.yml
# Edit it to use different frontents for the 2 backends
# Launch services
docker-compose -f compose-traefik.yml up
# Connect to Traefik UI : http://IP:8080
@yogeek
yogeek / VBoxManage
Last active November 1, 2017 18:17
Useful commands for VirtualBox management
VBoxManage.exe list vms
"default" {f60ab799-3b88-4830-8662-cdda7d1d4765}
VBoxManage.exe showvminfo f60ab799-3b88-4830-8662-cdda7d1d4765
VBoxManage.exe list hdds
UUID: d00b24b4-9efd-452a-98af-3e2f91d6eef8
[...]
VBoxManage.exe closemedium e0befe42-e1fe-4cd8-8965-23d3e41253e0 --delete
@yogeek
yogeek / Vagrantfile.1vm
Last active November 1, 2017 18:22
Vagrantfile examples
# -*- mode: ruby -*-
# vi: set ft=ruby :
disk = './secondDisk.vdi'
Vagrant.configure(2) do |config|
#config.vm.box = "ubuntu/xenial64"
config.vm.box = "VM-CO72-BASE"
# config.vm.box_check_update = false
@yogeek
yogeek / etc-sysconfig-docker
Created November 2, 2017 12:51
Automatic Set / Unset PROXY on centOS
# /etc/sysconfig/docker
HTTP_PROXY=http://10.31.255.65:8080
NO_PROXY=localhost,127.0.0.1
http_proxy=http://10.31.255.65:8080
no_proxy=localhost,127.0.0.1
@yogeek
yogeek / Zsh & theme
Created November 2, 2017 13:10 — forked from leemour/Zsh & theme
Zsh installation and Agnoster theme settings
# Railscast
http://railscasts.com/episodes/308-oh-my-zsh
# Install Zsh
sudo apt-get update && sudo apt-get install zsh
# Install Oh-my-zsh
wget –no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O – | sh
# Make ZSH default shell
@yogeek
yogeek / init_db.sh
Created November 8, 2017 14:05
PostgreSQL
# Create database owner
createuser -U postgres --createdb --createrole ${DB_OWNER};
psql --dbname ${DB_NAME} -c "ALTER USER '${DB_OWNER}' WITH PASSWORD '${DB_OWNER_PASSWORD}';"
# Create database
createdb -U ${DB_OWNER} ${DB_NAME};
# List databases
psql -U ${DB_OWNER} --list