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
extension Color { | |
static var theme: Color { | |
return Color("theme") | |
} | |
static var error: Color { | |
return Color("error") | |
} | |
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 SwiftUI | |
import Combine | |
struct ContentView: View { | |
func tick(at tick: Int) -> some View { | |
VStack { | |
Rectangle() | |
.fill(Color.primary) | |
.opacity(tick % 5 == 0 ? 1 : 0.4) |
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 SwiftUI | |
import Combine | |
struct ClockTickerModel { | |
enum TickerType { | |
case second | |
case hour | |
case minute | |
} | |
let type: TickerType |
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 SwiftUI | |
import Combine | |
final class CurrentTime: ObservableObject { | |
@Published var seconds: TimeInterval = CurrentTime.currentSecond(date: Date()) | |
private let timer = Timer.publish(every: 0.2, on: .main, in: .default).autoconnect() | |
private var store = Set<AnyCancellable>() |
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 SwiftUI | |
import Combine | |
struct ClockTickerModel { | |
enum TickerType { | |
case second | |
case hour | |
case minute | |
} | |
let type: TickerType |
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
for i in *.avi; | |
do name=`echo "$i" | cut -d'.' -f1` | |
echo "$name" | |
ffmpeg -i "$i" "${name}.mov" | |
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
#!/bin/sh | |
start_time=0:0 | |
duration=35 | |
ffmpeg -i $1 -vf palettegen palette.png | |
palette="./palette.png" | |
filters="fps=15,scale=320:-1:flags=lanczos" | |
ffmpeg -v warning -ss $start_time -t $duration -i $1 -vf "$filters,palettegen" -y $palette |
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 SwiftUI | |
struct ContentView: View { | |
private static let formatter: DateFormatter = { | |
let formatter = DateFormatter() | |
formatter.dateStyle = .short | |
formatter.timeStyle = .short | |
return formatter | |
}() | |
let likes: UInt = 10 |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>%llu Like(s)</key> | |
<dict> | |
<key>NSStringLocalizedFormatKey</key> | |
<string>%#@v1_likes@</string> | |
<key>v1_likes</key> | |
<dict> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>%llu Like(s)</key> | |
<dict> | |
<key>NSStringLocalizedFormatKey</key> | |
<string>%#@v1_likes@</string> | |
<key>v1_likes</key> | |
<dict> |