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
if(window.location.pathname.includes("/collections")) { | |
(async () => { | |
const meta = await fetch("https://www.kasper.com/collections/clothing?view=meta").then(response => response.text()).then(response => JSON.parse(response)); | |
const products = (await Promise.all(Array.from(new Array(meta.pages).keys()).map(page => page + 1).map((page) => { | |
return fetch(`https://www.kasper.com/collections/clothing/products.json?page=${page}`).then(response => response.json()); | |
}))).map(products => products.products).reduce((result, products) => { | |
return [ | |
...result, | |
...products, |
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
Ситуация: на shared-хостинге, к которому есть доступ по SSH, вертится проект. Для проекта создан локальный и удалённый git-репозитории. В локальном репозитории есть коммиты, не отправленные на удалённый. | |
Задача: отправить коммиты на удалённый репозиторий. | |
Проблема: при попытке git push возникает ошибка: | |
Counting objects: 5009, done. | |
Delta compression using up to 16 threads. | |
fatal: unable to create thread: Resource temporarily unavailable | |
error: pack-objects died with strange error |
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
this.slider = new Swiper('.js-featured-articles-slider', { | |
slidesPerView: 2, | |
watchSlidesVisibility: true, | |
spaceBetween: 4 | |
}) |
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
[mysqld] | |
user=mysql | |
skip-host-cache | |
skip-name-resolve | |
datadir=/var/lib/mysql | |
socket=/var/lib/mysql/mysql.sock | |
secure-file-priv=/var/lib/mysql-files | |
pid-file=/var/run/mysqld/mysqld.pid | |
bind_address=0.0.0.0 | |
max_connections=144 |
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
set unique_checks=0; | |
set foreign_key_checks=0; | |
set autocommit=0; | |
source backup.sql | |
set unique_checks=1; | |
set foreign_key_checks=1; | |
set autocommit=1; |
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
sudo chgrp -R laravel storage bootstrap/cache | |
sudo chmod -R ug+rwx storage bootstrap/cache |
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
DROP SCHEMA public CASCADE; | |
CREATE SCHEMA public; |
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
const domain = await fetch(`https://${config.store}/admin/api/2020-07/shop.json?fields=domain`, { | |
method: "GET", | |
headers: { | |
'X-Shopify-Access-Token': config.password, | |
'Content-Type': 'application/json', | |
mode: 'cors', | |
cache: 'no-cache', | |
credentials: 'same-origin', | |
redirect: 'follow', | |
referrerPolicy: 'no-referrer', |
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
MDS_theme/snippets/tilda_*.liquid | |
MDS_theme/templates/*_tilda.liquid |