Skip to content

Instantly share code, notes, and snippets.

@mazefest
mazefest / ActivityRingView.swift
Created January 21, 2024 04:49
Activity Rings
struct ActivityRingView: View {
@Binding var progress: CGFloat
var mainColor: Color = .red
var lineWidth: CGFloat = 20
var endColor: Color {
mainColor.darker(by: 15.0)
}
@levitatingpineapple
levitatingpineapple / UIFont.Features.swift
Last active August 1, 2024 10:10
SFPro Font Features
import UIKit
extension UIFont {
/// Watch [WWDC Session](https://developer.apple.com/videos/play/wwdc2015/804/).
/// [Font Feature Registry](https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html)
/// - Parameters:
/// - size: The size (in points) to which the font is scaled. This value must be greater than 0.0.
/// - weight: The weight of the font, specified as a font weight constant.
/// - features: Font features supported by SFPro
@ccqpein
ccqpein / graphic_card_switch_control.sh
Last active December 2, 2024 22:24
macOS 10.14 use pmset to control graphic card switch.
# I find this https://discussions.apple.com/thread/8160651
# but it not match my 2018 version MacBook with macos 10.14
#
# On my local, gpuswitch value is
# 0 -> does not use dedicated graphics
# 1 -> use dedicated graphics
# 2 -> switch automaticly (I guess), because 2 is default value when "automatic graphics switching" selected
# in energy in preference.
# check settings depended on charger/battery