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/*
@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
--
@korbax
korbax / 0_reuse_code.js
Created June 27, 2016 19:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
/**
* A simple fix for a shell execution on preg_match('/[0-9]\.[0-9]+\.[0-9]+/', shell_exec('mysql -V'), $version);
* The only edit that was done is that shell_exec('mysql -V') was changed to mysql_get_server_info() because not all
* systems have shell access. XAMPP, WAMP, or any Windows system might not have this type of access. mysql_get_server_info()
* is easier to use because it pulls the MySQL version from phpinfo() and is compatible with all Operating Systems.
* @link http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento
* @author Magento Inc.
*/
@korbax
korbax / magento-nginx.conf
Created October 23, 2015 08:21 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
}
@korbax
korbax / CategoryTreePathExportMagento.php
Created October 22, 2015 13:55 — forked from tegansnyder/CategoryTreePathExportMagento.php
Export Category Tree and Paths for Magento
<?php
define('MAGENTO', realpath(dirname(__FILE__)));
require_once MAGENTO . '/app/Mage.php';
Mage::app();
$category = Mage::getModel ('catalog/category');
$tree = $category->getTreeModel();
$tree->load();