Skip to content

Instantly share code, notes, and snippets.

@ts95
ts95 / Dial.swift
Last active March 30, 2025 16:04
Dial component in SwiftUI
import SwiftUI
struct Dial: View {
@Binding public var value: Double
public var minValue: Double = 0
public var maxValue: Double = .greatestFiniteMagnitude
public var divisor: Double = 1
public var stepping: Double = 1
@State private var dialAngle: Angle = .zero
@State private var dialShadowAngle: Angle = .zero
@codediodeio
codediodeio / database.rules.json
Last active January 10, 2025 22:28
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@slv922
slv922 / send-msg.pl
Created March 13, 2017 06:54
Send Message to Slack Channel with curl by perl
#!/usr/bin/perl
$token = "your token";
$text = "test";
$cmd = "curl -F channel=#test -F token=\'$token\' -F text=\'$text\' -k https://slack.com/api/chat.postMessage";
system($cmd);
@jonathan-beebe
jonathan-beebe / clean_old_code_simulators.sh
Last active February 12, 2019 19:40
Clean out unused Xcode Simulators
# Close Xcode & the iOS Simulator
# http://stackoverflow.com/a/30940055
# Remove any old runtimes from this directory.
cd /Library/Developer/CoreSimulator/Profiles/Runtimes
# e.g.
sudo rm -rf iOS\ 8.1.simruntime
# http://stackoverflow.com/a/11790983
# Remove the download receipts for simulators you don't need anymore.