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
name: auto-format | |
on: pull_request | |
jobs: | |
format: | |
# Check if the PR is not from a fork | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: |
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/env bash | |
# checck if pidof exists | |
PIDOF="$(which pidof)" | |
# and if not - install it | |
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof | |
# find app in default paths | |
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS | |
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS |
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
// | |
// ComplicationController+helpers.swift | |
// WatchKit Extension | |
// | |
// Created by Lukas Petr on 09.02.2022. | |
// Distributed under MIT License. | |
// | |
// | |
// Helper methods for creating pixel-perfect complications for all Apple Watch sizes. |
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
# Add this to a "Run Script" build phase in your app's main target, as the last step. | |
# It will use the pluginkit command-line tool to force the plugin system on macOS to add your extensions to its database, making them available. | |
# I made this specifically for widgets, but it should work for pretty much any extension type (appex bundle). | |
find $CODESIGNING_FOLDER_PATH -name '*.appex' -exec pluginkit -a {} \; |
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 Combine | |
import SwiftUI | |
final class CancelBag { | |
// MARK: - Properties | |
var subscriptions = Set<AnyCancellable>() | |
// MARK: - Actions |
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
# got this from http://stackoverflow.com/questions/8672809/use-ffmpeg-to-add-text-subtitles | |
ffmpeg -i infile.mp4 -f srt -i infile.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=chi outfile.mp4 | |
# confirmed working with the following ffmpeg | |
# (installed using `brew 'ffmpeg', args: ['with-libvorbis', 'with-libvpx']` ) | |
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers | |
built with Apple clang version 12.0.0 (clang-1200.0.32.2) | |
configuration: --prefix=/usr/local/Cellar/ffmpeg/4.3.1_1 --enable-shared --enable-pthreads --enable-version3 --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-gnutls --enable-gpl --enable-libaom --enable-libbluray --enable-libdav1d --enable-libmp3lame --enable-libopus --enable-librav1e --enable-librubberband --enable-libsnappy --enable-libsrt --enable-libtesseract --enable-libtheora --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libx |
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
// Run any SwiftUI view as a Mac app. | |
import Cocoa | |
import SwiftUI | |
NSApplication.shared.run { | |
VStack { | |
Text("Hello, World") | |
.padding() | |
.background(Capsule().fill(Color.blue)) |
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/bash | |
# Delete Archived Applications | |
rm -r ~/Library/Developer/Xcode/Archives/*/ | |
# Delete Devired Data | |
rm -r ~/Library/Developer/Xcode/DerivedData/*/ | |
# Delete Apple cached files | |
rm -r ~/Library/Developer/CoreSimulator/Caches/dyld/*/*/ |
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
// | |
// SortDescriptor.swift | |
// MyTubePlayer | |
// | |
// Created by Lars Stegman on 04/12/2018. | |
// Copyright © 2018 Stegman. All rights reserved. | |
// | |
import Foundation |
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
secrets/ |
NewerOlder