Skip to content

Instantly share code, notes, and snippets.

View dkomando's full-sized avatar

David Komando dkomando

View GitHub Profile
@dkomando
dkomando / Gravity Forms Get Credit Card Details
Last active July 11, 2022 19:03 — forked from DeveloperWil/Gravity Forms Get Credit Card Details
Enables the credit card fields for Gravity Forms and provides a function to get the credit card details which are not available through the filter $form or $entry
<?php
/**
* Enable CC Field & Send through email or the GF Webhooks Addon.
*
* @package GF - DK Extended.
*/
/**
* Security: Block direct access.
*/
@dkomando
dkomando / .bash_alias
Last active May 11, 2018 20:43
Bash Aliases for Git
# Not working on MacOSX
# cite 'about-alias'
# about-alias 'common git abbreviations'
alias current_branch='git rev-parse --abbrev-ref HEAD'
# Aliases
alias g='git'
alias ga='git add'
alias gaa='git add --all'
@dkomando
dkomando / .bashrc
Last active November 7, 2017 17:31
Unix CLI - Line Count Function
# -----------------------------------------------
# Specific file type line count function.
# - e.g. great tool for js|css|sass|less|html
# - Tested & working on MacOSX 10.12.*
# - Requirements: Unix based OS & Git.
# Git is needed since I needed a count that
# obeys the .gitignore file.
# -----------------------------------------------
# Place this function in your ~/.bashrc file:
# Usage:
@dkomando
dkomando / AngularJS - $filter - Date Ordinal
Last active March 1, 2018 06:28
AngularJS - $filter - Date Ordinal
/*
Notes ----------------------------------------------------
Inspired By:
http://plnkr.co/edit/v2RuF72A9OPpFj5fvN8A?p=preview
My Updated Plunker Of The Inspired Code:
http://plnkr.co/edit/rkyc041jmSfzkEbqhcfL?p=preview
*/
// Callback function to remove default bio field from user profile page & re-title the section
// ------------------------------------------------------------------
// Thanks to original code found here: https://wordpress.org/support/topic/remove-the-bio-section-from-user-profile
// More reference: http://wordpress.stackexchange.com/questions/49643/remove-personal-options-section-from-profile
// Alternate examples: http://wordpress.stackexchange.com/questions/38819/how-to-remove-biography-from-user-profile-admin-page
if(!function_exists('remove_plain_bio')){
function remove_bio_box($buffer){
$buffer = str_replace('<h3>About Yourself</h3>','<h3>User Password</h3>',$buffer);
$buffer = preg_replace('/<tr class=\"user-description-wrap\"[\s\S]*?<\/tr>/','',$buffer,1);
// Place the following in your WordPress child themes function file.
// Some security is better than no security.
// ------------------------------------------------------------------
// /wp-content/themes/%YourTheme|YourChildTheme%/functions.php
// QUICK SECURITY ADDITIONS
// Remove all references of WP Version from included JS/CSS
function remove_cssjs_verz($src){
global $wp_version;
$remove_ver = array("?ver=".$wp_version,"&ver=".$wp_version,"&amp;ver=".$wp_version,"&#038;ver=".$wp_version);