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
#!/usr/bin/python | |
''' | |
The MIT License (MIT) | |
Copyright (c) 2018 Ioannis Diamantidis @diamantidis | |
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 |
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
Application("Xcode").activate(); | |
delay(1); | |
var system = Application("System Events"), | |
xcode = system.processes["Xcode"]; | |
// open preferences | |
system.keystroke(",", { "using": "command down" }); |
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
activate application "Xcode" | |
tell application "System Events" | |
tell process "Xcode" | |
keystroke "," using command down | |
click button "Accounts" of toolbar 0 of window 0 | |
delay 1 | |
repeat with account_row in rows of table 0 of scroll area 0 of window 0 | |
select account_row | |
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
{ | |
Kind = "Xcode.IDEFoundation.TextSubstitutionFileTemplateKind"; | |
Platforms = ( | |
"com.apple.platform.iphoneos", | |
); | |
Options = ( | |
{ | |
Description = "The name of the module to create"; | |
Identifier = "productName"; | |
Name = "New Module Name:"; |
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 | |
enum StorageKey: String { | |
case lastVersionPromptedReview | |
case dayOfFirstAction | |
case actionCount | |
} | |
protocol Storage { | |
func integer(forKey key: StorageKey) -> Int |
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 | |
struct iTunesInfo: Decodable { | |
var results: [AppInfo] | |
} | |
struct AppInfo: Decodable { | |
var version: Version | |
var currentVersionReleaseDate: Date | |
} |
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
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run tests | |
run: sbt coverage test | |
- name: Coverage Report | |
run: sbt coverageReport | |
- name: Upload coverage to Codecov |
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 ContentView: View { | |
@State var selectedIndex: Int? = nil | |
let options: [String] = ["Option1", "Option2"] | |
var body: some View { | |
PickerField("Select an option", data: self.options, selectionIndex: self.$selectedIndex) | |
} | |
} |
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
activate application "SF Symbols" | |
tell application "System Events" | |
tell process "SF Symbols" | |
-- Click the “list” radio button. | |
click radio button 2 of radio group 1 of group 3 of toolbar 1 of window 0 | |
tell outline 1 of scroll area 1 of splitter group 1 of window 0 | |
select (row 1 where value of static text 1 of UI element 1 starts with "All") |
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
on convertReservedKeywords(theText) | |
set keywords to {"repeat", "return", "case"} | |
set theNewText to theText | |
if keywords contains (theText as string) then | |
set theNewText to "`" & theText & "`" | |
end if | |
return theNewText | |
end convertReservedKeywords |
OlderNewer