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
- Supports opening documents in place LSSupportsOpeningDocumentsInPlace | |
- Application supports iTunes file sharing UIFileSharingEnabled |
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
alias pip3='pip3 --trusted-host pypi.org --trusted-host files.pythonhosted.org' | |
alias cXed='rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState && xed .' | |
alias clearXcode='rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState' |
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
tuist graph -t -f dot && sed -E '/(Testing)|(Example)/d' graph.dot > /tmp/tuist_graph.dot | |
dot -Tpdf /tmp/tuist_graph.dot -o graph.pdf && open graph.pdf | |
dot -Tpng /tmp/tuist_graph.dot -o graph.png | |
rm graph.dot |
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 Foundation | |
import DictionaryCoding | |
/// Note: This relies on the DictionaryCoding package https://github.com/elegantchaos/DictionaryCoding | |
struct QueryParamEncoder { | |
func encode<T: Encodable>(_ item: T) throws -> String { | |
let encoder = DictionaryEncoder() | |
let encoded: [String: Any] = try encoder.encode(item) | |
let queryParams = encodeDictionary(encoded) | |
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
// refer: https://woowabros.github.io/swift/2021/02/18/swift-dynamic-features.html | |
@dynamicMemberLookup | |
public struct Builder<Base: AnyObject> { | |
private var base: Base | |
public init(_ base: Base) { | |
self.base = base | |
} |
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
alias cXed='rm -rf ~/Library/Saved\ Application\ State/com.apple.dt.Xcode.savedState && xed .' |
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 SwiftUI | |
struct HalfShape: Shape { | |
let left: Bool | |
func path(in rect: CGRect) -> Path { | |
return Path { path in | |
let width = rect.width | |
let height = rect.height |
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
from xml.etree.ElementTree import parse | |
import os | |
import glob | |
import re | |
import sys | |
moduleList = { | |
"App" : ["ViewController"], | |
"SampleCustomView" : ["GreenView", "RedView", "DummyTextField"] | |
} |
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
// | |
// ContinuousStarRating.swift | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | |
// of the Software, and to permit persons to whom the Software is furnished to do so, | |
// subject to the following conditions: | |
// |
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
// | |
// RotatorView.swift | |
// | |
// Created by Pavel Zak on 16/11/2020. | |
// original idea by: https://twitter.com/beesandbombs/status/1326312738033983489?s=20 | |
// | |
import SwiftUI | |
func pow(_ x: Int, _ y: Int) -> Int { |