Skip to content

Instantly share code, notes, and snippets.

View Skitionek's full-sized avatar

Dominik Maszczyk Skitionek

View GitHub Profile
@sergiolucero
sergiolucero / graphqlapp.py
Created June 20, 2019 13:33
basic flask-graphql app
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import os
import graphene
from graphene_sqlalchemy import SQLAlchemyObjectType, SQLAlchemyConnectionField
from flask_graphql import GraphQLView
#################################
app = Flask(__name__)
app.debug = True
@shazron
shazron / delete_all_greenkeeper_branches.sh
Last active April 8, 2021 13:44
Delete all Greenkeeper branches
#!/bin/bash
# Description:
# Delete all `greenkeeper/*` branches of your remote.
# Instructions:
# Run the script with the `--help` flag.
ORIGIN=origin
DRY_RUN=0
THIS=`basename "$0"`
@ryanguill
ryanguill / postgres-merge-arrays.sql
Created December 21, 2016 16:41
in postgres, there currently isnt a function to combine two arrays and remove duplicates - this will do that.
CREATE OR REPLACE FUNCTION mergeArrays (a1 ANYARRAY, a2 ANYARRAY) RETURNS ANYARRAY AS $$
SELECT ARRAY_AGG(x ORDER BY x)
FROM (
SELECT DISTINCT UNNEST($1 || $2) AS x
) s;
$$ LANGUAGE SQL STRICT;