Skip to content

Instantly share code, notes, and snippets.

View Sean12mps's full-sized avatar
☀️

Sean Michael Piettojo Sean12mps

☀️
View GitHub Profile
@Sean12mps
Sean12mps / .cursorindexingignore
Created March 2, 2025 17:00
Cursor index ignore for WP projects in Local by Flywheel
# WordPress core files
app/public/wp-admin/
app/public/wp-includes/
app/public/wp-content/upgrade/
app/public/wp-content/uploads/
app/public/wp-content/cache/
app/public/wp-content/themes/
app/public/wp-content/mu-plugins/
app/public/wp-content/languages/
@Sean12mps
Sean12mps / github\actions\setup-runner\action.yml
Last active February 9, 2023 14:20
Deploy Theme or Plugin to Pantheon from Github
name: "Setup Runner"
description: "Provides SSH, PHP, Terminus as a composite action"
inputs:
pantheon_ssh_key:
description: 'Pantheon SSH Private key in the PEM format.'
required: true
pantheon_machine_token:
description: 'Pantheon Machine Token for Terminus.'
required: true
#Rename multiple files
---------------------
$i = 1;
$name = 'foobar';
$ext = 'jpg';
foreach ( $file in gci ) {
Rename-Item $file ( "$name-$i.$ext" );
$i++;
}
@Sean12mps
Sean12mps / gravity-form-restrict-entry.php
Last active November 16, 2021 13:51
Restrict entry for GF forms per user. 1 form, 1 entry per user.
<?php
/**
* Gravity Forms functions
*
* @package @WordPress
*/
/**
* Get list of form IDs to restrict.
*
@Sean12mps
Sean12mps / .editorconfig
Created March 16, 2021 08:27
This file is for unifying the coding style for different editors and IDEs
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
@Sean12mps
Sean12mps / docker-compose.yml
Created February 17, 2021 09:03
Just my newbie attempt at WordPress docker-compose file. Working with WSL2, Docker, and Visual Studio Code.
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: wordpress
@Sean12mps
Sean12mps / vscode_php.code-snippets
Created May 8, 2020 08:24
Just some helper snippets I'm using in VSCode when working with PHP files.
{
"php": {
"prefix": "php",
"body": [
"<?php $1 ?>"
],
"description": "php tag"
},
"vd": {
"prefix": "vd",
@Sean12mps
Sean12mps / class-app-acf-folder-manager.php
Last active February 15, 2024 06:41
Use Advanced Custom Fields local json only for selected field group IDs.
<?php
if ( ! defined( 'ABSPATH' ) ) exit;
class App_ACF_Folder_Manager {
/* Local path of JSON folder.
*
*/
private $path;
@Sean12mps
Sean12mps / class-wa-link-converter.php
Created May 8, 2019 20:14
WhatsApp Link Converter
@Sean12mps
Sean12mps / class-template.php
Created August 25, 2017 17:17
PHP Class Template
<?php
/**
* Core class.
*
* @since 1.0.0
*/
class Clockworks {
/**