Skip to content

Instantly share code, notes, and snippets.

View tieutantan's full-sized avatar
🍉
Focusing

Tran Ngoc Tan tieutantan

🍉
Focusing
View GitHub Profile
@tieutantan
tieutantan / README.md
Created September 24, 2023 13:42 — forked from 4wk-/README.md
Clean uninstall then reinstall of WSL on Windows 10, with systemD support

Uninstall then reinstall WSL on Windows 10 (clean way)

Background

I've been using wsl (version 2) with genie mod for years without issue, but one day, Windows 10 finally catch up on wsl Windows 11 features and gives us a way to use systemD natively.

I wanted to use the new "right way" to enable systemD on Windows Subsystem for Linux (without genie), and I also had a (probably related) infinite Windows RemoteApp error poping in.

Fixing it

A - Uninstall wsl and related stuff

  1. In powershell (as admin)
@tieutantan
tieutantan / di.xml
Created August 24, 2021 02:09 — forked from 0-Sony/di.xml
Magento2 : Add Custom Store Configuration exposed to graphQL
<!-- etc/graphql/di.xml -->
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\StoreGraphQl\Model\Resolver\Store\StoreConfigDataProvider">
<arguments>
<argument name="extendedConfigData" xsi:type="array">
<item name="custom_config" xsi:type="string">mynamespace_mymodule/general/custom_config</item>
</argument>
@tieutantan
tieutantan / gist:32095c490a1eb3462658e67296a21b64
Created November 30, 2020 17:58 — forked from carolineschnapp/gist:1002949
Related Products by Tags — to add to product.liquid
<!-- Solution brought to you by Caroline Schnapp -->
<!-- See this: http://wiki.shopify.com/Related_Products -->
{% assign image_size = 'compact' %}
{% assign heading = 'Other fine products' %}
{% if product.tags.size > 0 %}
<h3>{{ heading }}</h3>
<ul class="related-products"></ul>
@tieutantan
tieutantan / wait-el.js
Last active November 11, 2020 16:31 — forked from chrisjhoughton/wait-el.js
Wait for an element to exist on the page with jQuery
// Convert shop the look pricing (EURO only) to cart currency
var existGetTheLook = setInterval(function () {
if ($('.stl__presentmentPrice').length) {
clearInterval(existGetTheLook);
let price_needed = 'data-currency-' + cart_currency.toLocaleLowerCase();
$('span[class="stl__presentmentPrice"]').each(function (index, item) {
let price_by_currency = $(item).attr(price_needed);
@tieutantan
tieutantan / my.cnf
Created April 5, 2019 20:21 — forked from fevangelou/my.cnf
Optimized my.cnf configuration for MySQL/MariaSQL (on Ubuntu, CentOS etc. servers)
# Optimized my.cnf configuration for MySQL/MariaSQL
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# === Updated December 2018 ===
#
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores.
# If you have less or more resources available you should adjust accordingly to save CPU,
# RAM and disk I/O usage.
# The settings marked with a specific comment or the word "UPD" after the value
@tieutantan
tieutantan / sources.list
Last active September 30, 2018 07:21
Ubuntu 18.04 Bionic default /etc/apt/sources.list with server best of speed to VN
#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://mirrors.bangmod.cloud/ubuntu/ bionic main restricted
# deb-src http://mirrors.bangmod.cloud/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://mirrors.bangmod.cloud/ubuntu/ bionic-updates main restricted
@tieutantan
tieutantan / Magento2.md
Created September 12, 2018 10:41 — forked from JeansBolong/Magento2.md
Magento2 CheatSheet

Magento 2 tutorial

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/bk-frontend-dev-guide.html
https://www.creare.co.uk/blog/magento/theming-in-magento-2-part-1
https://www.creare.co.uk/blog/magento/theming-in-magento-2-part-2
http://alanstorm.com/category/magento-2/

I have installed Magento 2 successfully, but icons are not displaying and not able to click anywhere in backend.

Please try running following command.