Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Daniel Barragán Calderón d4n13lbc

🎯
Focusing
  • Universidad del Valle
  • Ciudad Universitaria Meléndez Calle 13 # 100-00 Edificio 331 Oficina 2114
View GitHub Profile
View Links
View Vagrantfile_discovery
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.insert_key = false
config.vm.define :discoveryserver do |discovery_server|
discovery_server.vm.box = "rabbitmq_sensu_v3.0.0"
discovery_server.vm.network :private_network, ip: "192.168.33.10"
View slack.md

Slack test

pip install slackclient
from slackclient import SlackClient

slack_token = os.environ["SLACK_API_TOKEN"]
View mariadb.md

Configuración de MariaDB para acceso remoto

root@db_server>/usr/bin/mysql_secure_installation
Enter current password for root (enter for none): <enter>
Set root password? [Y/n] <Y>
New password: <distribuidos>
Re-enter new password: <distribuidos>
Remove anonymous users? [Y/n]  <Y>
Disallow root login remotely? [Y/n] 
View consul.md

--- tutorial pdsh ----- crear dos maquinas virtuales con las ips 192.168.33.2 192.168.33.3

apt install pdsh export PDSH_RCMD_TYPE=ssh

vi hosts root@192.168.33.2

View users_post.py
import json
from flask import Flask, abort, request
from flask_restplus import Resource, Api
from flask_restplus import fields
from users_commands import get_all_users, add_user, remove_user
app = Flask(__name__)
api = Api(app,version='1.0', title='API for users management', description='A demonstration of a Flask RestPlus powered API')
View users_get.py
import json
from flask import Flask, abort, request
from flask_restplus import Resource, Api
from users_commands import get_all_users, add_user, remove_user
app = Flask(__name__)
api = Api(app,version='1.0', title='API for users management', description='A demonstration of a Flask RestPlus powered API')
ns = api.namespace('v1.0/users', description='Operations related to create users')
View Swarm
curl -Ls https://get.cloud.docker.com/ | sudo -H sh -s f00368fe6e2d4ecabbd06fe8466a76ce
docker-machine create -d virtualbox --virtualbox-memory 512 local
eval "$(docker-machine env local)"
docker run swarm create
docker-machine create \
-d virtualbox \
--virtualbox-memory 512 \
--swarm \
--swarm-master \
--swarm-discovery token://c4567bc8d5f2d52fa76cac3f8c9ed4d2 \
View TDD
https://github.com/ereyes01/apug-pytest-prez
View freeling_python_instructions
$ mkdir tmp
$ docker run -it --rm -v $(pwd)/tmp:/tmp freeling /bin/bash
# apt-get update
# apt-get install python3-dev
# apt-get install make
# apt-get install subversion
# apt-get install swig
# apt-get install g++
# apt-get install libboost-all-dev
# cd /tmp