Skip to content

Instantly share code, notes, and snippets.

View version-control's full-sized avatar

version-control version-control

View GitHub Profile
@version-control
version-control / index.html
Created May 7, 2020 12:30
Multiple Item Product Carousel Bootstrap 3.3.6
<div class="col-md-12 text-center"><h3>Multiple Item Product Carousel Bootstrap 3.3.6<br><a href="#">Thanks to and Refrence @Maurice and Icons8</a></h3></div>
<div class="col-md-10 col-md-offset-1">
<div class="carousel slide" data-ride="carousel" data-type="multi" data-interval="3000" id="myCarousel">
<div class="carousel-inner">
<div class="item active">
<div class="col-md-2 col-sm-6 col-xs-12"><a href="#"><img src="https://maxcdn.icons8.com/Color/PNG/96/Plants/pineapple-96.png" class="img-responsive"></a></div>
</div>
<div class="item">
<div class="col-md-2 col-sm-6 col-xs-12"><a href="#"><img src="https://maxcdn.icons8.com/Color/PNG/96/Plants/paprika-96.png" class="img-responsive"></a></div>
</div>
@version-control
version-control / gw-gravity-forms-checkbox-count.php
Created April 27, 2020 21:13 — forked from spivurno/gw-gravity-forms-checkbox-count.php
Gravity Wiz // Gravity Forms // Checkbox Count
<?php
/**
* Gravity Wiz // Gravity Forms // Checkbox Count
*
* Get the total number of checkboxes checked. Useful when wanting to apply conditional logic based on the number of
* checkboxes checked.
*
* @version 2.5
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
@version-control
version-control / gw-limit-checkboxes-usage.php
Created April 27, 2020 12:27 — forked from spivurno/gw-limit-checkboxes-usage.php
Gravity Wiz // Limit Checkboxes Usage
<?php
// standard usage
new GFLimitCheckboxes(115, array(
5 => array(
'min' => 2,
'max' => 3
)
));
@version-control
version-control / gw-gravity-forms-first-error-focus.php
Created April 27, 2020 12:25 — forked from spivurno/gw-gravity-forms-first-error-focus.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
@version-control
version-control / functions.php
Created April 27, 2020 12:23 — forked from leepettijohn/functions.php
Gravity Forms - Limit checkbox choices after chosen
<?
// Change 'XXX' to your form id
$location_form_id = XXX;
add_filter( 'gform_pre_render_'.$location_form_id, 'limit_choices' );
add_filter( 'gform_pre_validation_'.$location_form_id, 'limit_choices' );
add_filter( 'gform_pre_submission_'.$location_form_id, 'limit_choices' );
add_filter( 'gform_pre_submission_filter_'.$location_form_id, 'limit_choices' );
add_filter( 'gform_admin_pre_render_'.$location_form_id, 'limit_choices' );
function limit_choices( $form ) {

git real world commands

Checking out

Review unstaged changes

git add -p
@version-control
version-control / Dropbox-file-backup.py
Created April 12, 2020 05:58 — forked from malikalbeik/Dropbox-file-backup.py
Backup a file to dropbox using dropbox's python SDK
import sys
import dropbox
from dropbox.files import WriteMode
from dropbox.exceptions import ApiError, AuthError
import datetime
dt = datetime.datetime.today()
TOKEN = '<Replace with your Access Token>'
LOCALFILE = '<Replace with the file that you want to backup>'
# Don't forget to add the file extension at the end of BACKUPPATH.
<?php
/**
* Gravity Wiz // Gravity Forms // Email Header to Identify Notification Source
*
* You've installed Gravity Forms on a ton of sites and now you're getting a ton of notifications. The problem is there
* is no clear indicator which site is sending the notification. How frustrating!
*
* This simple plugin automatically adds a custom header that identifies the URL that generated the Gravity Forms notification.
* This is most useful when installed as an MU plugin at the start of development on each site.
*
<?php
/**
* Gravity Perks // Media Library // Set Upload Directory
* http://gravitywiz.com/documentation/gravity-forms-media-library/
*/
add_filter( 'gpml_media_data', function( $return ) {
add_filter( 'upload_dir', 'gpml_set_upload_dir' );
if( ! function_exists( 'gpml_set_upload_dir' ) ) {
function gpml_set_upload_dir( $upload_dir ) {
$upload_dir['path'] = ABSPATH . 'wp-content/uploads/paramountregistry';
<?php
/**
* Gravity Perks // eCommerce Fields // Show GPECF Fields in WooCommerce Cart Item Description
* http://gravitywiz.com/documentation/gravity-forms-ecommerce-fields/
*/
add_action( 'init', function() {
remove_filter( 'gform_pre_render', array( gp_ecommerce_fields(), 'add_wc_class_to_hide_fields_in_cart_description' ) );
}, 11 );