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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Second Page</title> | |
</head> | |
<body> | |
<h1>This is the second page</h1> | |
<script> |
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
defaults write com.apple.iphonesimulator AllowFullscreenMode -bool YES |
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
/** | |
Extension that helps to find the week's previous/next weekday. | |
e.g. if it's sunday, what was last monday's date? | |
usage: Date().get(direction: .previous, dayName: .monday, considerToday: true) | |
*/ | |
extension Date { | |
// weekday is in form 1...7 | |
enum WeekDay: Int { | |
case sunday = 1, monday, tuesday, wednesday, thursday, friday, saturday |
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
import UIKit | |
import RxCocoa | |
import RxSwift | |
// KEYBOARD STUFF | |
extension UIViewController { | |
func setupViewResizerOnKeyboardShown(bag:DisposeBag) { | |
NotificationCenter.default.rx |
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
import UIKit | |
public extension String { | |
static let htmlBase = "<html><head><style type='text/css'> body { color: %COLOR%; } %STYLE% </style></head><body>%BODY%</body></html>" | |
static let cssBase = " h1 { font-family: 'GTWalsheimLight'; font-size: 34px; } h2 { font-family: 'GTWalsheimBold'; font-size: 24px; } h3 { font-family:'GTWalsheimLight'; font-size: 18px; } h4 { font-family:'GTWalsheimBold'; font-size: 14px; } h5 { font-family:'GTWalsheimBold'; font-size: 12px; } p { font-family: 'SourceSansPro-Regular'; font-size: 16px; } p.strong { font-family: 'SourceSansPro-Semibold'; font-size: 16px; }" | |
public func HTMLtoAttributedText(_ color:UIColor = UIColor.black, css:String = String.cssBase) -> NSAttributedString? { | |
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
import UIKit | |
/// Load Fonts | |
/// | |
/// Example Usage: | |
/// | |
/// let fonts = ["SourceSansPro-Regular.otf", "GT-Walsheim-Regular.ttf"] | |
/// | |
/// let loadedSuccessfuly = loadFonts(fonts) | |
/// |
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
// Inspired by: https://gist.github.com/futurepaul/8b99d502006cf8a67a93 | |
import UIKit | |
typealias ๐พ = String | |
let ๐ = "๐ฆ๐๐ถ๐บ๐ฑ๐ญ๐น๐ฐ๐ธ๐ฏ๐จ๐ป๐ท๐ฝ๐ฎ๐๐ต๐๐ด๐๐๐ผ๐ง๐ฆ๐ค๐ฅ๐ฃ๐๐๐ข๐๐๐๐๐๐๐๐ ๐๐ฌ๐ณ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐ฒ๐ก๐๐ซ๐ช๐๐๐ฉ" | |
let ๐ข = ๐.characters | |
.map { (๐) -> ๐พ in | |
return ๐พ(๐) | |
} |
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
โ Maven git:(master) โ ping -c google.com | |
ping: invalid count of packets to transmit: `google.com' | |
โ Maven git:(master) โ ping -c 10 google.com | |
PING google.com (74.125.226.9): 56 data bytes | |
64 bytes from 74.125.226.9: icmp_seq=0 ttl=52 time=13.532 ms | |
64 bytes from 74.125.226.9: icmp_seq=1 ttl=52 time=562.196 ms | |
64 bytes from 74.125.226.9: icmp_seq=2 ttl=52 time=11.785 ms | |
64 bytes from 74.125.226.9: icmp_seq=3 ttl=52 time=18.157 ms | |
64 bytes from 74.125.226.9: icmp_seq=4 ttl=52 time=12.873 ms | |
64 bytes from 74.125.226.9: icmp_seq=5 ttl=52 time=10.785 ms |
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
let state = [ "AK - Alaska", | |
"AL - Alabama", | |
"AR - Arkansas", | |
"AS - American Samoa", | |
"AZ - Arizona", | |
"CA - California", | |
"CO - Colorado", | |
"CT - Connecticut", | |
"DC - District of Columbia", | |
"DE - Delaware", |
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
class JGCell : UITableViewCell { | |
override init(style: UITableViewCellStyle, reuseIdentifier: String!) { | |
super.init(style: style, reuseIdentifier: reuseIdentifier) | |
setupViews() | |
} | |
required init(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) |
NewerOlder