Skip to content

Instantly share code, notes, and snippets.

View charliewilco's full-sized avatar
🐦
swiftly

𝕮𝖍𝖆𝖗𝖑𝖎𝖊 ⚡️ charliewilco

🐦
swiftly
View GitHub Profile
@cameroncooke
cameroncooke / AGENTS.md
Last active May 10, 2026 09:38
My global agents file tailed for self-improvement

AGENTS.md

Persona

  • Address the user as Cam.
  • Optimize for correctness and long-term leverage, not agreement.
  • Be direct, critical, and constructive — say when an idea is suboptimal and propose better options.
  • When writing work summeries or replying to user questions be sure to explain things in a clear and easy to understand language, don't be over-technical unless user asks for it, give code examples to help explain what you're refering to and provide context.

Quality

  • Inspect project config (package.json, etc.) for available scripts.
@pixelmatrix
pixelmatrix / ShaderLibrary+Convenience.swift
Created October 9, 2025 18:05
Pre-compile Metal shaders to avoid Xcode 26 CI issues
import SwiftUI
extension ShaderLibrary {
// Important: Cache this instance. Initializing it is expensive.
static let library: ShaderLibrary = {
// Make sure to use the right binary based on the target
#if targetEnvironment(simulator)
let filename = "Shaders-iphonesimulator"
#else
let filename = "Shaders-iphoneos"
@arunavo4
arunavo4 / gist:8eedb035ce6565cbc74038537a57a6d7
Last active February 27, 2026 07:49
Toolbar search Swift UI iOS 26
//
// TestView.swift
//
// Created by Arunavo Ray on 21/09/25.
//
import SwiftUI
struct TestView: View {
@State private var searchText = ""
/*
* BorrowMap: (possibly) zero-copy mutable data structure in a react context
* =========================================================================
*
* The idea behind this concept is that we can have a mutable container in a
* React-linked store but ONLY IF we never share a reference to the mutable
* container itself. All the reads must be contained inside selectors. As long
* as no one has a second reference to the mutable container, then we are sure
* that no one is able to read/write it without us knowing.
*
@awni
awni / llms_on_ios.md
Last active April 29, 2026 17:38
A step-by-step guide to run an LLM on an iPhone with MLX Swift
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@sebmarkbage
sebmarkbage / WhyReact.md
Created September 4, 2019 20:33
Why is React doing this?

I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.

I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.

"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr

@nebrius
nebrius / typescript-setup.md
Last active May 13, 2023 01:07
Instructions for configuring TypeScript for Node.js

This gist will walk you through configuring your Node.js Project so that you can write your code in TypeScript using Visual Studio Code. These isntructions were written for attendees at Microsoft Build doing a super secret thing I can't talk about (ooo, the suspense!), but they also will work for any Node.js project written in TypeScript.

Before we get started configuring TypeScript, we need to initialize a new Node.js project. If you have not already installed Node.js, please head over to nodejs.org and install the latest LTS version of Node.js. Once this is done, create a folder for your Node.js project and open a terminal in this folder. In the terminal, run the command:

npm init

This command will ask you a series of questions. You can use the defaults for each question here because they don't really matter. These only matter if you intend to publish your module to [npmjs.com](htt

# - title:
# subtitle:
# author:
# img: https://images-na.ssl-images-amazon.com/images/P/#.01._SCLZZZZZZZ_.jpg
# url:
# rating:
# notes:
- year: 2018
books:
- title: Showa 1953-1989
@bradcerasani
bradcerasani / overcast.fm.js
Created September 17, 2014 15:13
Enable play/pause with spacebar on Overcast.fm [requires dotjs]
// requires https://github.com/defunkt/dotjs
var player = $('#audioplayer').get(0);
$(document).keypress(function(e) {
if(e.which == 32) {
if (player.paused) {
player.play();
} else {
player.pause();
}