Skip to content

Instantly share code, notes, and snippets.

View sidmutha's full-sized avatar

Siddhant Mutha sidmutha

View GitHub Profile
@sidmutha
sidmutha / Dockerfile
Created November 23, 2017 16:34
Postgres v10 dockerfile with Debezium plugin 0.6
FROM hasuraci/postgres-server:8472f79
ENV PLUGIN_VERSION=v0.6.0
# Install the packages which will be required to get everything to compile
RUN apt-get update \
&& apt-get install -f -y --no-install-recommends \
software-properties-common \
build-essential \
pkg-config \
git \
from src import app
from flask import jsonify, request
@app.route("/")
def hello():
return json.dumps({"message":"Autobots Assemble"})
@app.route("/<process_topic>", methods=['POST'])
def process_url(process_topic):
topic = process_topic[8:] # remove 'process-' and get topic
from src import app
from flask import jsonify, request
import requests
import json
import redis
R = redis.Redis(
host='session-redis.hasura',
decode_responses=True
)
#!/bin/bash
set -e
{ echo "host replication admin 0.0.0.0/0 trust"; } >> "$PGDATA/pg_hba.conf"
@sidmutha
sidmutha / add_routes.py
Last active September 1, 2017 10:21
Add fission http routes to Hasura project conf
import json, subprocess
fui = {
'/': {
'enableAuth': True,
'enableCORS': True,
'enableWebsockets': True,
'restrictToRoles': ['admin'],
'upstreamService': {
'name': 'fission-ui',