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
| [comment]: <> (Taska is an issue tracking Mac app from Leitmotif. You can get it here: https://taska.now) | |
| ## Tickets & Issues | |
| ### Setup | |
| - Use the Taska MCP server to file and read tickets, but only when told to do so. | |
| - The <your-project> repo is "<your-repo>". | |
| - Writes require "Allow Write Access" on in Taska › Settings › Extensions; this is enabled. |
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
| #!/bin/bash | |
| APPS_DIR="/Applications" | |
| find "$APPS_DIR" -type d -maxdepth 1 -name "*.app" | while read -r app; do | |
| if codesign -d --entitlements - "$app" 2>/dev/null | grep -q "com.apple.security.application-groups"; then | |
| echo "$app" | |
| fi | |
| done |
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 WebKit | |
| class GetUserAgent: NSObject, WKNavigationDelegate { | |
| private static var cachedUserAgent: String? | |
| private var continuation: CheckedContinuation<String, Error>? | |
| private var webView: WKWebView? | |
| func get() async throws -> String { | |
| if let cached = Self.cachedUserAgent { |
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
| private var firstSampleToPlotIdx: Int { | |
| get { | |
| let idx = Int(-viewPort.xTrans * viewPort.screenScale) | |
| return (0..<dataProvider.summarySampleCnt).clamp(idx) | |
| } | |
| } | |
| private var samplesToPlotInVisibleCnt: Int { | |
| get { | |
| return viewPort.visibleXAxisUnits |
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 update() { | |
| guard viewPort != nil else { return } | |
| guard dataProvider != nil else { return } | |
| prepare() | |
| updateMidline() | |
| updatePlot() | |
| } |
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
| @objc func pinchGesture(_ gc: UIPinchGestureRecognizer) { | |
| switch gc.state { | |
| case .changed: | |
| pauseUpdates = true | |
| scrollView.recenterForScale(gc.scale) | |
| pauseUpdates = false | |
| let newScale = viewPort.zoom * gc.scale | |
| viewPort.zoom = max(newScale, 1.0) | |
| gc.scale = 1.0 | |
| case .ended, .cancelled, .failed: |
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
| override func layoutSubviews() { | |
| super.layoutSubviews() | |
| let scale = bounds.width / lastBounds.width | |
| scrollView.recenterForScale(scale) | |
| lastBounds = bounds | |
| updateScrollViewSize() | |
| update() | |
| } |
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
| private func updateScrollViewSize() { | |
| scrollView.contentSize = | |
| CGSize(width: bounds.width * viewPort.zoom, | |
| height: bounds.height) | |
| } |
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
| private func viewPortZoomed() { | |
| dataProvider?.summarySamples = nil | |
| updateScrollViewSize() | |
| CATransaction.begin() | |
| CATransaction.setDisableActions(true) | |
| update() | |
| CATransaction.commit() | |
| } | |
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
| private var firstSampleToPlotIdx: Int { | |
| get { | |
| let idx = Int(-viewPort.xTrans * UIScreen.main.scale) | |
| return (0..<dataProvider.summarySampleCnt).clamp(idx) | |
| } | |
| } |
NewerOlder