Skip to content

Instantly share code, notes, and snippets.

View alo9507's full-sized avatar

Andrew O'Brien alo9507

  • Detroit, MI
View GitHub Profile
brew cask install \
firefox \
1password \
spotify \
flycut \
visual-studio-code \
dotnet \
dotnet-sdk \
google-chrome && \
brew install \
@alo9507
alo9507 / .swift
Created June 29, 2019 21:36
getCardinalDirectionFromYaw
enum CardinalDirection: String {
case North = "North"
case South = "South"
case East = "East"
case West = "West"
case InBetween = "InBetween"
}
enum RotationDirection {
case Clockwise
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
@alo9507
alo9507 / FirebaseManager.swift
Last active July 8, 2019 19:28
FirebaseService
var thisThing: String = "hello"
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 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:
@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:
upstream client {
server client:3000;
}
upstream api {
server api:3001;
}
server {
listen 80;
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: backend-ingress
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
paths:
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: