Below you will find pages that utilize the taxonomy term “gist”
Posts
A ChatGPT prompt generation script to summarize & review the code changes between two branches
summareview.sh #!/bin/bash # This script will help you to generate a ChatGPT prompt that you can use to summarize and review the changes between two branches. # It will prompt you for the feature branch, the branch to compare to, the ticket/story/bug description, and any additional feedback. # It will then output the changes and the prompt to a file called summareview.txt. # Get the current branch current_branch=$(git rev-parse --abbrev-ref HEAD) # Prompt for feature branch (default: current branch) read -p "Enter the feature branch to compare (default: $current_branch): " feature_branch feature_branch=${feature_branch:-$current_branch} # Prompt for branch to compare to (default: develop) read -p "Enter the branch to compare to (default: develop): " compare_branch compare_branch=${compare_branch:-develop} # Prompt for ticket/story/bug description read -p "Enter the ticket/story/bug description: " ticket_description # Prompt for additional feedback read -p "Enter any additional feedback (optional): " additional_feedback # Execute git log command and store the output in a variable git_log_output=$(git log $compare_branch.
Posts
Insert a Google Analytics sitetag in Wordpress using a constant defined in wp-config.php
First, define your Google Analytics constant in wp-config.php:
// wp-config.php /\* Google Analytics Key \*/ define('GOOGLE\_ANALYTICS\_KEY', 'G-XXXXXXXXXX'); Then, insert the following gist inside the <head> of your website (header.php in my case):
// header.php (for example) <?php if (defined('GOOGLE\_ANALYTICS\_KEY')) { ?><!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=<?php echo GOOGLE\_ANALYTICS\_KEY; ?>"></script> <script> window.dataLayer = window.dataLayer || \[\]; function gtag() { dataLayer.push(arguments); } gtag('js', new Date()); gtag('config', '<?
Posts
A very simple animated skeleton gist
Just for my own reference, I will publish the skeleton css gist image/svg+xml I use in many of my projects here. It is very easy to use and very easy to extend with new shapes. You can check the --card and --rounded modifiers image/svg+xml for inspiration.
In Sass:
.skeleton { display: inline-block; height: 1em; position: relative; overflow: hidden; background-color: #dddbdd; &::after { position: absolute; top: 0; right: 0; bottom: 0; left: 0; transform: translateX(-100%); background-image: linear-gradient( 90deg, rgba(#fff, 0) 0, rgba(#fff, 0.