Skip to content

Instantly share code, notes, and snippets.

@aaronbushnell
aaronbushnell / ContentView.swift
Created June 23, 2023 18:08
Keyboard bug showing whitespace upon dismissal
import SwiftUI
struct ContentView: View {
@State private var name = ""
var body: some View {
NavigationStack {
Form {
TextField("Name", text: $name)
}
@aaronbushnell
aaronbushnell / README.md
Last active February 1, 2024 20:48
🗓 Setting up omnilight/yii2-scheduling for flexible Craft task scheduling

📦 Installation

  1. Run composer require omnilight/yii2-scheduling to install the scheduling package
  2. Setup a config/schedule.php file to house your scheduled processes
  3. Modify your config/app.php to include the schedule component details to run the Craft command (instead of yii)
  4. Run php craft schedule/run --scheduleFile=@config/schedule.php to process any scheduled operations.

💡 Tip: You likely want to run php craft schedule/run --scheduleFile=@config/schedule.php on a cron job that fires every minute!

🙏 Credits

@aaronbushnell
aaronbushnell / script.js
Created October 22, 2020 12:28
Display your tracked time within Harvest in a Scriptable widget
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: stopwatch;
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: magic;
const HARVEST_ACCOUNT_ID = "";
const HARVEST_API_KEY = "";
const HARVEST_USER_ID = "";
@aaronbushnell
aaronbushnell / LocalValetDriver.php
Created November 29, 2018 15:52
Valet Driver when Craft is in the public root
<?php
class LocalValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri