Skip to content

Instantly share code, notes, and snippets.

@feighter09
feighter09 / Fonts.swift
Last active June 25, 2021 19:24
Set global font for iOS app in one place
// MARK: - Swizzling
extension UIFont {
class var defaultFontFamily: String { return "Georgia" }
override public class func initialize()
{
if self == UIFont.self {
swizzleSystemFont()
}
}
@bardonadam
bardonadam / Form.swift
Created December 12, 2019 08:11
Custom decode with SomeKindOfBool
struct Form: Codable, Equatable {
let id: Int
let type: FType
let name: String
let code: String
let hasScreenshot: Bool
let total: Int
let totalUnique: Int
let opened: Int
@SomeKindOfBool var active: Bool
@antelle
antelle / ImageMagick resize folder
Last active August 22, 2017 17:22
Batch resize with imagemagick
for f in *.JPG *.jpg; do convert "$f" -resize "1200x1200>" -quality 85 -verbose "$f"; done