This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit: https://stackoverflow.com/a/63473832/8143105 | |
# Make sure you're running PowerShell as an Administrator | |
Set-Service ssh-agent -StartupType Automatic | |
Start-Service ssh-agent | |
Get-Service ssh-agent | |
ssh-add | |
# Enter password | |
code # Or open regularly - should now have your SSH key pre-loaded into env as expected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Instructions: add a "look-required" class to the field you want to look required */ | |
.look-required label:after { | |
content: ' (Required)'; | |
color: red; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gravity Wiz // Gravity Forms // Automatically Submit After X Number of Characters Entered Into Field | |
* https://gravitywiz.com/ | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. | |
* https://gravitywiz.com/gravity-forms-custom-javascript/ | |
* 2. Replace "1" with the ID of your field, and "4" with the number of characters you want to limit it to. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function delete_all_subscribers() { | |
require_once(dirname( ABSPATH ) . '/public_html/wp-admin/includes/user.php'); | |
$args = array( | |
'role' => 'subscriber', | |
); | |
$users = get_users( $args ); | |
foreach ( $users as $user ) { | |
wp_delete_user($user->id); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gravity Wiz // Gravity Forms // Disable Field or Subfield | |
* https://gravitywiz.com/ | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. | |
* https://gravitywiz.com/gravity-forms-custom-javascript/ | |
* 2. Replace "1_2" with the ID of your field and the sub-field ID (in the case of an address field, for example), | |
* or replace the "1_2" with your field id only, if it's a single field. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Instructions: adjust the URL of the report based on your needs, then copy/paste this code into the "URL" field of a | |
* fresh browser bookmark. Whenever you click it, it will automatically ensure the date range is set to "this week". | |
*/ | |
javascript: (() => { | |
let currentDate = new Date(); | |
currentDateIso = currentDate.toISOString().split('T')[0]; | |
/* Get the Monday of this week; credit: https://stackoverflow.com/a/4156516 */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gravity Wiz // Gravity Forms // Restrict Number Field to X Number of Characters | |
* https://gravitywiz.com/ | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. | |
* https://gravitywiz.com/gravity-forms-custom-javascript/ | |
* 2. Replace "1" with the ID of your number field, and "4" with the number of characters you want to limit it to. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Gravity Wiz // Gravity Forms // Check For Duplicate Values Between a Set of Fields | |
* https://gravitywiz.com/ | |
* | |
* Checks for duplicate values between a set of fields. Can be used to create a manual "rank these" setup | |
* using dropdown fields. | |
* | |
* Instructions: | |
* Update "123" to your form ID, "4" to the field ID of the last field that you want to check for duplicate values, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Gravity Wiz // Gravity Forms // Allow Selecting Days From Another Month in Datepicker | |
* https://gravitywiz.com/ | |
* | |
* Allow days from other months to be selectable in the calendar view. | |
* | |
* Instructions: | |
* | |
* 1. Install this snippet with our free Custom JavaScript plugin. | |
* https://gravitywiz.com/gravity-forms-custom-javascript/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.onload = function() { | |
setTimeout(function(){ | |
if(!window.location.hash) { | |
window.location = window.location + '#loaded'; | |
window.location.reload(); | |
} else { | |
document.querySelector('body').classList.add('reloaded'); | |
} | |
}, 5000); // Time to wait in milliseconds. Change as needed |