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
Import Command | |
-------------- | |
mysql -u [username] -p -e "create database [databasename];" | |
mysql -u[username] -p [databasename] < [.sql filename] | |
Export Command | |
-------------- | |
mysqldump -u [username] -p [databasename] > [output path] |
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
$(‘body').on('click','#id',function(){ | |
var btn = $('.class'); | |
jQuery.post().complete(function(){ | |
btn.prop('disabled', false); | |
}); | |
btn.prop('disabled', true); | |
}); |
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
global $wp_query; // get the query object | |
$cat_obj = $wp_query->get_queried_object(); | |
$value = get_field('field_name',$cat_obj->taxonomy.'_'.$cat_obj->term_id); |
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
*********************************************** | |
PHP CODE (add it in your theme's functions.php)* | |
*********************************************** | |
function insert_jquery_validate(){ | |
wp_enqueue_script('validate', 'http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js', array( 'jquery' ), false, true ); | |
} | |
add_filter('wp_enqueue_scripts','insert_jquery_validate'); | |
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
# install command | |
$ brew install node | |
# to check if node is installed | |
$ node -v | |
# to check if npm is installed | |
$ npm -v | |
# to make sure HomeBrew has latest version of node packages |
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
<script> | |
jQuery(document).ready(function($){ | |
$('#subjects option').click(function() | |
{ | |
var items = $(this).parent().val(); | |
if (items.length > 2) { | |
alert("You can only select 2 values at a time"); | |
$('#subjects option:selected').prop("selected",false); | |
} |
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
// Create your html structure | |
<div id= "root"> | |
<input type= "text" id= "input"> | |
<button v-on:click= "addname" >AddName</button> | |
</div> | |
OR |
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
var customerName = $('#billing_first_name').val(); | |
var noteCharacter = 0; | |
var billingName = "you"; | |
var time = $('body > div.container.page-container > div > ul > li > div > span').text().replace(':', ''); | |
$("#shipping_myfield12").val(''); |
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
$(".coupon-env").addClass("coupon-visible"); | |
$(".coupon > .btn-primary").val("APPLY DISCOUNT"); | |
$(".sidebar_zip_code_checker_error").html("Your target is out of our area. Sorry.") | |
$("#coupon_code").attr("placeholder", "enter discount"); | |
$(".cart_totals h2").html("BASKET TOTALS"); |
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
// Aliases for git commands can be created by the following two methods. | |
/***************************************************************************** | |
1. Add lines to ~/.gitconfig | |
[alias] | |
st = status | |
cm = commit -m | |
/***************************************************************************** |
OlderNewer