NPM publish using OIDC on github actions
| 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)) |
| 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 AppKit | |
| import SwiftUI | |
| // Delete this line if not using a playground | |
| import PlaygroundSupport | |
| struct ContentView: View { | |
| var body: some View { | |
| // if spacing is not set to zero, there will be a gap after the first row |
| /** | |
| * MacEditorTextView | |
| * Copyright (c) Thiago Holanda 2020-2025 | |
| * https://bsky.app/profile/tholanda.com | |
| * | |
| * (the twitter account is now deleted, please, do not try to reach me there) | |
| * https://twitter.com/tholanda | |
| * | |
| * MIT license |
| const path = require('path'); | |
| // Don't forget to everything listed here to `package.json` | |
| // modulePathIgnorePatterns. | |
| const sharedBlacklist = [ | |
| /node_modules[/\\]react[/\\]dist[/\\].*/, | |
| 'downstream/core/invariant.js', | |
| /website\/node_modules\/.*/, |
| # The trick is to link the DeviceSupport folder from the beta to the stable version. | |
| # sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
| # Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
| sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
| # Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
| # (A similar approach works for older versions too, just change the version number after DeviceSupport) |
| var os = require("os"); | |
| //Create function to get CPU information | |
| function cpuAverage() { | |
| //Initialise sum of idle and time of cores and fetch CPU info | |
| var totalIdle = 0, totalTick = 0; | |
| var cpus = os.cpus(); | |
| //Loop through CPU cores |