Skip to content

Instantly share code, notes, and snippets.

View korbax's full-sized avatar

Aleksandr Drobot korbax

View GitHub Profile
@korbax
korbax / magento_urls.php
Created August 20, 2020 09:35 — forked from RiccardoB/magento_urls.php
Get all Magento URLs by store view
<?php
require_once 'app/Mage.php';
umask(0);
// set store view
$store_view_filter = isset($_REQUEST['store_view']) ? $_REQUEST['store_view'] : false;
// set export type
$export_to = isset($_REQUEST['export_to']) ? $_REQUEST['export_to'] : false;
@korbax
korbax / backup_mysqldb.sh
Created July 6, 2019 12:07 — forked from skarllot/backup_mysqldb.sh
Bash script to backup all mysql databases thru mysqldump
#!/bin/bash
# Destiny folder where backups are stored
DEST=/tmp/bacula/server01
CURRDATE=$(date +"%F")
# Hostname where MySQL is running
HOSTNAME="srv-mysql"
# User name to make backup
USER="root"
@korbax
korbax / gist:a9b866e6ae8bb56a458deeb9067d3971
Created February 26, 2018 14:46 — forked from nasgul/gist:886e1c747ef18a4778fef825522d0b32
How delete PhpStorm 10 from Ubuntu 15
sudo rm -rf /usr/local/bin/pstorm
rm -rf ~/.PhpStorm*
rm -rf ~/.java/.userPrefs/jetbrains/*
// vendor/magento/module-catalog/Model/ResourceModel/Category.php
protected function doReplace($urls)
{
foreach ($this->createFilterDataBasedOnUrls($urls) as $type => $urlData) {
$urlData[UrlRewrite::ENTITY_TYPE] = $type;
$this->deleteByData($urlData);
}
$data = [];
$storeId_requestPaths = [];
foreach ($urls as $url) {
@korbax
korbax / Set related products programatically Magento 2
Created December 29, 2017 09:42 — forked from mrkhoa99/Set related products programatically Magento 2
Set related products programatically Magento 2
@korbax
korbax / .gitconfig
Created October 17, 2017 04:25 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
smtpserver = smtp.gmail.com
@korbax
korbax / clean-magento_ce-db-extended.sql
Created December 2, 2016 12:58 — forked from frozenminds/clean-magento_ce-db-extended.sql
Clean Magento database of junk and unnecessary data
--
-- Magento CE database clean-up extended
--
-- This is an extended clean-up which will clean search, import/export, reports, etc.
--
-- @author Constantin Bejenaru <boby@frozenminds.com>
-- @copyright Copyright (c) Constantin Bejenaru (http://frozenminds.com/)
-- @license http://www.opensource.org/licenses/mit-license.html MIT License
--
<?php
class Onerockwell_PromoBox_Helper_Data extends Mage_Checkout_Helper_Cart
{
}
@korbax
korbax / Onerockwell_PromoBox_Helper_Data.php
Created August 29, 2016 15:40
Create new type of product
<?php
class Onerockwell_PromoBox_Helper_Data extends Mage_Checkout_Helper_Cart
{
}
@korbax
korbax / index.php
Last active July 25, 2016 08:58
Configure nginx for use multistore in Magent0
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php