Skip to content

Instantly share code, notes, and snippets.

View masterxavierfox's full-sized avatar
✌️

Xavier Fox masterxavierfox

✌️
View GitHub Profile
@masterxavierfox
masterxavierfox / main.go
Created November 26, 2018 18:06
go-graphql-main
package main
import (
"fmt"
"log"
"net/http"
"github.com/masterxavierfox/go-graphql-api/gql"
"github.com/masterxavierfox/go-graphql-api/postgres"
"github.com/masterxavierfox/go-graphql-api/server"
@masterxavierfox
masterxavierfox / .realize.yaml
Created November 26, 2018 17:44
Go-graphql Realize
settings:
legacy:
force: false
interval: 0s
schema:
- name: go-graphql-api
path: .
commands:
run:
status: true
CREATE TABLE users (
id serial PRIMARY KEY,
name VARCHAR (50) NOT NULL,
age INT NOT NULL,
profession VARCHAR (50) NOT NULL,
friendly BOOLEAN NOT NULL
);
INSERT INTO users VALUES
(1, 'kevin', 35, 'waiter', true),
@masterxavierfox
masterxavierfox / deployment.yaml
Created September 16, 2018 15:39 — forked from lvthillo/deployment.yaml
Example of NodePort service in Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-app
spec:
selector:
matchLabels:
run: my-app
replicas: 2
template:
@masterxavierfox
masterxavierfox / docker-worklow-make
Created August 14, 2018 10:24
make file to automate docker workflow
NAME := acmecorp/foo
TAG := $$(git log -1 --pretty=%!H(MISSING))
IMG := ${NAME}:${TAG}
LATEST := ${NAME}:latest
build:
@docker build -t ${IMG} .
@docker tag ${IMG} ${LATEST}
push:
@masterxavierfox
masterxavierfox / README-Template.md
Created June 12, 2018 13:58 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@masterxavierfox
masterxavierfox / Docker connect to remote server.md
Created April 17, 2018 12:01 — forked from kekru/Docker connect to remote server.md
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
For HTTPS connection use whiledo/docker-remote-api-tls.

@masterxavierfox
masterxavierfox / killbill-analytics.sh
Created March 1, 2018 10:34
Killbill Analytics Script
#!/usr/bin/env bash
###################################################################################
# #
# Copyright 2010-2014 Ning, Inc. #
# Copyright 2014-2015 Groupon, Inc. #
# Copyright 2014-2015 The Billing Project, LLC #
# #
# The Billing Project licenses this file to you under the Apache License, #
# version 2.0 (the "License"); you may not use this file except in #
@masterxavierfox
masterxavierfox / Local.killbill.yml
Created February 15, 2018 08:34
Killbill Docker
# KB stack
version: '3.2'
volumes:
db:
services:
killbill:
image: killbill/killbill:0.18.15
ports:
- "8080:8080"
- "12345:12345"
@masterxavierfox
masterxavierfox / set.sh
Created February 9, 2018 06:44
Set Docker Orchestrator Environment Variable
export DOCKER_ORCHESTRATOR='swarm'
export DOCKER_ORCHESTRATOR='kubernetes'