Skip to content

Instantly share code, notes, and snippets.

View Bat-Chat's full-sized avatar

Vladyslav Shestopalov Bat-Chat

View GitHub Profile

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@Bat-Chat
Bat-Chat / createCron.md
Last active October 29, 2018 07:32
createCron

We need two files below

app/code/BatChat/Module/etc/crontab.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
    <group id="default">
        <job name="batchat_module_cron_cronclass" instance="BatChat\Module\Cron\CronClass" method="execute">
            <schedule>* */3 * * *</schedule>
 
<script type="text/javascript">
<script type="text/javascript">
var BASE_URL = "<?= $block->escapeUrl($block->getBaseUrl()) ?>";
var require = {
"baseUrl": "<?= $block->getViewFileUrl('/') ?>"
};
</script></script>
sudo update-alternatives --config php
@Bat-Chat
Bat-Chat / linklist.liquid
Last active October 25, 2022 22:12
getting linklist json in shopify through liquid
{% layout none %}
<script>
var quotes = [];
</script>
{% for link in linklists.collections.links %}
{% assign parents = link | map: 'object' %}
{% assign child = link.links | map: 'object' %}
<script>
{% for link in linklists.collections.links %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% assign rrr = link.links | map: 'object' %}
{{ rrr |json }}
{% endfor %}
{% assign rrr = link.links | map: 'object' %}
{{ rrr |json }}
SELECT * FROM label_eav_attribute where attribute_code = 'attr_code'
SELECT * FROM label_catalog_product_entity_varchar where attribute_id = 194 and entity_id = 589
List All Indexes
curl 'localhost:9200/_cat/indices?v'
Find records in index
curl 'localhost:9200/idx_name_idx2/_search?pretty=true&q=*:*'
sudo service elasticsearch restart
find . -type d | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"