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 my knowledge some apps do use Sparkle to provide new update reminders in | |
| an inlined view way (e.g Nova, ChatGPT, Ghostty). Sparkle provides ways for | |
| developers to to implement lightweight reminders[1] (like a window title badge | |
| to redirect to the standard UI) or custom UIs[2]. But it's not automatically | |
| built in nor the default. | |
| For some apps I use, I prefer Sparkle to automatically download & install | |
| updates silently on quit and reduce prompts/badges altogether, and this is one | |
| of the opt-in options it provides to both developers and users. Some apps can | |
| be very long running though and some developers want to notify those users of |
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
| #!/usr/bin/env bash | |
| # Add to jj config: | |
| # [aliases] | |
| # advance = ["util", "exec", "--", "jj-advance.sh"] | |
| set -euo pipefail | |
| target_bookmark="" | |
| target_bookmark_revset="" | |
| usage() { |
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
| #!/usr/bin/env bash | |
| # Add to jj config: | |
| # [aliases] | |
| # cob = ["util", "exec", "--", "jj-commit-onto-bookmark.sh"] | |
| set -euo pipefail | |
| target_bookmark="" | |
| target_bookmark_revset="" | |
| commit_args=() |
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
| %default total | |
| Prefix : Type | |
| Prefix = String | |
| data Format = Number Prefix Format | Str Prefix Format | End Prefix | |
| parse : List Char -> String -> Format | |
| parse [] prefix_acc = End prefix_acc | |
| parse ('%' :: 'd' :: xs) prefix_acc = Number prefix_acc (parse 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
| Unable to run UI Tests because Xcode Helper does not have permission to use Accessibility. | |
| To enable UI testing, go to the Security & Privacy pane in System Preferences, select the Privacy tab, | |
| then select Accessibility, and add Xcode Helper to the list of applications allowed to use Accessibility. |
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
| // I'm not using the passed editRange and delta because I've found them to be quite misleading... | |
| // This happens to be a new API (macOS 10.11) so maybe it's not really battle tested or I don't know what I'm doing | |
| // Either way I'd like to support older systems so for portability sake it's easier to not use these parameters | |
| - (void)textStorage:(NSTextStorage *)textStorage didProcessEditing:(NSTextStorageEditActions)editedMask range:(NSRange)editedRange changeInLength:(NSInteger)__unused delta | |
| { | |
| if ((editedMask & NSTextStorageEditedCharacters) != 0) | |
| { | |
| //[self updateTextProcessingForTextStorage:textStorage]; | |
| //NSLog(@"Edited range: %lu, %lu", editedRange.location, editedRange.length); | |
| [textStorage removeAttribute:NSBackgroundColorAttributeName range:NSMakeRange(0, textStorage.length)]; |
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
| // This uses a legacy version of swift | |
| import Foundation | |
| class Model: NSObject, NSSecureCoding { | |
| let bar: String | |
| init(bar: String) { | |
| self.bar = bar | |
| } | |
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
| // Note that on the command line cp -R /Volumes/mayur/bar.txt /Users/msp/Desktop/bar.txt | |
| // works just fine; the symbolic link is copied, and it's not followed | |
| // But I have *no idea* how to do this programatically as shown below | |
| // (Note: My end goal is being able to copy an app from a volume to my local disk, but | |
| // it fails when it encounters a symbolic link) | |
| - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | |
| NSURL *sourceURL = [NSURL fileURLWithPath:@"/Volumes/mayur/bar.txt"]; // this is a symbolic link | |
| NSURL *destinationURL = [NSURL fileURLWithPath:@"/Users/msp/Desktop/bar.txt"]; | |
| // this outputs 1, so the source does exist |
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
| @protocol M | |
| @end | |
| NSArray<M, NSValue *, NSURL, NSArray <id <M>>> *foo = @[@"a"]; | |
| NSNumber *bar = foo[0]; | |
| NSLog(@"%@", bar); | |
| // No warnings |
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
| cargo rustc --release -- -C no-stack-check -C target-cpu=native --emit llvm-ir |
NewerOlder