Skip to content

Instantly share code, notes, and snippets.

@esco
esco / ARCHITECTURAL_PRINCIPLES.md
Created June 9, 2025 17:53
Architectural guidance provided to Claude Code CLI for building yugioh game engine with prompts

System Prompt: Architectural Principles to Code By

Use rg tool to search for files efficiently

Core Principles

  1. Clean, Simple, Maintainable Code
    • Favor readability over cleverness
    • Prioritize simplicity in design
  • Write code that future developers can easily understand
@allindeveloper
allindeveloper / arrays101
Last active February 6, 2020 21:51
Array Assignment for VGG VIRTUAL INTERNSHIP
QUICK SIMPLE ASSIGNMENT
1.
We have the following arrays
color = ["Blue ", "Green", "Red", "Orange", "Violet", "Indigo", "Yellow "];
o = ["th","st","nd","rd"]
Write a JavaScript program to display the colors in the following way :
"1st choice is Blue."
"2nd choice is Green."
@bjoerge
bjoerge / recover-schema.md
Last active June 17, 2025 12:58
How to recover lost schema from *.sanity.studio.md

First, go to https://<yourname>.sanity.studio (or to the url of your studio if it's hosted elsewhere). Then open the developer console (usually by one of the keyboard shortcuts Command+Option+I, F12 or Control+Shift+I depending on what browser/platform you are using)

Steps

  1. Open the Sources tab
  2. Find the app.bundle.js file in the sidebar tree view.
  3. Hit the pretty print source button
  4. Locate your schema types by searching (e.g. try searching for one of your custom types) it in the source view.
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 1, 2025 00:35
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@dingzeyuli
dingzeyuli / check_github_repo_size
Created December 16, 2016 22:34
Check the size of a github repo before downloading
# http://webapps.stackexchange.com/questions/39587/view-estimated-size-of-github-repository-before-cloning
# tested on macOS
echo https://github.com/torvalds/linux.git | perl -ne 'print $1 if m!([^/]+/[^/]+?)(?:\.git)?$!' | xargs -I{} curl -s -k https://api.github.com/repos/'{}' | grep size
# output:
# "size": 1746294,
@paulirish
paulirish / what-forces-layout.md
Last active July 29, 2025 15:35
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@staltz
staltz / introrx.md
Last active July 31, 2025 06:33
The introduction to Reactive Programming you've been missing