Skip to content

Instantly share code, notes, and snippets.

chrismccoy / gutenberg.txt
Last active February 26, 2024 04:17
Gutenberg Resources
View gutenberg.txt
Adding wrapper to Gutenberg’s Table block
Display specific Gutenberg blocks of a post outside of the post content in the theme
Modifying the Markup of a Core Block
How to build a block editor sidebar using vanilla JavaScript
chrismccoy / restapi.txt
Last active February 2, 2024 13:01
WordPress REST API Resources
View restapi.txt
Disable REST Api without Plugins
Add featured image & alt text to WP REST API
Allow ALL cross origin requests to WordPress REST API
WordPress theme using Rest API and Vue.js
chrismccoy / gitcheats.txt
Last active January 19, 2024 22:17
git cheats
View gitcheats.txt
# clone all your repos with gh cli tool
gh repo list --json name -q '.[].name' | xargs -n1 gh repo clone
# List all files in a folder in a git repository by last commit date
git ls-tree --name-only HEAD | while read filename; do echo "$(git log -1 --format="%ci " -- $filename) $filename"; done | sort -r
# zip up an archive of each commit
for i in `git log --format=%H`; do git archive $i --format=zip -o $; done
# zip up an archive of each commit