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 SwiftUI | |
import UIKit | |
/// Subclass for embedding a SwiftUI View inside of UICollectionViewCell | |
open class SwiftUICollectionViewCell: UICollectionViewCell { | |
static var reuseIdentifier: String { | |
"\(self)" | |
} |
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
extension URL { | |
init(_ staticString: StaticString) { | |
if let url = URL(string: "\(staticString)") { | |
self = url | |
} else { | |
preconditionFailure("'\(staticString)' does not represent a legal URL") | |
} | |
} | |
} |
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
public func arc4random <T: IntegerLiteralConvertible> (type: T.Type) -> T { | |
var r: T = 0 | |
arc4random_buf(&r, UInt(sizeof(T))) | |
return r | |
} | |
public extension Int { | |
/** | |
Create a random num Int | |
:param: lower number Int |
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
// | |
// UIViewExtensions.swift | |
// | |
// Created by DaRk-_-D0G on 24/07/2015. | |
// Copyright (c) 2015 DaRk-_-D0G. All rights reserved. | |
// | |
import UIKit | |
import QuartzCore |
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
// | |
// Vibration.swift | |
// | |
// Created by Yannick Stephan on 2020-11-21. | |
// | |
import UIKit | |
import AudioToolbox | |
enum VibrationService { |
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
reate session foo and attach | |
$ tmux new -s foo | |
create detached session foo | |
$ tmux new -s foo -d | |
list sessions | |
$ tmux ls | |
attach |
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
ssh-keygen -R "you server hostname or ip" |
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
In project | |
swift build | |
swift run myTargetName |
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
scp -r /Users/xxxx/Documents/Dev/rpi/ [email protected]:~ |
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
swift package init --type executable | |
swift package tools-version --set 4.1.2 | |
swift package update | |
swift package generate-xcodeproj |
NewerOlder