How to use:
./wordle.sh
Or try the unlimit mode:
### | |
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places. | |
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of | |
###. things to watch out for: | |
### - Check out the `nix-darwin` instructions, as they have changed. | |
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026 | |
### | |
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs). | |
# So here's a minimal Gist which worked for me as an install on a new M1 Pro. |
import SwiftUI | |
func `let`<Value, Return>(_ expression: Value, body: (Value) -> Return) -> Return { | |
body(expression) | |
} | |
struct ContentView: View { | |
var body: some View { | |
GeometryReader { geometry in | |
`let`(geometry.size.width / 2) { lineWidth in |
Tired of spamming Yubikey one-time password (OTP) codes into Slack? Here are two options to help prevent that. You can do either or both. Both require ykman
, the Yubikey CLI configuration manager. Get it with Homebrew:
brew install ykman
If you…
"""ledger journal parser | |
We use this to parse the ledger file because we want to preserve the | |
exact format of the file including spaces, etc. It maps the parsed | |
transaction to the origin lines of the file. | |
""" | |
import ledger | |
func SineEaseInOutLinearAverage(x: Double) -> Double { | |
var easeInOutSine = ((cos(M_PI * x) - 1) / -2) | |
return (easeInOutSine + x) / 2 | |
} | |
func ShadingFunctionCreate(startColor: NSColor, _ endColor: NSColor, _ slopeFunction: (Double) -> Double) -> (UnsafePointer<CGFloat>, UnsafeMutablePointer<CGFloat>) -> Void { | |
return { inData, outData in | |
let q = CGFloat(slopeFunction(Double(inData[0]))) | |
outData[0] = startColor.redComponent + (endColor.redComponent - startColor.redComponent) * q | |
outData[1] = startColor.greenComponent + (endColor.greenComponent - startColor.greenComponent) * q |
# 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. |