Commit messages for issues with an issue number should be prefixed in the form:
proj://issue/123 hello world
If no open issue exists, the commit should indicate the nature of the change:
Add: Add / update files
Del: Remove files
Fix: Bug fix
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
### Keybase proof | |
I hereby claim: | |
* I am mlavergn on github. | |
* I am mlavergn (https://keybase.io/mlavergn) on keybase. | |
* I have a public key whose fingerprint is 8322 4DCC 903F A130 6B31 F5F8 1324 A1FE 3100 63E2 | |
To claim this, I am signing this object: |
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/make -f | |
.DEFAULT_GOAL := main | |
# eval trick to avoid re-execing variable | |
SEL = $(eval SEL := $$(shell read sel && echo $$$$sel))$(SEL) | |
102: | |
sudo xcode-select -s /Applications/Xcode-102-10E125.app | |
xcodebuild -version |
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 | |
// O(n) sort | |
// Technically O(n) since time measures complexity and not a fixed interval | |
// NOTE: This is just for fun, please don't use this in real applications! | |
func sleepSort(_ vals: [Int]) -> [Int] { | |
var result: [Int] = [] | |
let sortDispatch = DispatchQueue(label: "sleepSort", qos: .userInitiated, attributes: .concurrent) | |
let sortGroup = DispatchGroup() | |
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 Combine | |
// register the observable name | |
extension Notification.Name { | |
static let DemoObservable = Notification.Name("DemoObservable") | |
} | |
// define the observable value type | |
struct DemoValue { |
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 Combine | |
// define the observable value type | |
struct DemoValue { | |
var value: String | |
} | |
// observable class | |
class DemoObservable { |
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
# | |
# pseudo-script on adding support for a new iOS ver to an older Xcode | |
# | |
XCNEW="Xcode-113-11C505.app" | |
XCOLD="Xcode-110-11A420a.app" | |
IOSVER="13.3" | |
# rm -r /Applications/$XCOLD/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/$IOSVER | |
# cp -R /Applications/$XCNEW/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/$IOSVER /Applications/$XCOLD/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport |
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
#!/bin/sh | |
/usr/bin/nohup /opt/foo/bar < /dev/null >log.txt 2>&1 & |
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
// silgen allows you to call C functions without headers or bridges | |
// not to be used as a rulem but might have some interesting use cases | |
@_silgen_name("getpid") private func getpid() -> pid_t | |
print(getpid()) |
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/Foundation.h> | |
#import <Security/Security.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
AuthorizationRef authorizationRef; | |
OSStatus status; | |
status = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment, kAuthorizationFlagDefaults, &authorizationRef); | |
if (status != errAuthorizationSuccess) { |
OlderNewer