This file contains 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
//clone the form submit button for the form | |
var save_btn = jQuery('#gform_submit_button_2').clone(); | |
//change the label of the midway submit button | |
save_btn.val('Save and Submit'); | |
//get the ID of the gravity form | |
var gravity_form = jQuery('#gform_submit_button_2').closest('form'); | |
var gravity_form_id = gravity_form.attr('id'); | |
gravity_form_id = gravity_form_id.split("_"); | |
gravity_form_id = gravity_form_id[1]; | |
//get the last page of the form |
This file contains 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
sudo nginx -s reload | |
sudo service php7.0-fpm restart |
This file contains 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
& cmd.exe /c "mysql -u root -p -h localhost < myql_database.sql" |
This file contains 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
{ | |
"templateParts": { | |
"header": { | |
"area": "header" | |
}, | |
"footer": { | |
"area": "footer" | |
} | |
}, | |
"settings": { |
This file contains 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
http://www.webmaster.net/how-install-mongodb-centos-6x-or-whm-server | |
http://linuxdiviner.wordpress.com/2012/07/25/compile-and-install-php-module-without-easyapache-on-cpanel-servers/ | |
1. cd /etc/yum.repos.d | |
2. vi mongodb.repo | |
3. Add this code to file | |
[mongodb] | |
name=MongoDB Repo | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ | |
gpgcheck=0 |
This file contains 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
//http://stackoverflow.com/questions/359788/how-to-execute-a-javascript-function-when-i-have-its-name-as-a-string | |
// http://www.sitepoint.com/call-javascript-function-string-without-using-eval/ | |
function executeFunctionByName(functionName, context, args) { | |
var args = [].slice.call(arguments).splice(2); | |
var namespaces = functionName.split("."); | |
var func = namespaces.pop(); | |
for(var i = 0; i < namespaces.length; i++) { | |
context = context[namespaces[i]]; | |
} | |
return context[func].apply(this, args); |
This file contains 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
# MariaDB is throwing an error when attempting to use variables. You will have to hardcode the database tables | |
SET @username = 'YOUR_USER_NAME'; | |
SET @password = 'YOUR_PASSWORD'; | |
SET @nicename = 'YOUR_NICENAME'; | |
SET @email_address = 'YOUR_EMAIL_ADDRESS'; | |
SET @fullname = 'YOUR_FULL_NAME'; | |
SET @wpdb_prefix = 'wp_'; | |
SET @wpdb_users_table = CONCAT(@wpdb_prefix,'', 'users'); | |
SET @wpdb_usermeta_table = CONCAT(@wpdb_prefix,'', 'usermeta'); |
This file contains 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
$( window ).on( 'resize', debounce( function () { | |
var $header = $('.site-header'); | |
$.each($('.content-section.type-hero'), function (index, node) { | |
var $hero = $(node); | |
$hero.css('height', 'calc(100vh - ' + $header.height() + 'px)'); | |
}); | |
} ) ); | |
function debounce( func, wait, immediate ) { | |
var timeout; |
This file contains 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
/** | |
Run as a bookmarklet in your browser. Run in the WordPress admin area. Set the WordPress admin posts view number really high from the default 20 posts to something like 500 posts to decrease the number of times we need to run this. | |
Make sure to disable your browser's popup blocker since this will open a LOT of windows. | |
Update the featured image of all of the posts that in the WordPress admin on the Posts table page | |
*/ | |
(function() { | |
/*Check if a value is a positive, whole number integer*/ | |
function isNormalInteger(str) { |