docker swarm init --advertise-addr <ip> # Set up master
docker swarm init --force-new-cluster -advertise-addr <ip> # Force manager on broken cluster
docker swarm join-token worker # Get token to join workers
docker swarm join-token manager # Get token to join new manager
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.StringTokenizer; | |
public class Main { | |
public static void main(String[] args) { | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<camelContext id="camelContext-8c188f81-699d-4d2f-94da-61be32c27194" xmlns="http://camel.apache.org/schema/blueprint"> | |
<route id="_routeFacultad"> | |
<from id="_fromFacultad" uri="cxf:bean:facultades?dataFormat=MESSAGE"/> | |
<to id="_toFacultad" uri="cxf:bean:facultadesReal?dataFormat=MESSAGE"/> | |
</route> | |
</camelContext> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browser = browser() | |
browser.get("http://www.skualo.cl/ERP/login.aspx") | |
elem = browser.css("#txtIDUsuario") | |
elem.send_keys("") | |
elem = browser.css("#txtPassword") | |
elem.send_keys("") | |
elem = browser.css("#bttIngresar").click() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from suds.client import Client | |
def encode_utf8(value): | |
if not value is None: | |
return value.encode("utf-8") | |
def get_schedules(): | |
# Definir la llamada al WSDL | |
WSDL_URL = "<path to wsdl>" | |
client = Client(WSDL_URL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Este es un caso particular | |
""" | |
import feedparser | |
import json | |
from bs4 import BeautifulSoup | |
def find_picture(summary): | |
soup = BeautifulSoup(summary) | |
image = soup.find("img") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project name="TiDemo" default="dist" basedir="."> | |
<description> | |
Script de ejemplo para la compilación proyecto Titanium | |
</description> | |
<target name="init"> | |
<property name="project.code" value="TiDemo"/> | |
<property name="project.src" value="."/> | |
<property name="ti.executable" value="/usr/local/bin/ti"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
LOGFILE=/path/to/log/logfile.log | |
LOGDIR=$(dirname $LOGFILE) | |
NUM_WORKERS=1 | |
PORT=8000 | |
BIND_IP=127.0.0.1:$PORT | |
USER=www | |
GROUP=www | |
# switch to project dir, activate virtual environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream app_server { | |
server 127.0.0.1:8000; | |
} | |
server { | |
listen 443; | |
server_name <ip> <server>; | |
location / { |
NewerOlder