Skip to content

Instantly share code, notes, and snippets.

View cmackenzie1's full-sized avatar
🏠
Working from home

Cole Mackenzie cmackenzie1

🏠
Working from home
View GitHub Profile
@cmackenzie1
cmackenzie1 / nifi.sh
Created June 7, 2016 07:23
default nifi.sh script from maven build
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@cmackenzie1
cmackenzie1 / output
Created December 13, 2016 02:12
cmput391-a3 output
cdmacken@ohaton:~/cmput391-a3>cat test.txt
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <http://schema.org/>
PREFIX dbr: <http://dbpedia.org/resource/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?city WHERE {
?aaa ?bbb ?city .
@cmackenzie1
cmackenzie1 / diamond-mysql-schema.sql
Created December 27, 2016 19:03
Example of a schema used to define a metrics table for diamond to to store data in a MySQL database
CREATE DATABASE IF NOT EXISTS diamond;
USE diamond;
CREATE TABLE metrics (
id int not null auto_increment,
col_time int(11), -- Stored in Seconds
col_metric varchar(255) not null, -- Name of metric in diamond form.
col_value double not null, -- value of the recorded metric
primary key(id)
);
@cmackenzie1
cmackenzie1 / solution.md
Last active January 22, 2018 05:58
Shopify Infrastructure Problem

Shopify Infrastructure Problem

Screenshot of WebApp

Solution

Outputs

$ minikube service list
|-------------|----------------------|-----------------------------|
@cmackenzie1
cmackenzie1 / install-docker.sh
Last active April 18, 2018 01:05
CentOS 7 Docker Userdata
# Update packages
yum update -y --security
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
cat << EOF > /etc/yum.repos.d/centos-extras.repo
[centos-extras]
name=centos
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
gpgcheck=0
enabled=1
@cmackenzie1
cmackenzie1 / config.ssh
Created August 13, 2019 21:13
SSH Tunnel / Bastion Hop config example
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
# Helps prevent timeout of connections due to inactivity
ServerAliveInterval 30
TCPKeepAlive yes
# Use key forwarding so I don't have to put my private key on the servers
#!/bin/bash
#
# Inspects branch name and checks if it begins with a Jira ticket number (i.e. ABCD-123).
# If yes, commit message will be automatically prepended with [ABCD-123].
# Resources:
# - https://gist.github.com/bartoszmajsak/1396344
# - https://stackoverflow.com/questions/34213120/find-branch-name-during-git-rebase
# - https://github.com/typicode/husky/issues/311#issuecomment-580237182
# - https://gmurphey.github.io/2013/02/02/ignoring-git-hooks-when-rebasing.html#.XkK1AhNKjOQ
print("Hello, World!)
@cmackenzie1
cmackenzie1 / docker-compose.yml
Last active October 12, 2024 08:33
Docker Compose for DynamoDB Local and Admin UI
version: '3.7'
services:
dynamodb-local:
image: amazon/dynamodb-local:latest
container_name: dynamodb-local
ports:
- "8000:8000"
dynamodb-admin:
image: aaronshaf/dynamodb-admin
@cmackenzie1
cmackenzie1 / build.gradle.kts
Last active March 4, 2021 04:27
Gradle dependency for Expedia GraphQL
implementation("com.expediagroup:graphql-kotlin-spring-server:3.7.0")