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
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();
}
});
Contributor License Agreement ("Agreement")

➜ xcrun simctl list devices --json | jq '.devices.'"com.apple.CoreSimulator.SimRuntime.iOS-14-4"[].name

iOS 14.4

"iPhone 8"
"iPhone 8 Plus"
"iPhone 11"
"iPhone 11 Pro"
"iPhone 11 Pro Max"
"iPhone SE (2nd generation)"
@sotayamashita
sotayamashita / 00_README.md
Last active August 28, 2019 08:34
How does pip call Python.

前提

$ pyenv versions
  system (2.7.16)
  2.7.0
* 3.7.0 (set by /path/to/.pyenv/version)

Python 2.7.16 が呼ばれることを期待

@sotayamashita
sotayamashita / README.md
Last active October 30, 2019 13:48
Clear Sidekiq Jobs

Required

  • Working as designed

    • Task URL
  • rspec passes

    docker-compose run --rm app rspec
  • rubocop passes

Could not find node >= 8, using 10
internal/modules/cjs/loader.js:584

    throw err;

 ^