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 / Docker-Jenkins.sh
Last active November 12, 2017 22:15
Jenkins
- Démarrer un serveur Jenkins avec Docker :
docker run -d -p 8888:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home jenkinsci/blueocean:latest
docker run -d -p 8888:8080 -p 50000:50000 -v jenkins_home:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock --privileged jenkinsci/blueocean:latest
Note : Les données seront persistées dans le volume "jenkins_home"
○ Accéder à http://localhost:8888 et entrer le mot de passe admin indiqué dans les logs de démarrage du serveur
○ Sélectionner les plugins souhaités
@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 / 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 / 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 / Dockerfile
Last active April 17, 2024 11:57
Gosu usage in Docker
FROM ubuntu
RUN apt-get install ...
# grab gosu for easy step-down from root
ENV GOSU_VERSION 1.10
RUN set -x \
&& curl -sSLo /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture)" \
&& curl -sSLo /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$(dpkg --print-architecture).asc" \
&& export GNUPGHOME="$(mktemp -d)" \
@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