Skip to content

Instantly share code, notes, and snippets.

View rnrbarbosa's full-sized avatar

Roberto Barbosa rnrbarbosa

View GitHub Profile
@rnrbarbosa
rnrbarbosa / nodnsupdate.txt
Created March 25, 2014 23:51
nodnsupdate
#!/bin/sh
# /etc/dhcp3/dhclient-enter-hooks.d/nodnsupdate
make_resolv_conf(){
:
}
@rnrbarbosa
rnrbarbosa / mariadb-replication.txt
Created March 25, 2014 23:53
Mariadb replication
#!/bin/sh
# /etc/dhcp3/dhclient-enter-hooks.d/nodnsupdate
make_resolv_conf(){
:
}
@rnrbarbosa
rnrbarbosa / haproxy-restart
Created June 19, 2014 14:13
Reconfigt haproxy without restarting
# haproxy -f /etc/haproxy.cfg -p /var/run/haproxy.pid -sf $(cat /var/run/haproxy.pid)
@rnrbarbosa
rnrbarbosa / upgrade_mjdh_20140810
Created August 10, 2014 18:18
Upgrade MJDH 20140811
openerp@sigrh-web1:~$ /usr/bin/openerp-server -c /etc/openerp/openerp-server.conf --update=all
2014-08-10 18:15:50,254 24208 INFO ? openerp: OpenERP version 7.0-20140720-231246
2014-08-10 18:15:50,254 24208 INFO ? openerp: addons paths: /usr/lib/pymodules/python2.7/openerp/addons,/home/openerp/addons
2014-08-10 18:15:50,254 24208 INFO ? openerp: database hostname: 192.168.22.132
2014-08-10 18:15:50,254 24208 INFO ? openerp: database port: 5432
2014-08-10 18:15:50,254 24208 INFO ? openerp: database user: openerp
2014-08-10 18:15:50,671 24208 INFO ? openerp.addons.google_docs.google_docs: GData lib version `%s GData-Python/2.0.17` detected
2014-08-10 18:15:50,994 24208 INFO ? openerp.service.wsgi_server: HTTP service (werkzeug) running on 127.0.0.1:8080
2014-08-10 18:15:50,996 24208 INFO ? openerp: OpenERP server is running, waiting for connections...
2014-08-10 18:15:59,114 24208 INFO sigrh openerp.modules.loading: loading 1 modules...
Verifying that +rnrbarbosa is my openname (Bitcoin username). https://onename.com/rnrbarbosa
#!/bin/bash -v
# internal EC2 short hostname won't resolve via .tmcs nameservers
hostname ${hostname}
#
# apt
#
DEBIAN_FRONTEND=noninteractive apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.com/apt/ubuntu trusty/mongodb-enterprise/stable multiverse" | tee /etc/apt/sources.list.d/mongodb-enterprise.list
@rnrbarbosa
rnrbarbosa / gist:832fcfc8b83336f015ed1d2bc91b4155
Last active December 12, 2016 18:26
Nuxeo Candidate Discussion Exercise
** Introduction
This simple exercise has as an objective to make the candidate familiar with Nuxeo Software, and will serve
as base of discussion for the interviews. The candidate is free to chose the methodology that he feels more confortable.
The candidate can express freely his own ideas and the best of his own devops craft skills.
** Description
The goal of this exercise is to install Nuxeo software and create a way to share it with other users like developers.
provider "aws" {
region = "eu-central-1"
}
variable "input-buckets" {
default = [
"bucket1",
"bucket2"
]
Feature: Test Hosts
Scenario Outline: Ping Hosts
Given a <host>
When we ping the <host>
Then the <response> is correct
Examples: Hosts
| host |
| server-01.domain.com |
@rnrbarbosa
rnrbarbosa / test_server.py
Created April 29, 2019 19:53
pytest parameterized
import pytest
import requests
domains = ['cnn.com','google.com']
@pytest.mark.parametrize("domain",domains)
def test_domains(domain):
url = "https://" + domain
r = requests.get(url)
assert r.status_code == 200