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
// Generate docarhive file using xcodebuild to custom derived data path | |
xcodebuild docbuild \ | |
-scheme YOUR_TARGET_NAME \ | |
-derivedDataPath PATH_TO_SAVE_DERIVED_DATA_FOLDER \ | |
-destination 'platform=iOS Simulator,name=iPhone 13' | |
// Find docarchive file in the build derived data path | |
find PATH_TO_SAVE_DERIVED_DATA_FOLDER -type d -name '*.doccarchive' |
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
blueprint: | |
name: Hue Dimmer Remote With Hold | |
description: | | |
(Jan 2022 Update) Using a Hue bridge with which a dimmer remote is paired, allows you to configure actions based on said Hue Dimmer Remote | |
NOTE: tested with RWL020 but may also work with RWL021 | |
domain: automation | |
source_url: https://gist.github.com/lksnyder0/6ad7bd5db9201f1c26019beb8bbb0ee7 | |
input: | |
dimmer_device: | |
name: Dimmer Remote Device |
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 | |
struct DropdownOption: Hashable { | |
let key: String | |
let value: String | |
public static func == (lhs: DropdownOption, rhs: DropdownOption) -> Bool { | |
return lhs.key == rhs.key | |
} | |
} |
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
enum Zodiac: String { | |
case aries, taurus, gemini, cancer, leo, virgo, libra, scorpio, sagittarius, capricorn, aquarius, pisces | |
} | |
extension Zodiac { | |
var dateRangeString: String { | |
let df = DateFormatter() | |
df.dateFormat = "MMM d" | |
let from = df.string(from: dateRange.lowerBound) | |
let to = df.string(from: dateRange.upperBound) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<!-- iOS 10, macOS Sierra, and friends bring a new logging subsystem that's | |
supposed to scale from the kernel, up to frameworks, and up to apps. It defaults | |
to a more regimented, privacy-focused approach that large apps and complex | |
systems need. | |
It, along with Activity Tracing introduced in iOS 8 and macOS Yosemite and the | |
Console app in macOS Sierra, hope to help you graduate from caveman debugging to |
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
Fractal Design Define S Black | |
Corsair CP-9020094-EU RMX Serie RM1000X ATX/EPS (if you don't do SLI 850W is good enough) | |
Asus ROG Maximus VIII Hero Gaming Mainboard | |
Corsair CMK32GX4M4A2400C14 Vengeance LPX 32GB | |
Intel Core™ i7-6700K | |
Noctua NH-D15S | |
Samsung Basic MZ-7KE1T0BW 850 Pro SSD (no space for an PCI-E version...) | |
Western Digital WD40EZRX Caviar Green 4TB (optional) |
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 shell(input: String) -> (output: String, exitCode: Int32) { | |
let arguments = split(input, maxSplit: Int.max, allowEmptySlices: true) { | |
$0 == " " | |
} | |
let task = NSTask() | |
task.launchPath = "/usr/bin/env" | |
task.arguments = arguments | |
task.environment = [ | |
"LC_ALL" : "en_US.UTF-8", |
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 Foundation | |
let config = NSURLSessionConfiguration.defaultSessionConfiguration() | |
let userPasswordString = "[email protected]:password" | |
let userPasswordData = userPasswordString.dataUsingEncoding(NSUTF8StringEncoding) | |
let base64EncodedCredential = userPasswordData!.base64EncodedStringWithOptions(nil) | |
let authString = "Basic \(base64EncodedCredential)" | |
config.HTTPAdditionalHeaders = ["Authorization" : authString] | |
let session = NSURLSession(configuration: config) |
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
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |