Skip to content

Instantly share code, notes, and snippets.

View alo9507's full-sized avatar

Andrew O'Brien alo9507

  • Detroit, MI
View GitHub Profile
@alo9507
alo9507 / deploy.js.yml
Created April 30, 2021 16:57
Use GitHub Actions and Kubeconfig to deploy to Kubernetes
name: Deploy to Kubernetes
on:
push:
branches: [ development ]
pull_request:
branches: [ development ]
jobs:
deploy:
name: OctoBay API - Test, Build, Push, Deploy
on:
push:
branches: [ development ]
pull_request:
branches: [ development ]
jobs:
build-and-push:
# -*- mode: ruby -*-
# vi:set ft=ruby sw=2 ts=2 sts=2:
# Define the number of master and worker nodes
# If this number is changed, remember to update setup-hosts.sh script with the new hosts IP details in /etc/hosts of each VM.
NUM_MASTER_NODE = 1
NUM_WORKER_NODE = 2
IP_NW = "192.168.56."
MASTER_IP_START = 1
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: strimzi-entity-operator
labels:
app: strimzi
rules:
- apiGroups:
- "kafka.strimzi.io"
resources:
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: kafkas.kafka.strimzi.io
labels:
app: strimzi
strimzi.io/crd-install: "true"
spec:
group: kafka.strimzi.io
names:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: backend-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
paths:
upstream client {
server client:3000;
}
upstream api {
server api:3001;
}
server {
listen 80;
@alo9507
alo9507 / docker-compose.yml
Last active October 22, 2020 15:00
An Apollo-GraphQL server set up in front of a Neo4j DB, all on Docker
# 0) Save this raw text to a file titled `docker-compose.yml` somewhere on your machine
# 1) Install Docker Desktop from https://hub.docker.com/editions/community/docker-ce-desktop-mac/
# This install the docker and docker-compose CLI as well
# 2) Run `docker-compose up` in the directory containing the docker-compose.yml file
# 3) Go to `http://localhost:4000` to run run some GraphQL queries against a NEO4J DB without even having it installed on your machine
# 4) Go to `http://localhost:7474`, choose "No Authentication" and click connect to interact directly with data in the local Neo4J DB
version: "3"
services:
neo4j:
@alo9507
alo9507 / localhost-api-neo4j.yml
Created October 22, 2020 14:17
An Apollo GraphQL server in front of a Neo4j database
# 1) Install Docker Desktop from https://hub.docker.com/editions/community/docker-ce-desktop-mac/
# This install the docker and docker-compose CLI as well
# 2) Run `docker-compose up` in the directory containing this docker-compose.yml file
# 3) Run some GraphQL queries against a NEO4J DB without even having it installed on your machine
version: "3"
services:
neo4j:
image: neo4j
ports:
extension MapViewController: SensorDispatchHandler {
/*
After initializing a WearableDeviceSession and calling sensorDispatch.handler = self in viewDidLoad(),
Your view controllers can receive raw heading information with the receivedRotation delegate method.
We use this information to render a custom vision cone on screen.
*/
func receivedRotation(quaternion: Quaternion, accuracy: QuaternionAccuracy, timestamp: SensorTimestamp) {