Skip to content

Instantly share code, notes, and snippets.

View SixFiveSoftware's full-sized avatar

BJ Miller SixFiveSoftware

View GitHub Profile
extension ImageConvertible where Self: RawRepresentable, Self.RawValue == String {
var image: UIImage? {
return UIImage(named: self.rawValue)
}
}
extension UIImage {
convenience init?<T: RawRepresentable>(image: T) where T.RawValue == String {
self.init(named: image.rawValue)
//
// Remote.swift
//
// Created by BJ Miller on 3/7/20.
// Copyright © 2020 BJ Miller. All rights reserved.
//
import Foundation
import Combine
@SixFiveSoftware
SixFiveSoftware / .gitconfig
Created November 28, 2017 15:54
git config in user root - change your name and email
# change `excludesfile` location
# change `standup` email address
# change `user`: `name` and `email`
# change `commit`: `template` location
[core]
editor = vim
excludesfile = /Users/user/.gitignore_global
[remote "origin"]
push = HEAD
@SixFiveSoftware
SixFiveSoftware / .xvimrc
Created November 28, 2017 15:38
xvimrc file for Xcode's xvim plugin
" Case-insensitive searching.
set ignorecase
" But case-sensitive if expression contains a capital letter.
set smartcase
" Default to global substitutions on lines
set gdefault
" Use the system pasteboard
@SixFiveSoftware
SixFiveSoftware / brewinstall.sh
Last active December 6, 2017 02:18
Swift script to install needed homebrew formulas
#!/usr/bin/swift
import Foundation
@discardableResult
func shell(_ args: String...) -> Int32 {
let task = Process()
task.launchPath = "/usr/bin/env"
task.arguments = args
task.launch()
@SixFiveSoftware
SixFiveSoftware / vctest.codesnippet
Last active November 27, 2017 16:29
Xcode snippet for quickly filling out template quick/nimble test file. Assumes .fromNib() is an extension on UIViewController to instantiate it from nib.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDECodeSnippetCompletionPrefix</key>
<string>vctest</string>
<key>IDECodeSnippetCompletionScopes</key>
<array>
<string>TopLevel</string>
</array>
@SixFiveSoftware
SixFiveSoftware / .zshrc
Last active January 10, 2022 15:52
Zshrc
# Gem home for ruby gem installation to not need sudo to system path
export GEM_HOME="$HOME/.gems"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/bjmiller/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
@SixFiveSoftware
SixFiveSoftware / .vimrc
Last active February 1, 2022 19:05
Vimrc file using Vundle, vim-plug, and pathogen
set nocompatible " be iMproved, required
filetype off " required
set exrc
set secure
au BufNewFile,BufRead Podfile set ft=ruby
au BufNewFile,BufRead Appfile set ft=ruby
au BufNewFile,BufRead Deliverfile set ft=ruby
au BufNewFile,BufRead Fastfile set ft=ruby