Skip to content

Instantly share code, notes, and snippets.

View bermudalocket's full-sized avatar

bermudalocket bermudalocket

  • New York
  • 05:06 (UTC -04:00)
View GitHub Profile

$app/stores

Server stores are contextual -- they are added to the context of the root component.

import { getStores, navigating, page, updated } from "$app/stores";

getStores

@bermudalocket
bermudalocket / gitsummary.md
Last active August 4, 2022 18:26
A high-level summary of my GitHub repos

This list is generally ordered from most to least recent, though there are undoubtedly some overlaps.

⭐ - indicates a project of which I am particularly proud, typically large in scope

📚 - indicates a project with extensive public-facing documentation

✴️ - indicates a particular highlight for a project, e.g. an important choice I made, or just some sweet code

C#

Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
import PlaygroundSupport
import SwiftUI
struct ContentView: View {
@State private var userQuestions: [String] = [
"one", "two"
]
var body: some View {
@bermudalocket
bermudalocket / codeifier.js
Last active May 14, 2020 23:51
Reddit Code-ifier Script
// ==UserScript==
// @name Reddit Code-ifier
// @namespace https://*.reddit.com/*
// @version 1.0
// @description Fix up messy code formatting on Reddit.
// @author u/thebermudalocket
// @match https://*.reddit.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
import Combine
import Foundation
let preferenceKey = "com.bermudalocket.myapp"
@propertyWrapper
struct Persistable<T> {
let key: String
@bermudalocket
bermudalocket / Color+systemColors.swift
Created April 5, 2020 17:56
A Color convenience extension to make adaptable UIColors more accessible in SwiftUI.
extension Color {
static let systemRed = Color(UIColor.systemRed)
static let systemGreen = Color(UIColor.systemGreen)
static let systemTeal = Color(UIColor.systemTeal)
static let systemBlue = Color(UIColor.systemBlue)
static let systemYellow = Color(UIColor.systemYellow)
static let systemOrange = Color(UIColor.systemOrange)
static let systemPink = Color(UIColor.systemPink)
static let systemPurple = Color(UIColor.systemPurple)
static let systemIndigo = Color(UIColor.systemIndigo)

AutoHook and Simject

Setup

For the entirety of this guide we'll assume your project's name is libfoo.

To follow this tutorial exactly, you will need:

  1. Xcode 11.4 beta (sudo xcode-select -s /Applications/Xcode-beta.app);
  2. Simject installed according to its readme; and
@bermudalocket
bermudalocket / userChrome.css
Created June 16, 2019 02:01
Safari colors and tweaks for Firefox 67.0.2
/********************************************
It's fucking Safari in Firefox!!!
author: github.com/bermudalocket
*********************************************/
/* No fucking shadows. */
* {