Skip to content

Instantly share code, notes, and snippets.

@chrismccoy
chrismccoy / gutenberg.txt
Last active February 26, 2024 04:17
Gutenberg Resources
View gutenberg.txt
Adding wrapper to Gutenberg’s Table block
https://helloadmin.com/adding-wrapper-to-gutenbergs-table-block/
Display specific Gutenberg blocks of a post outside of the post content in the theme
https://florianbrinkmann.com/en/display-specific-gutenberg-blocks-of-a-post-outside-of-the-post-content-in-the-theme-5620/
Modifying the Markup of a Core Block
https://gutenberg.10up.com/guides/modifying-the-markup-of-a-core-block/
How to build a block editor sidebar using vanilla JavaScript
@chrismccoy
chrismccoy / restapi.txt
Last active February 2, 2024 13:01
WordPress REST API Resources
View restapi.txt
Disable REST Api without Plugins
https://rudrastyh.com/wordpress/disable-rest-api.html
Add featured image & alt text to WP REST API
https://allisontarr.com/2021/10/13/add-featured-image-alt-text-to-wp-rest-api/
Allow ALL cross origin requests to WordPress REST API
https://github.com/Shelob9/rest-all-cors
WordPress theme using Rest API and Vue.js
@chrismccoy
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 $i.zip; done
# zip up an archive of each commit