git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
from protorpc import messages | |
class MultiMessage(messages.Message): | |
"""Has a field for each basic value type. | |
""" | |
boolean = messages.BooleanField(1) | |
integer = messages.IntegerField(2) | |
float = messages.FloatField(3) | |
string = messages.StringField(4) |
import sys | |
from suds import client | |
from suds.wsse import Security, UsernameToken | |
from suds.sax.text import Raw | |
from suds.sudsobject import asdict | |
from suds import WebFault | |
''' | |
Given a Workday Employee_ID, returns the last name of that employee. |
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
# This pipeline sums up a bunch of values. That simple. | |
class SumPipeline(pipeline.Pipeline): | |
def run(self, *values): | |
return sum(values) | |
# This pipeline takes care of computing the score of one specific player | |
class PlayerScorePipeline(pipeline.Pipeline): | |
def run(self, player, level): | |
# Let's call our remote REST API to return the score | |
# of this player on the supplied level. |
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
# -*- coding:utf-8 -*- | |
import logging | |
logger = logging.getLogger(__name__) | |
from datetime import datetime | |
from pyramid.config import Configurator | |
from pyramid.view import view_config | |
from pyramid.httpexceptions import HTTPError | |
from pyramid.response import Response | |
import json | |
import sqlalchemy as sa |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: consul | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: S 0 1 6 | |
# Short-Description: Consul service discovery framework | |
# Description: Healthchecks local services and registers | |
# them in a central consul database. |
public interface IRtdClient | |
{ | |
object GetValue(params object[] args); | |
} | |
public class RtdClient : IRtdClient | |
{ | |
readonly string _rtdProgId; | |
static IRtdServer _rtdServer; |
APPENGINE_RUNTIME | python27 |
APPLICATION_ID | s~appid |
AUTH_DOMAIN | gmail.com |
CONTENT_LENGTH | 148 |
CONTENT_TYPE | application/x-www-form-urlencoded |
CURRENT_MODULE_ID | default |
CURRENT_VERSION_ID | appid.370290628632119235 |
DATACENTER | us1 |
DEFAULT_VERSION_HOSTNAME | appid.appspot.com |
HTTPS | on |
import uuid | |
import wtforms_json | |
from sqlalchemy import not_ | |
from sqlalchemy.dialects.postgresql import UUID | |
from wtforms import Form | |
from wtforms.fields import FormField, FieldList | |
from wtforms.validators import Length | |
from flask import current_app as app | |
from flask import request, json, jsonify, abort |