Skip to content

Instantly share code, notes, and snippets.

View rickcompsys's full-sized avatar

Rick Fugatt rickcompsys

View GitHub Profile
@glueckpress
glueckpress / wp-rocket-custom.php
Created December 31, 2015 10:25
[WordPress][WP Rocket] Boilerplate for a custom functionality (MU) plugin.
<?php
/**
* Plugin Name: Your Custom Functionality Plugin
* Description: Short description of your plugin here.
* Author: your name here
* License: GNU General Public License v3 or later
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/
// Basic security, prevents file from being loaded directly.
@ducas
ducas / Create-Administrator.ps1
Last active January 15, 2025 08:20
Create a local administrator account using PowerShell
$Username = "su"
$Password = "password"
$group = "Administrators"
$adsi = [ADSI]"WinNT://$env:COMPUTERNAME"
$existing = $adsi.Children | where {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username }
if ($existing -eq $null) {
@renventura
renventura / remove-divi-project-post-type.php
Last active January 30, 2025 20:28
Remove the Projects Post Type from Divi by Elegant Themes
<?php //* Mind this opening php tag
/**
* This will hide the Divi "Project" post type.
* Thanks to georgiee (https://gist.github.com/EngageWP/062edef103469b1177bc#gistcomment-1801080) for his improved solution.
*/
add_filter( 'et_project_posttype_args', 'mytheme_et_project_posttype_args', 10, 1 );
function mytheme_et_project_posttype_args( $args ) {
return array_merge( $args, array(
'public' => false,
@loneaggie
loneaggie / gist:3237136
Created August 2, 2012 13:32
Contact Form 7 State Dropdown
[select* selectedState
"Alabama|AL" "Alaska|AK" "Arizona|AZ" "Arkansas|AR"
"California|CA" "Colorado|CO" "Connecticut|CT" "Delaware|DE"
"Washington DC|DC" "Florida|FL" "Georgia|GA" "Hawaii|HI"
"Idaho|ID" "Illinois|IL" "Indiana|IN" "Iowa|IA" "Kansas|KS"
"Kentucky|KY" "Louisiana|LA" "Maine|ME" "Maryland|MD"
"Massachusetts|MA" "Michigan|MI" "Minnesota|MN" "Mississippi|MS"
"Missouri|MO" "Montana|MT" "Nebraska|NE" "Nevada|NV"
"New Hampshire|NH" "New Jersey|NJ" "New Mexico|NM" "New York|NY"
"North Carolina|NC" "North Dakota|ND" "Ohio|OH" "Oklahoma|OK"