cd /path/to/backups
mysql -u root -p --default-character-set=utf8
# Switch to database
USE database_name;
SET names 'utf8';
SET autocommit=0 ;
SOURCE backup.sql;
This file contains hidden or 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
Group, Simple Search, Highlight, Shorten Text with Tooltip | |
https://jsfiddle.net/gb7aju95/91/ | |
Keyword Search, Highlight, | |
https://jsfiddle.net/bzotcxrp/92/ | |
Keyword Search, Highlight, | |
https://jsfiddle.net/bzotcxrp/200/ | |
Complete String with Keyword Search and Highlight |
This file contains hidden or 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
By default it is set to Desktop. | |
To change it, open terminal and fire the provided command. | |
---------------------------------------------------------------------- | |
defaults write com.apple.screencapture location "Your New Location" | |
---------------------------------------------------------------------- |
This file contains hidden or 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
<div id="google_translate_element"></div> | |
<script type="text/javascript"> | |
function googleTranslateElementInit() { | |
new google.translate.TranslateElement({pageLanguage: 'en'}, 'google_translate_element'); | |
} | |
</script> | |
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script> |
This file contains hidden or 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
# Step 1: You need to navigate to C:/xampp/apache/conf/extra or wherever your xampp files are located. | |
# Step 2: Edit httpd-vhosts.conf. | |
1. Remove ##<VirtualHost *:80> | |
2. Add <VirtualHost *:80> | |
DocumentRoot "c:/xampp/htdocs/project" | |
ServerName project.localhost | |
<Directory "c:/xampp/htdocs/project"></Directory> | |
</VirtualHost> | |
# Step 3: Move to C:\Windows\System32\drivers\etc\hosts file. | |
1. Add 127.0.0.1 project.localhost at the bottom and hit save. |
This file contains hidden or 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
/** Without Contact Number **/ | |
<a href="sms:?&body=message">Text Message</a> | |
/** With Contact Number **/ | |
<a href="sms:1234567890;?&body=message">Text Message</a> | |
/** Works on both Android and iOS **/ |
This file contains hidden or 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 | |
$order = new WC_Order( $order_id ); | |
foreach ( $order->get_items() as $item_key => $item ) { | |
$product = $order->get_product_from_item( $item ); | |
$sku = $product->get_sku(); | |
This file contains hidden or 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', '#delete', function () { | |
var post = $(this).parent().parent(); | |
var postID = $(this).attr('item-id'); | |
$.ajax({ | |
dataType: 'json', | |
type: 'DELETE', | |
url: 'post/'+ postID, | |
headers : {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, |
This file contains hidden or 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
$(document).ready(function () { | |
$("#field_id").keydown(function (e) { | |
if (e.shiftKey) e.preventDefault(); | |
else { | |
var nKeyCode = e.keyCode; | |
//Ignore Backspace and Tab keys | |
if (nKeyCode == 8 || nKeyCode == 9) return; | |
if (nKeyCode < 95) { | |
if (nKeyCode < 48 || nKeyCode > 57) e.preventDefault(); | |
} else { |
NewerOlder