Skip to content

Instantly share code, notes, and snippets.

View magenx's full-sized avatar
👨‍🍳
magento 2 open source web stack

MagenX magenx

👨‍🍳
magento 2 open source web stack
View GitHub Profile
@magenx
magenx / carding.sh
Last active September 8, 2024 10:39
#!/bin/bash
MAGE_BASE_URL="$1"
MAGE_SKU="$2"
PAYMENT_KEY="$3"
PAYMENT_METHOD="$4"
STORE_VIEW="$5"
CREDIT_CARD="$6"
CREDIT_CARD_CVC="$7"
#!/bin/bash
## get n98-magerun2
curl -o /usr/local/bin/magerun2 https://files.magerun.net/n98-magerun2.phar
## reset magento admin password
MAGE_NEW_ADMIN_PASS="$(head -c 500 /dev/urandom | tr -dc 'a-zA-Z0-9!@#$%^&?=+_[]{}()<>-' | fold -w 15 | head -n 1)${RANDOM}"
read -e -p "---> Enter admin old login: " -i "admin" MAGE_OLD_ADMIN_NAME
@magenx
magenx / gist:9604368
Last active August 29, 2015 13:57
Clear apc cache
#!/bin/bash
myip=$(curl -s http://169.254.169.254/latest/meta-data/local-ipv4)
## monitor app folder and clear apc/opcode cache
/usr/bin/inotifywait -e modify \
-mrq /var/www/html/magento/app | while read line; do
echo -n "$line " >> /var/log/app_monitor.log
echo `date | cut -d " " -f1-4` >> /var/log/app_monitor.log
wget -O /dev/null http://$myip/apc_opcache/apc_clear.php >/dev/null 2>&1
done
@ck-on
ck-on / ocp.php
Last active September 5, 2024 01:35
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@magento-team
magento-team / 2500 config products
Created November 8, 2012 17:39
Create 2500 configurable products, Magento CE 1.7.0.1
<?php
/**
* Error reporting
*/
error_reporting(E_ALL | E_STRICT);
/**
* Compilation includes configuration file
*/
define('MAGENTO_ROOT', getcwd());