Skip to content

Instantly share code, notes, and snippets.

View molotovbliss's full-sized avatar
⚗️
Code, Eat, Sleep++;

Jared molotovbliss

⚗️
Code, Eat, Sleep++;
  • DFW, Texas
View GitHub Profile
@molotovbliss
molotovbliss / dummy-products.php
Last active August 29, 2015 13:57
Use filltext.com API and lorempixel.com to generate dummy product data
<?php
// Use filltext.com API and lorempixel.com to generate dummy product data
// Based off: https://github.com/sandermangel/magento-dummy-installers
// Usage: Upload this file to tmp/ under magento root or modify require_once, execute.
// env config
ini_set('display_errors', 1);
umask(0);
@molotovbliss
molotovbliss / example.php
Last active November 10, 2018 00:12
Running multiple processes in PHP
<?php
set_time_limit(0);
include "threads.php";
$commands = array('ffmpeg -i '.$inputFile[0].' '.$outputFile[0].' 2>&1','ffmpeg -i '.$inputFile[0].' '.$outputFile[0].' 2>&1');
$threads = new Multithread($commands);
$threads->run();
foreach ($threads->commands as $key=>$command){
echo "Command ".$command.":<br>";
echo "Output ".$threads->output[$key]."<br>";
echo "Error ".$threads->error[$key]."<br><br>";
@molotovbliss
molotovbliss / gist:8c735c34f015f578f737
Created May 7, 2014 17:33
Simple Development File with Magento bootstrap.
<?php
/*
* This is a temporary file for development purposes only
*/
require_once('app/Mage.php');
umask(0);
ini_set('display_errors', 1);
Mage::setIsDeveloperMode(true);
@molotovbliss
molotovbliss / gist:b5896cc059048fb2f0f2
Created May 14, 2014 23:20
Set base_url via etc/local.xml in Magento
<config>
<stores>
<default> <!-- store code -->
<web>
<unsecure>
<base_url><![CDATA[http://default-magento-store.com/]]></base_url>
</unsecure>
<secure>
<base_url><![CDATA[http://default-magento-store.com/]]></base_url>
@molotovbliss
molotovbliss / gist:c36c25b7a08afda2848b
Last active November 16, 2016 02:20 — forked from magentogirl/gist:e8dc6aa7c74d021f85cc
Disable Magento Logging observers & unused Core Modules via XML
<?xml version="1.0"?>
<config>
<frontend>
<events>
<!-- disble logs -->
<controller_action_predispatch>
<observers><log><type>disabled</type></log></observers>
</controller_action_predispatch>
<controller_action_postdispatch>
<observers><log><type>disabled</type></log></observers>
@molotovbliss
molotovbliss / logrotate
Last active April 26, 2021 17:33
Magento Log Rotate with logrotate
The magento-logrotate.conf file contents:
/path/to/magento/var/log/*log {
rotate 7
daily
compress
missingok
notifempty
copytruncate
create 660 www-data www-data
@molotovbliss
molotovbliss / gist:c176f2140232a0ba556f
Last active February 12, 2016 20:44
Magento Enterprise 1.13.1.0 Triggers.sql (no definer)
-- Magento Enterprise 1.13.1.0 Triggers.sql
-- mysqldump -u -p -n -d -t --skip-opt --no-create-info --triggers database | sed -e 's/DEFINER=[^*]*\*/\*/' > triggers.sql
-- MySQL dump 10.13 Distrib 5.5.38, for debian-linux-gnu (i686)
-- Server version 5.5.38-0ubuntu0.12.04.1
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
@molotovbliss
molotovbliss / gist:c7c19227c60d1b82b53b
Created August 20, 2014 01:12
Locate eval(gzinflate [common signature for hiding backdoors/exploits] recursively for PHP exploits (all file types)
find . -type f -name '*' | xargs grep --no-messages -l "eval*(gzinflate" --color
@molotovbliss
molotovbliss / shopify-customers.php
Last active August 29, 2015 14:06
Shopify to Magento Customer Import via Shopify API
<?php
/**
* Shopify import of customers via Shopify API to Magento
* by: [email protected] (http://molotovbliss.com)
* USE AT YOUR OWN RISK.
*
* Requires: Avs_FastSimpleImport https://github.com/avstudnitz/AvS_FastSimpleImport
* cURL, simpleXML, Magento
*/
@molotovbliss
molotovbliss / shopify-products.php
Last active February 2, 2022 13:42
Shopify to Magento 1.x Simple Products Import via Shopify API
<?php
/**
* Import products from Shopify via Shopify API to Magento simple products
* by: [email protected] (http://molotovbliss.com)
* USE AT YOUR OWN RISK.
*
* Requires: Avs_FastSimpleImport https://github.com/avstudnitz/AvS_FastSimpleImport
* cURL, simpleXML, Magento
*/