NPM publish using OIDC on github actions
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Clone all repositories under the GitHub org/user "jaywcjlove" into current directory. | |
| # Usage: | |
| # bash clone-jaywcjlove-repos.sh | |
| # Optional env: | |
| # GITHUB_TOKEN=xxx # raise GitHub API rate limit | |
| # ORG=jaywcjlove # override org/user name | |
| # PER_PAGE=100 # API page size (max 100) |
| private protocol SilenceDeprecationNSSharingService { | |
| func sharingServices(forItems items: [Any]) -> [NSSharingService] | |
| } | |
| private final class SilenceDeprecationNSSharingServiceImplementation: SilenceDeprecationNSSharingService { | |
| @available(macOS, deprecated: 13) | |
| func sharingServices(forItems items: [Any]) -> [NSSharingService] { | |
| NSSharingService.sharingServices(forItems: items) | |
| } | |
| } |
| import SwiftUI | |
| struct HeaderView: View { | |
| var body: some View { | |
| HStack { | |
| Image(systemName: "info.circle.fill") | |
| .resizable() | |
| .frame(width: 12, height: 12) | |
| Text("Section Header") | |
| .font(.system(size: 13)) |
| package main | |
| import ( | |
| "crypto/tls" | |
| "flag" | |
| "io" | |
| "log" | |
| "net" | |
| "net/http" | |
| "net/http/httputil" |
| - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender{ | |
| return YES; | |
| } |