Skip to content

Instantly share code, notes, and snippets.

View mackenly's full-sized avatar
๐Ÿ‘จโ€๐Ÿ’ป
Focusing

Mackenly Jones mackenly

๐Ÿ‘จโ€๐Ÿ’ป
Focusing
View GitHub Profile
@mackenly
mackenly / LICENSE.txt
Created March 15, 2025 18:13
This script helps you find and automatically delete node_modules in your repos directory. Useful for cleaning out old dependency files.
Copyright ยฉ 2025 Mackenly Jones
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the โ€œSoftwareโ€), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED โ€œAS ISโ€, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
@mackenly
mackenly / wordpress-theme-action.md
Last active September 3, 2024 20:58
GitHub Action for WordPress Themes

Overview

GitHub Action yml for WordPress themes that increments versions and creates zipped releases.

Config

  • Edit zip name in Zip Repo Contents
  • Edit zip name to match in Create Release
  • Edit THEME_VERSION to the name of your version constant. Assumes that there's a version constant within the functions.php file (used for things like script versioning).
  • Remove any functionality you don't need, such as the read me editor that adds change log notes.

Extending

@mackenly
mackenly / a_file_scaffolder.md
Last active September 3, 2024 20:49
Adds a button to Windows right click menu to scaffold files

Overview

These scripts help scaffold repeated file structures. I've created this to help me when creating notes for my class modules, but you could change the names and variables to fit many different use cases.

Note

This script is for Windows. If you're on Mac or Linux the general process will be similar but with different paths, syntax, and files.

Setup

  • Create all of the files attached with this gist (except the README)
  • Edit the location of your python file in the file_creator.bat file
  • Edit the location of the bat file in create_shortcut.reg
@mackenly
mackenly / wordpress-plugin-action.yml
Last active March 1, 2024 23:31
Action for incrementing a WordPress plugin's version and zipping it into a release. Helps keep things tidy and automated.
name: Plugin Release Workflow
on:
push:
branches:
- main
jobs:
build-and-release:
timeout-minutes: 10
@mackenly
mackenly / market_research_mermaid.md
Created February 17, 2024 20:27
Example mermaid charts

Market Research Project Network

---
title: Market Research Project Network
---
classDiagram
    direction RL
    B <|-- A
 C &lt;|-- A
@mackenly
mackenly / design-system.css
Created October 19, 2023 17:47
Code Samples from King University Web Programming
/* import fonts */
@font-face {
font-family: "legacy-book";
src: url("./assets/fonts/LegacySansStd-Book.otf") format("opentype");
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
@mackenly
mackenly / install-fonts.ps1
Created September 16, 2023 03:47
Install Fonts in a Particular Folder Using a PowerShell Script
function Install-Font {
param(
[string]$fontPath
)
$shell = New-Object -ComObject Shell.Application
$folder = $shell.Namespace(0x14)
$folder.CopyHere($fontPath)
}
@mackenly
mackenly / JavaArrayTest.java
Last active June 29, 2023 23:07
Test Java primitive int vs wrapper Integer speed and memory usage
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
/**
* Class Name: Test
* Purpose: Test primitive int vs wrapper Integer speed and memory usage
*/
public class JavaArrayTest {
/**
* Method Name: main
@mackenly
mackenly / keynote-to-images.scpt
Created June 17, 2023 22:30
Apple Script for converting a Keynote file to a folder of images. To use, create an Automator application and use an Apple Script block. Save the application to your desktop and you're good to go.
on run {input, parameters}
-- Validate input
if input is {} then
display alert "No file selected!" message "Drop a file on the action to process the keynote." as warning
return
end if
-- Declare variables
set fileName to POSIX path of (input as string)
@mackenly
mackenly / sftp.yml
Last active April 15, 2023 20:36
SFTP Upload Action Template
on: push
name: ๐Ÿš€ Deploy website on push
jobs:
web-deploy:
name: ๐ŸŽ‰ Deploy
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: ๐Ÿšš Get latest code
uses: actions/checkout@v3