Skip to content

Instantly share code, notes, and snippets.

View d4n13lbc's full-sized avatar
🎯
Focusing

Daniel Barragán Calderón d4n13lbc

🎯
Focusing
View GitHub Profile
# -*- 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"
@d4n13lbc
d4n13lbc / slack.md
Last active September 2, 2017 18:04

Slack test

pip install slackclient
from slackclient import SlackClient

slack_token = os.environ["SLACK_API_TOKEN"]

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] 

--- 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 [email protected]

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')
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')
@d4n13lbc
d4n13lbc / Swarm
Last active October 25, 2016 01:11
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 \
https://github.com/ereyes01/apug-pytest-prez
$ 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