Skip to content

Instantly share code, notes, and snippets.

View martylouis's full-sized avatar

Marty Thierry martylouis

View GitHub Profile
@martylouis
martylouis / acf-config.php
Last active August 29, 2015 14:07
Advanced Custom Fields 5.0 Config
<?php
/**
* Advanced Custom Fields 5.0 Config
*/
$acf_path = 'acf.php';
require_once $acf_path;
@martylouis
martylouis / .gitignore
Last active September 29, 2016 16:23
WP Engine .gitignore
node_modules
*.log
*.bak
*.swp
*~
.cvs
.DS_Store
.svn
Thumbs.db
@martylouis
martylouis / .gitattributes
Created November 3, 2014 20:07
Fix line endings - .gitattributes
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.c text
*.h text
# Declare files that will always have CRLF line endings on checkout.
*.sln text eol=crlf

Keybase proof

I hereby claim:

  • I am martylouis on github.
  • I am martylouis (https://keybase.io/martylouis) on keybase.
  • I have a public key ASAixACLhUJyQtT6yb264L0-gshVMuxXIpLaKXtnxZV9Bgo

To claim this, I am signing this object:

@martylouis
martylouis / download-website-images.js
Created October 12, 2023 22:41
Save all images on a website locally
async function selectDirectory() {
try {
const handle = await window.showDirectoryPicker();
return handle;
} catch (error) {
console.error("Error:", error);
}
}
function downloadImages(url, saveDirectoryHandle) {
@martylouis
martylouis / IllustratorKeyboardShortcuts--2024-12-09.kys
Created December 10, 2024 00:14
Custom Illustrator Keyboard Shortcuts
/Menus {
/~superScript2 {
/Context 0
/Modifiers 0
/Represent 0
/Key 0
}
/~subscript2 {
/Context 0
/Modifiers 0
@martylouis
martylouis / README.md
Last active March 10, 2025 17:18
MP3 Archive Script for WordPress

MP3 Archive Script for WordPress

A WP-CLI script to archive MP3 files from your WordPress media library, create a ZIP file of the archive, and generate detailed logs.

Overview

This script helps WordPress administrators manage large collections of MP3 files by:

  1. Finding all MP3 files in the WordPress media library
  2. Creating a dated archive in a dedicated uploads directory