Skip to content

Instantly share code, notes, and snippets.

Brian Zambrano brianz

Block or report user

Report or block brianz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View service.py
from servant.service.base import Service
import actions
class CalculatorService(Service):
name = 'calculator_service'
version = 1
View actions.py
import servant.fields
from servant.exceptions import ActionError
from servant.exceptions import ServantException
from servant.service.actions import Action
class AddAction(Action):
number1 = servant.fields.IntField(
required=True,
@brianz
brianz / uwsgi.ini
Created Sep 15, 2016
wsgi setup for calculator_service demo
View uwsgi.ini
[uwsgi]
http=0.0.0.0:8888
wsgi-file=wsgi_handler.py
processes=1
threads=1
py-auto-reload=3
@brianz
brianz / built-nginx-ubuntu-14.04.sh
Last active Mar 27, 2019
Build and install nginx on ubuntu 14.04
View built-nginx-ubuntu-14.04.sh
#!/bin/bash
#
# This builds and installs a newer version of nginx on Ubuntu 14 with the same build/configure arguments
# as the apt version
#
./configure \
--prefix=/etc/nginx \
--sbin-path=/usr/sbin \
--conf-path=/etc/nginx/nginx.conf \
View install-docker-ubuntu.sh
#!/bin/bash
curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
sudo apt-get install -y \
apt-transport-https \
software-properties-common \
ca-certificates
sudo add-apt-repository \
@brianz
brianz / sqlalchemy_init.py
Created Aug 31, 2018
A set of helpers to work with SQLAlchemy setup, connections, transactions, etc.
View sqlalchemy_init.py
import contextlib
from contextlib import contextmanager
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.pool import (
NullPool,
QueuePool,
StaticPool,
@brianz
brianz / __init__.py
Last active Feb 27, 2020
SQLAchemy helpers and mixins
View __init__.py
import contextlib
from contextlib import contextmanager
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from sqlalchemy.pool import NullPool
from sqlalchemy_utils import database_exists, create_database
View keybase.md

Keybase proof

I hereby claim:

  • I am brianz on github.
  • I am bezeee (https://keybase.io/bezeee) on keybase.
  • I have a public key ASCpJjqPvAj3vPeinmHfxBil0mv7oRErQ6VkLU_ToS-OZQo

To claim this, I am signing this object:

You can’t perform that action at this time.