Skip to content

Instantly share code, notes, and snippets.

@blessani
blessani / slack-deleter.php
Created February 18, 2020 11:10
PHP script to delete all messages in Slack channel
<?php
class Slack
{
private $token = '';
private $channel = '';
public function __construct()
{
@blessani
blessani / customer.php
Last active April 16, 2019 15:22
Magento 1 Customer Delete Shell Class
<?php
require_once 'abstract.php';
class Mage_Shell_Customer extends Mage_Shell_Abstract
{
/**
* Run script
*
@blessani
blessani / reset_magento_ee_cl.sql
Created November 15, 2016 10:41
Reset Magento EE Changelogs
TRUNCATE catalog_product_flat_cl;
TRUNCATE catalog_category_product_index_cl;
TRUNCATE catalog_category_product_cat_cl;
TRUNCATE catalog_category_flat_cl;
TRUNCATE catalogsearch_fulltext_cl;
TRUNCATE cataloginventory_stock_status_cl;
TRUNCATE catalog_product_flat_cl;
TRUNCATE catalog_product_index_price_cl;
TRUNCATE enterprise_url_rewrite_category_cl;
TRUNCATE enterprise_url_rewrite_product_cl;
avg_curl ()
{
TOTAL_RUNS=3;
TIMEFORMAT=%R;
TOTAL_TIME=0;
for i in $(seq 1 $TOTAL_RUNS);
do
LOAD_TIME=$( (time curl -s -o /dev/null "$1") 2>&1 );
TOTAL_TIME=$( echo "scale=3; $TOTAL_TIME + $LOAD_TIME" | bc -l );
done;
@blessani
blessani / PATCH_SUPEE-5388_CE_1.4.0.0-1.5.0.1_v1-2015-03-03-09-43-19.sh
Created April 23, 2015 15:48
PATCH_SUPEE-5388_CE_1.4.0.0-1.5.0.1_v1-2015-03-03-09-43-19.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@blessani
blessani / PATCH_SUPEE-1533_EE_1.9.x_v1-2015-02-10-08-21-38.sh
Created April 23, 2015 15:47
PATCH_SUPEE-1533_EE_1.9.x_v1-2015-02-10-08-21-38.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@blessani
blessani / gist:26644b97c0ae666cfd53
Created April 23, 2015 09:34
PATCH_SUPEE-5345_CE_1.7.0.2_v1-2015-02-10-08-11-22.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@blessani
blessani / gist:b69f5a016a9cd3b4610a
Created April 23, 2015 09:34
PATCH_SUPEE-1533_EE_1.12.x_v1-2015-02-10-08-19-16.sh
#!/bin/bash
# Patch apllying tool template
# v0.1.2
# (c) Copyright 2013. Magento Inc.
#
# DO NOT CHANGE ANY LINE IN THIS FILE.
# 1. Check required system tools
_check_installed_tools() {
local missed=""
@blessani
blessani / gist:a4388d4d6457452e723c
Last active August 29, 2015 14:10
MageStack - View Page Load Time Bottlenecks
{
"title": "local-9408",
"services": {
"query": {
"list": {
"0": {
"id": 0,
"color": "#EF843C",
"alias": "API",
"pin": true,
@blessani
blessani / kibana-dashboard.json
Created June 30, 2014 18:15 — forked from anonymous/kibana-dashboard.json
MageStack - View Soft/Hard DOS Blocks
{
"title": "Soft/Hard Blocks",
"services": {
"query": {
"list": {
"1": {
"id": 1,
"color": "#EAB839",
"alias": "lb",
"pin": true,