Skip to content

Instantly share code, notes, and snippets.

View nehayward's full-sized avatar

Nick Hayward nehayward

View GitHub Profile
@nehayward
nehayward / newMac.sh
Last active July 27, 2016 14:35
This is a small script to download all the tools I use for development in the terminal
#!/bin/bash
echo 'This is a small script to download all the tools I use for development in the terminal'
echo 'Installing all brew tools'
brew install gist
# Kubernetes + Minikube
### Commands
Linking docker and minikube
eval $(minikube docker-env)
### Deploy Local Container
* [Getting Started with Minikube and Docker](https://medium.com/@claudiopro/getting-started-with-kubernetes-via-minikube-ada8c7a29620)
* [Hello World](https://kubernetes.io/docs/tutorials/stateless-application/hello-minikube/)
* [Minikube Workflow](https://kubecloud.io/minikube-workflows-d7166e1da290)
@nehayward
nehayward / macOSMode.swift
Last active June 26, 2018 16:26
Get the current AppleInterface (Dark or Light)
import Foundation
struct macOSMode {
static var isEnabled: Bool {
get {
return UserDefaults.standard.string(forKey: "AppleInterfaceStyle") == "Dark"
}
set {
toggle(force: newValue)
}
@nehayward
nehayward / gifLookup.go
Created March 7, 2019 23:17
Find Gif From Google
package main
import (
"fmt"
"io/ioutil"
"net/http"
"regexp"
"strings"
)
@nehayward
nehayward / helloWorld.swift
Created March 8, 2019 01:54
Swift Script Template
#!/usr/bin/env xcrun swift
print("Hello World")
@nehayward
nehayward / sunset.go
Created March 8, 2019 02:34
Get Sunset Time
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"time"
)
@nehayward
nehayward / AutomaticSublimeTheme.go
Created March 8, 2019 16:48
Change Sublime Theme at Sunrise/Sunset
package main
// /Users/nehayward/Library/Application Support/Sublime Text 3/Packages/User
//`"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme",`
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
package main
import (
"bufio"
"encoding/csv"
"fmt"
"io"
"log"
"os"
"strings"
echo "Hello World"
@nehayward
nehayward / ScanViewController.swift
Created November 18, 2019 23:26
A simple QR code scanner using Vision for iOS (Swift)
import UIKit
import Vision
import AVFoundation
import Foundation
class ScanViewController: UIViewController {
private lazy var cameraPreviewLayer: AVCaptureVideoPreviewLayer = {
let l = AVCaptureVideoPreviewLayer(session: captureSession)
l.videoGravity = .resizeAspectFill
l.connection?.videoOrientation = .portrait