Skip to content

Instantly share code, notes, and snippets.

@spivurno
spivurno / gw-gravity-forms-prevent-duplicate-submissions.php
Last active December 3, 2021 14:58
Gravity Wiz // Gravity Forms // Prevent Duplicate Submissions from Double Clicks
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-prevent-duplicate-submissions.php
*/
/**
* Gravity Wiz // Gravity Forms // Prevent Duplicate Submissions from Double Clicks
* http://gravitywiz.com/
*/
@spivurno
spivurno / gw-gravity-forms-first-error-focus.php
Last active October 23, 2023 15:33 — forked from hirejordansmith/add-cursor-focus-first-gf-field-validation-error-all-forms.php
Gravity Wiz // Gravity Forms // Give First Validation Error Focus
<?php
/**
* Gravity Wiz // Gravity Forms // Give First Validation Error Focus
* http://gravitywiz.com/
*
* Plugin Name: Gravity Forms First Error Focus
* Plugin URI: https://gravitywiz.com/make-gravity-forms-validation-errors-mobile-friendlyer/
* Description: Automatically focus (and scroll) to the first field with a validation error.
* Author: Gravity Wiz
* Version: 1.1
@spivurno
spivurno / gw-gravity-forms-append-admin-label-field-settings.js
Last active July 23, 2017 11:26
Gravity Wiz // Gravity Forms // Append Admin Label to Field Settings Toolbar (via Browser Console)
/**
* Gravity Wiz // Gravity Forms // Append Admin Label to Field Settings Toolbar (via Browser Console)
*
* Provides a simple function for appending the field's admin label to the field settings toolbar.
*
* @version 1.0
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/
*
@spivurno
spivurno / gp-preview-submission-display-filename.php
Created March 14, 2017 13:36
Gravity Perks // GP Preview Submission // Display Filename for File Upload Fields
<?php
/**
* Gravity Perks // GP Preview Submission // Display Filename for File Upload Fields
* http://gravitywiz.com/documentation/gravity-forms-preview-submission/
*/
add_filter( 'gpps_special_merge_tags_value_fileupload', function( $value, $field, $input_id, $modifier, $form, $entry ) {
if( ! $field->multipleFiles ) {
$input_name = 'input_' . str_replace( '.', '_', $field->id );
$file_info = GFFormsModel::get_temp_filename( $form['id'], $input_name );
@spivurno
spivurno / gw-gravity-forms-validate-current-password.php
Last active October 13, 2021 14:39
Gravity Wiz // Gravity Forms // Validate Current Password
<?php
/**
* Gravity Wiz // Gravity Forms // Validate Current Password
* http://gravitywiz.com/
*/
// update "123" to your form ID, update "6" to your Password field ID
add_filter( 'gform_field_validation_1639_1', function( $result, $value ) {
$user = wp_get_current_user();
if ( ! wp_check_password( $value, $user->data->user_pass, $user->ID ) ) {
$result['is_valid'] = false;
@spivurno
spivurno / gp-copy-cat-gppc_copied_value.html
Created May 12, 2017 01:37
Gravity Perks // GP Copy Cat // Modify Copied Value
<script type="text/javascript">
// [email protected] => gravitywiz.com
gform.addFilter( 'gppc_copied_value', function( value, $elem, data ) {
if( data.target == 2 && value ) {
value = value.split( '@' )[1];
}
return value;
} );
@spivurno
spivurno / gw-gravity-forms-populate-form.php
Last active July 22, 2025 06:51
Gravity Wiz // Gravity Forms // Populate Form with Entry (Optionally Update Entry on Submission)
<?php
/**
* Gravity Wiz // Gravity Forms // Populate Form with Entry (Optionally Update Entry on Submission)
*
* Pass an entry ID and populate the form automatically. No form configuration required. Optionally update the entry on
* submission.
*
* @version 1.5
* @author David Smith <[email protected]>
* @license GPL-2.0+
@spivurno
spivurno / gw-gravity-forms-shortcode-attr-field-props.php
Last active October 26, 2021 15:27
Gravity Wiz // Gravity Forms // Custom Field Properties via [gravityforms] Shortcode
<?php
/**
* WARNING! THIS SNIPPET MAY BE OUTDATED.
* The latest version of this snippet can be found in the Gravity Wiz Snippet Library:
* https://github.com/gravitywiz/snippet-library/blob/master/gravity-forms/gw-shortcode-attr-field-props.php
*/
/**
* Gravity Wiz // Gravity Forms // Custom Field Properties via [gravityforms] Shortcode
*
* Provide a custom "field_groups" attribute for the [gravityforms] shortcode. This allows you to modify field
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
unxz wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar
mv wkhtmltox/bin/* /usr/local/bin/
rm -rf wkhtmltox
rm -f wkhtmltox-0.12.4_linux-generic-amd64.tar
@dborin
dborin / jira_letsencrypt.md
Last active February 3, 2024 10:09
HOWTO Configure Atlassian Jira to use Letsencrypt certificate

HOWTO Configure Atlassian Jira to use Letsencrypt certificate with default Tomcat

This is a primer for installing a Letsencrypt certificate on a Jira server that is running the Jira provided, default Tomcat for serving webpages.

I found lots of information about how to do it using a free-standing Tomcat or nginx, but nothing about this particular combination. I hope it helps you!

Obviously, in all the examples, you need to replace jira.example.com with your own domain! And (duh) you need to use your own password, not 1234

You need to have installed Java (outside the scope of this document). Then in your user's shell RC file and probably root's RC file, add