Skip to content

Instantly share code, notes, and snippets.

View nathantannar4's full-sized avatar

Nathan Tannar nathantannar4

View GitHub Profile
@nathantannar4
nathantannar4 / Reflectable.swift
Created December 17, 2018 22:17
Generate JSON representation of values using the Mirror API
//
// Reflectable.swift
//
// Created by Nathan Tannar on 2018-12-04.
//
import Foundation
// Add this protocol to your `struct` or `class`
protocol Reflectable {
@nathantannar4
nathantannar4 / XCodeTemplateGenerator.swift
Created September 30, 2018 22:04
Autogenerate an Xcode TemplateInfo.plist file based on current project
/*
XCodeTemplateGenerator.swift
Created by Nathan Tannar
Usage:
Run `swift XCodeTemplateGenerator.swift $SOURCE_FOLDER` where SOURCE_FOLDER is the root directory of your
XCode projects source code. A TemplateInfo.plist will be generated in the SOURCE_FOLDER allowing you
to copy the folder to your XCodes project template folder.
*/
@nathantannar4
nathantannar4 / install.sh
Created August 10, 2018 20:44
My install script for new GCP instances to install all the necessities.
#!/bin/bash
# Prefer IPv4 over IPv6 - make apt-get faster
sudo sed -i "s/#precedence ::ffff:0:0\/96 100/precedence ::ffff:0:0\/96 100/" /etc/gai.conf
# Update Packages
sudo apt-get update -y
sudo apt-get upgrade -y
# Nano Editor