Skip to content

Instantly share code, notes, and snippets.

@hornofj
hornofj / gist:4233993
Created December 7, 2012 15:32
Clear APC
<?php
if (function_exists('apc_clear_cache') && $_GET['pass'] == 'SomePassword' && $_SERVER['REMOTE_ADDR']=='127.0.0.1') {
if (apc_clear_cache() && apc_clear_cache('user'))
print 'All Cleared!';
else
print 'Clearing Failed!';
print '<pre>';
print_r(apc_cache_info());
print '</pre>';
@hornofj
hornofj / gist:4269711
Created December 12, 2012 17:18
Invalidate Customer Emails in Magento
UPDATE gp_customer_entity SET email='[email protected]';
UPDATE gp_sales_flat_order_address SET email=NULL;
UPDATE gp_sales_flat_order SET customer_email=NULL;
@hornofj
hornofj / magento2_order_export.sql
Last active March 8, 2023 11:15
Simple order export from Magento 2
SELECT so.increment_id as 'id',
so.created_at AS 'date',
so.status,
ROUND(so.grand_total,2) AS 'total',
so.order_currency_code AS 'currency',
so.customer_email AS 'email',
so.shipping_description AS 'shipping',
sop.method AS 'payment',
soa.`firstname`,
soa.`lastname`,
@hornofj
hornofj / removeaccents.sql
Last active February 21, 2019 22:02
Remove accents SQL
drop function if exists fn_remove_accents;
delimiter |
create function fn_remove_accents( textvalue varchar(20000) )
returns varchar(20000)
begin
set @textvalue = textvalue;
-- ACCENTS
set @withaccents = 'ĎŇňŘřČ莞ĽľĚ슚ŽžÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØßÙÚÛÜŮÝŸÞàáâãäåæçèéêëìíîïñòóôõöøùúûüůýÿþƒ';