Skip to content

Instantly share code, notes, and snippets.

View codewizard13's full-sized avatar
💭
Designing WordPress Websites

Eric L. Hepperle codewizard13

💭
Designing WordPress Websites
View GitHub Profile
@0penBrain
0penBrain / commitCount.sh
Last active July 6, 2024 13:46
The simplest way to get commit count of a GitHub repository through the API
curl -I -k "https://api.github.com/repos/:owner/:repo/commits?per_page=1" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'
### And that's all !
# I saw many fighting with finding first commit SHA or similar fancy thing.
# Here we just rely on the GH API, asking commits at 1 per page and parsing the last page number in the header of the reply (whose body only holds the last commit !)
# So this is robust and bandwidth efficient. :)
# If one want the commit count of a specific SHA, just use :
curl -I -k "https://api.github.com/repos/:owner/:repo/commits?per_page=1&sha=:sha" | sed -n '/^[Ll]ink:/ s/.*"next".*page=\([0-9]*\).*"last".*/\1/p'
@codewizard13
codewizard13 / wp-config-info-template.md
Last active June 4, 2018 16:26
Cheatsheet for configuring your WordPress website. Be prepared with all your config data in one place using this handy form template.

WordPress Website Config Info Template

By: Eric L. Hepperle (CodeWizard13)

Here are most of the items you will need to configure WordPress from scratch. Feel free to copy, share, and modify (in your own space) as much as you want. All I ask is that you credit me as the author, as per CC BY-SA 4.0

GitHub Gist for WordPress Website Config Info Template (User: codewizard13).

Item Value