A collection of all of the various options and styles available to you if you'd like to format data into string on iOS 15.
See every option in detail at fuckingformatstyle.com or goshdarnformatstyle.com.
import Foundation | |
import Testing | |
func waitForExpectation( | |
timeout: Duration, | |
description: String, | |
fileID: String = #fileID, | |
filePath: String = #filePath, | |
line: Int = #line, | |
column: Int = #column, |
#!/bin/zsh -e -o pipefail | |
# THIS MAKEFILE GENERATES DOCUMENTATION FOR A PACKAGE. | |
# It assumes that your doc file is at Sources/<PackageName>/<PackageName>.docc/<PackageName>.md | |
GIT_USER := YourGitHubUser | |
PACKAGE_NAME := $(shell basename $(CURDIR)) | |
PACKAGE_NAME_LOWER := $(shell echo $(PACKAGE_NAME) | tr '[:upper:]' '[:lower:]') | |
DOCC_DIR := Sources/$(PACKAGE_NAME)/$(PACKAGE_NAME).docc | |
DOCC_FILE := $(DOCC_DIR)/$(PACKAGE_NAME).md |
import Foundation | |
import MachO.dyld | |
func readMachOHeader(path: String) { | |
guard let data = try? Data(contentsOf: URL(fileURLWithPath: path)) else { | |
print("Failed to read file") | |
return | |
} | |
data.withUnsafeBytes { rawBufferPointer in |
#!/opt/homebrew/bin/python3 | |
import re | |
import glob | |
import os | |
import graphviz | |
import sys | |
## USAGE ######################################################################### |
/* | |
Sessions: | |
- Meet Swift Testing | |
https://www.youtube.com/watch?v=WFnkNcvLnCI | |
- Go further with Swift Testing | |
https://www.youtube.com/watch?v=bOvWGHi-BxI | |
There are three assertions that replace all XCTAssert functions: |
A collection of all of the various options and styles available to you if you'd like to format data into string on iOS 15.
See every option in detail at fuckingformatstyle.com or goshdarnformatstyle.com.
# install mac whisper | |
brew install python3 ffmpeg | |
pip install setuptools-rust | |
pip install -U openai-whisper | |
# create a script to extract audio and translate | |
for f in *.mp4; do FILE=`basename -s '.mp4' "$f"`; echo ffmpeg -i "\"$f\"" -vn -acodec copy "\"$FILE.aac\"" >> script.sh; done | |
for f in *.mp4; do FILE=`basename -s '.mp4' "$f"`; echo whisper "\"$FILE.aac\"" --language Spanish --model medium --task transcribe >> script.sh; done | |
# run the script. on M1 max this is several times slower than the audio being translated |
name: myproject | |
options: | |
bundleIdPrefix: com.myproject | |
usesTabs: false | |
indentWidth: 4 | |
tabWidth: 4 | |
createIntermediateGroups: true | |
deploymentTarget: | |
iOS: "14.5" |