Skip to content

Instantly share code, notes, and snippets.

View sotayamashita's full-sized avatar
💭
May be slow to respond

Sam Yamashita sotayamashita

💭
May be slow to respond
View GitHub Profile
@sotayamashita
sotayamashita / plist_monitor.sh
Created February 24, 2025 06:01
Monitors changes to macOS plist files by capturing the state before and after modifications. Creates a diff of the changes and saves them to a timestamped directory on the Desktop.
#!/usr/bin/env bash
#
# Monitors changes to macOS plist files by capturing the state before and after
# modifications. Creates a diff of the changes and saves them to a timestamped
# directory on the Desktop.
#
# This script is useful for:
# - Debugging preference changes for dotfiles
# - Documenting system modifications
# - Identifying what settings are modified by GUI changes
@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active April 24, 2025 07:41
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p
@sotayamashita
sotayamashita / skip-intro.js
Last active April 29, 2023 09:26
Skip intro in Netflix automatically. Complete code is https://github.com/sotayamashita/auto-skip-x
/**
* https://github.com/sotayamashita/auto-skip-x
*/
const observer = new MutationObserver((mutationList, observer) => {
const skipIntroButton = document.querySelector("button.watch-video--skip-content-button");
if (skipIntroButton) {
skipIntroButton.click();
}
});
@BekBrace
BekBrace / starship.toml
Created December 23, 2022 09:59
This is my starship.toml config file for starship ( A cross-shell prompt [love it because it's minimal] )
# Get editor completions based on the config schema
"$schema" = 'https://starship.rs/config-schema.json'
# Inserts a blank line between shell prompts
add_newline = true
# Replace the '❯' symbol in the prompt with '➜'
[character] # The name of the module we are configuring is 'character'
success_symbol = '[➜](bold green)' # The 'success_symbol' segment is being set to '➜' with the color 'bold green'
error_symbol = "[✖](bold red) "
From b5aeef5703dab7da9ebb47cc20e4c8b64f7f5866 Mon Sep 17 00:00:00 2001
From: Aaron Patterson <[email protected]>
Date: Thu, 12 Mar 2020 10:25:48 -0700
Subject: [PATCH] Fix possible XSS vector in JS escape helper
This commit escapes dollar signs and backticks to prevent JS XSS issues
when using the `j` or `javascript_escape` helper
CVE-2020-5267
---
@joshbetz
joshbetz / Webview.swift
Created February 12, 2020 15:36
A simple SwiftUI Webview
import SwiftUI
import WebKit
struct ContentView: View {
var body: some View {
Webview(url: URL(string: "https://google.com")!)
}
}
struct Webview: UIViewRepresentable {
@rylev
rylev / rust-in-large-organizations-notes.md
Last active February 2, 2023 10:08
Rust in Large Organizations Notes

Rust in Large Organizations

Initially taken by Niko Matsakis and lightly edited by Ryan Levick

Agenda

  • Introductions
  • Cargo inside large build systems
  • FFI
  • Foundations and financial support
@fabianfett
fabianfett / Change Xcode version in GitHub Actions
Created August 21, 2019 09:37
How to change the Xcode version in GitHub Actions
# Change Xcode version in GitHub Actions
As of today (2019-08-21) I haven't found any documentation on changing Xcode versions when
using GitHub actions. So I checked the applications folder and everything we need is
already there. 🤩
```
> ls -n /Applications/ | grep Xcode*
lrwxr-xr-x 1 0 80 30 Aug 2 19:31 Xcode.app -> /Applications/Xcode_10.2.1.app
drwxr-xr-x 3 501 20 96 Oct 20 2018 Xcode_10.1.app
@pAulseperformance
pAulseperformance / selenium_tools.py
Last active June 19, 2019 00:24
Useful Selenium Techniques with python
# Download entire webpage including all javascript, html, css of webpage. Replicates ctrl+s when on a webpage.
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
def save_current_page():
ActionChains(browser).send_keys(Keys.CONTROL, "s").perform()