This file contains hidden or 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
# Functions for recording a video or taking a screenshot from the currently booted simulator and saving it in the Screenshots folder. | |
# Installation: put it in your .zshrc or .bashrc | |
# Usage: "$ simrec" or "$ simscr" in terminal | |
function simrec() { | |
currentDate=$(date "+%Y-%m-%d at %H.%M.%S") | |
screenshotsPath="$HOME/Screenshots" | |
fileName="Screen Recording ${currentDate}.mp4" | |
fullPath="${screenshotsPath}/${fileName}" | |
echo "Recording Video in ${fullPath}" |
This file contains hidden or 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
func request() { | |
let url = URL(string: "http://424de02b.ngrok.io/web_sarvar")! | |
let task = URLSession.shared.dataTask(with: url) { [weak self] (data, _, _) in | |
guard | |
let data = data, | |
let json = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any], | |
let text = json["versas"] as? String | |
else { return } | |
DispatchQueue.main.async { self?.updateLabel(with: text) } | |
} |
This file contains hidden or 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 os.signpost | |
class ViewController: UIViewController { | |
let label = UILabel() | |
let viewDidLoadOSLog = OSLog(subsystem: "com.uptech.TestProject", category: .pointsOfInterest) | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains hidden or 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 | |
extension UIDevice { | |
// swiftlint:disable identifier_name | |
enum DeviceType { | |
case iPhone5s_Se | |
case iPhone6_7_8 | |
case iPhone6_7_8Plus | |
case iPhoneX_Xs |
This file contains hidden or 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 SadCollectionViewFlowLayout: UICollectionViewFlowLayout { | |
private let sideItemScale: CGFloat = 0.9 | |
private let sideItemAlpha: CGFloat = 0.9 | |
private let sideItemShift: CGFloat = 0.0 | |
override open func prepare() { | |
super.prepare() | |
guard let collectionSize = collectionView?.bounds.size else { return } | |
let yInset = (collectionSize.height - itemSize.height) / 2 |
This file contains hidden or 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
excluded: | |
- Carthage/ | |
identifier_name: | |
excluded: | |
- id | |
- x | |
- y | |
- i | |
- vc |
This file contains hidden or 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 RxImagePickerDelegateProxy: | |
DelegateProxy<UIImagePickerController, UIImagePickerControllerDelegate & UINavigationControllerDelegate>, | |
DelegateProxyType, | |
UIImagePickerControllerDelegate, | |
UINavigationControllerDelegate { | |
weak private(set) var imagePicker: UIImagePickerController? | |
internal init(imagePicker: UIImagePickerController) { | |
self.imagePicker = imagePicker |
This file contains hidden or 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 CollectionViewFlowLayout: UICollectionViewFlowLayout { | |
private let sideItemScale: CGFloat = 0.9 | |
private let sideItemAlpha: CGFloat = 0.9 | |
private let sideItemShift: CGFloat = 0.0 | |
var visibleOffset: CGFloat! | |
override open func prepare() { | |
super.prepare() | |
self.updateLayout() |
This file contains hidden or 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
Process: simutrans [46493] | |
Path: /Users/USER/Library/Application Support/Steam/*/simutrans.app/Contents/MacOS/simutrans | |
Identifier: org.simutrans.simutrans | |
Version: ??? (???) | |
Code Type: X86-64 (Native) | |
Parent Process: ??? [46489] | |
Responsible: simutrans [46493] | |
User ID: 501 | |
Date/Time: 2018-03-03 16:41:01.376 +0200 |