Skip to content

Instantly share code, notes, and snippets.

View VladislavSmolyanoy's full-sized avatar
🥷
Pushing the boundaries!

Vladislav Smolyanoy VladislavSmolyanoy

🥷
Pushing the boundaries!
View GitHub Profile
@t3dotgg
t3dotgg / model-prices.csv
Last active July 14, 2025 11:51
Rough list of popular AI models and the cost to use them (cost is per 1m tokens)
Name Input Output
Gemini 2.0 Flash-Lite $0.075 $0.30
Mistral 3.1 Small $0.10 $0.30
Gemini 2.0 Flash $0.10 $0.40
ChatGPT 4.1-nano $0.10 $0.40
DeepSeek v3 (old) $0.14 $0.28
ChatGPT 4o-mini $0.15 $0.60
Gemini 2.5 Flash $0.15 $0.60
DeepSeek v3 $0.27 $1.10
Grok 3-mini $0.30 $0.50
@goodones-mac
goodones-mac / VideoPlayerAlphaView.swift
Last active February 14, 2024 08:48
This lets you play a HEVC-with-alpha file on repeat and put it in as a SwiftUI view as a much smaller alternative to GIF files. This code is released into the public domain with no warranties, use as you like. Due to it being a SKView, not a UIView you can hypothetically use this within MacOS & iOS without many changes.
import AVFoundation
import SpriteKit
import SwiftUI
@MainActor
class TransparentBackgroundVideoPlayerUIView: SKView {
let backgroundNode: SKSpriteNode
let videoPlayer: AVPlayer
let videoNode: SKVideoNode
let url: URL
@zats
zats / ContentView.swift
Last active May 12, 2025 09:14
Internal SF Symbols
struct ContentView: View {
var body: some View {
let names = [
["appstore.app.dashed", "buildings.3d", "emoji.chicken.face"],
["person.text.rectangle.and.nfc", "secure.element", "laugh.bubble.tapback.2.he"],
["apple.news", "apple.podcasts.square.stack", "apple.slice"],
]
VStack(spacing: 20) {
Grid(horizontalSpacing: 20, verticalSpacing: 20) {
ForEach(names, id: \.self) { nameRow in
@jav-solo
jav-solo / sliding-icons-demo.swift
Last active January 27, 2025 06:37
Drag to re-order icons Playgrounds demo
import SwiftUI
import PlaygroundSupport
struct InspectorSidebarToolbarTop: View {
@State var targeted: Bool = true
@State private var icons = [
InspectorDockIcon(imageName: "doc", title: "File Inspector", id: 0),
InspectorDockIcon(imageName: "clock", title: "History Inspector", id: 1),
InspectorDockIcon(imageName: "questionmark.circle", title: "Quick Help Inspector", id: 2)
@HereOrCode
HereOrCode / notification.swift
Created November 8, 2021 02:18
Deliver an OSX notification with Swift
// Remember: import UserNotifications
func sendNotification(title: String, body: String = "") {
let content = UNMutableNotificationContent()
content.title = title
if body.count > 0 {
content.body = body
}