Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew O'Brien alo9507

  • Detroit, MI
View GitHub Profile
View gist:9f12767afd97c58f351858f6a35fb96b
brew cask install \
firefox \
1password \
spotify \
flycut \
visual-studio-code \
dotnet \
dotnet-sdk \
google-chrome && \
brew install \
@alo9507
alo9507 / .swift
Created Jun 29, 2019
getCardinalDirectionFromYaw
View .swift
enum CardinalDirection: String {
case North = "North"
case South = "South"
case East = "East"
case West = "West"
case InBetween = "InBetween"
}
enum RotationDirection {
case Clockwise
View gist:188e504229cf8f8ecde6c171d43bc469
enum CardinalDirection: String {
case North = "North"
case South = "South"
case East = "East"
case West = "West"
case InBetween = "InBetween"
}
func getCardinalDirectionFromYaw(yaw: Double, accuracy: QuaternionAccuracy) {
let cardinalDirection: CardinalDirection
View FirebaseManager.swift
var thisThing: String = "hello"
View MapViewController.swift
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) {
@alo9507
alo9507 / localhost-api-neo4j.yml
Created Oct 22, 2020
An Apollo GraphQL server in front of a Neo4j database
View localhost-api-neo4j.yml
# 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:
@alo9507
alo9507 / docker-compose.yml
Last active Oct 22, 2020
An Apollo-GraphQL server set up in front of a Neo4j DB, all on Docker
View docker-compose.yml
# 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:
View default.conf
upstream client {
server client:3000;
}
upstream api {
server api:3001;
}
server {
listen 80;
View ingress.yml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: backend-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
paths:
View strimzi-operator.yml
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: