This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
extension String { | |
func getUnicodeCodePoints() -> [String] { | |
return unicodeScalars.map { "U+" + String($0.value, radix: 16, uppercase: true) } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
extension UIView { | |
func asCircle(){ | |
self.layer.cornerRadius = self.frame.width / 2; | |
self.layer.masksToBounds = true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
class MyView: UIView { | |
let label = UILabel() | |
func updateText(_ text:String?) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
import PlaygroundSupport | |
extension UIView { | |
func asCircle(){ | |
self.layer.cornerRadius = self.frame.width / 2; | |
self.layer.masksToBounds = true | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: Playground - noun: a place where people can play | |
import UIKit | |
import Foundation | |
struct Thing: Decodable { | |
let id: String | |
let isActive: Bool | |
let name: String | |
let owner: String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// AppDelegate.swift | |
// | |
import UIKit | |
import CoreData | |
import Firebase | |
import TwitterKit | |
import FBSDKCoreKit | |
import Branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import PlaygroundSupport | |
extension UIView { | |
func spanSuperView() { | |
guard superview != nil else { return } | |
self.topAnchor.constraint(equalTo: superview!.topAnchor).isActive = true | |
self.leadingAnchor.constraint(equalTo: superview!.leadingAnchor).isActive = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Sizes from https://developer.apple.com/library/ios/#qa/qa1686/_index.html | |
# Requirements: ImageMagick | |
function resize { | |
GREEN='\033[0;32m' | |
BLUE='\033[0;34m' | |
DEFAULT='\033[0m' | |
echo -e "Generating ${BLUE}$3${DEFAULT} at size ${GREEN}$2 ${DEFAULT}" | |
convert $1 -resize $2 $3 |
OlderNewer