Skip to content

Instantly share code, notes, and snippets.

View rodesousa's full-sized avatar

rodesousa rodesousa

  • Kapelal
  • Paris
View GitHub Profile
#!/usr/bin/python
import subprocess
import sys
import os
import yaml
import paramiko
import argparse
from paramiko import SSHClient

serveur web

package main

import (
    "fmt"
    "net/http"
)

func handler(w http.ResponseWriter, r *http.Request) {

Exposer en localhost

alias dps="docker ps --format 'table {{.Names}}\t{{.Image}}\t{{.Ports}}'"

sudo usermod -aG 497 ${USER}

@rodesousa
rodesousa / alias.sh
Last active November 7, 2016 22:23
alias basrc custom
#
# HEROKU
#
# pour se co
#alias herologin='heroku login'
# check cb de temps il reste
#alias herops='heroku ps'
  • Press Ctrl+F12 to show the Structure popup.
# add repo
sudo apt-add-repository ppa:git-core/ppa
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt-get update
sudo apt install terminator docker.io golang vim vagrant git python-pip -y
sudo apt install vim-nox tig puppet ctags -y
sudo npm install -g git2consul
@rodesousa
rodesousa / min_alias
Last active November 2, 2016 14:46
min_alias
#alias
alias l='ls -l'
alias la='ls -la'
alias rtl='ls -rtl'
alias vi='vim'
alias ..='cd ..'
#json
alias fjson='python -m json.tool'

JENKINS_HOST=admin:ritmxadmin@localhost:8081 curl -sSL "http://$JENKINS_HOST/pluginManager/api/xml?depth=1&xpath=///shortName|///version&wrapper=plugins" | perl -pe 's/.?([\w-]+).?([^&lt;]+)()(</\w+>)+/\1 \2\n/g'|sed 's/ /:/'

@rodesousa
rodesousa / __readme.md
Created October 25, 2016 12:49 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

{
    "builders":[{
        "type": "docker",
        "image": "ubuntu",
        "export_path": "image.tar"
    }],
    "provisioners":[
        {
 "type": "shell",