Skip to content

Instantly share code, notes, and snippets.

View khoimm92's full-sized avatar
🏠
Working from home

Khoi Ngo khoimm92

🏠
Working from home
View GitHub Profile
@e-cloud
e-cloud / README.md
Last active April 11, 2023 14:24
Install mysql 8.0 on wsl
wget -c "https://gist.github.com/e-cloud/34acbefe0597a02f9a081a01eff6dd24/raw/3bad7148f60ab70659b0be14ef07b0bd4d019f62/install-mysql8-on-wsl.sh" install-mysql8-on-wsl.sh
chmod 740 install-mysql8-on-wsl.sh
./install-mysql8-on-wsl.sh
@markshust
markshust / catalog_dump.sql
Created March 7, 2019 23:57
magento2 dump all catalog tables
mysqldump -h db -umagento -pmagento magento catalog_category_entity catalog_category_entity_datetime catalog_category_entity_decimal catalog_category_entity_int catalog_category_entity_text catalog_category_entity_varchar catalog_category_product catalog_category_product_cl catalog_category_product_index catalog_category_product_index_replica catalog_category_product_index_store1 catalog_category_product_index_store1_replica catalog_category_product_index_store2 catalog_category_product_index_store2_replica catalog_category_product_index_store7 catalog_category_product_index_store7_replica catalog_category_product_index_tmp catalog_compare_item catalog_eav_attribute catalog_product_attribute_cl catalog_product_bundle_option catalog_product_bundle_option_value catalog_product_bundle_price_index catalog_product_bundle_selection catalog_product_bundle_selection_price catalog_product_bundle_stock_index catalog_product_category_cl catalog_product_entity catalog_product_entity_datetime catalog_product_entity_decima
export default function share(social, text, url, image) {
if (social !== "fb" && social !== "twitter" && social !== "pinterest") {
console.log("Share not found");
return false;
}
var share_url = url || window.location.href;
var sharer = ''
const windowWidth = 626;
const windowHeight = 436;
@takien
takien / youtubeID.js
Last active May 3, 2024 12:41
Get YouTube ID from various YouTube URL using JavaScript
/**
* Get YouTube ID from various YouTube URL
* @author: takien
* @url: http://takien.com
* For PHP YouTube parser, go here http://takien.com/864
*/
function YouTubeGetID(url){
var ID = '';
url = url.replace(/(>|<)/gi,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/);