Skip to content

Instantly share code, notes, and snippets.

Avatar

Maksim Soldatjonok Maksold

  • Latvia, Daugavpils
View GitHub Profile
View php73-icu70.patch
diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
index 723cfd5022..f6f75d2731 100644
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -74,7 +74,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
clearCurrentCharIter();
}
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
View php72-icu70.patch
diff --git a/ext/intl/breakiterator/codepointiterator_internal.cpp b/ext/intl/breakiterator/codepointiterator_internal.cpp
index 723cfd5022..f6f75d2731 100644
--- a/ext/intl/breakiterator/codepointiterator_internal.cpp
+++ b/ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -74,7 +74,11 @@ CodePointBreakIterator::~CodePointBreakIterator()
clearCurrentCharIter();
}
+#if U_ICU_VERSION_MAJOR_NUM >= 70
+bool CodePointBreakIterator::operator==(const BreakIterator& that) const
View php71-icu70.patch
--- /ext/intl/breakiterator/codepointiterator_internal.cpp
+++ /ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -67,21 +67,25 @@
}
CodePointBreakIterator::~CodePointBreakIterator()
{
if (this->fText) {
utext_close(this->fText);
}
View php70-icu70.patch
--- ext/intl/breakiterator/codepointiterator_internal.cpp
+++ ext/intl/breakiterator/codepointiterator_internal.cpp
@@ -67,21 +67,25 @@
}
CodePointBreakIterator::~CodePointBreakIterator()
{
if (this->fText) {
utext_close(this->fText);
}
@Maksold
Maksold / main.sql
Last active Oct 25, 2018
#magento get average #order, discount, item count, and order amount #report by month and year with direct #SQL
View main.sql
SELECT sub_query.month_ordered,
sub_query.year_ordered,
AVG(sub_query.base_subtotal) AS average_base_subtotal,
AVG(sub_query.discount_amount) AS average_discount_amt,
AVG(sub_query.order_qty) AS average_total_item_count,
COUNT(sub_query.entity_id) AS total_orders
FROM
(SELECT so.entity_id,
MONTH(so.created_at) AS month_ordered,
YEAR(so.created_at) AS year_ordered,
@Maksold
Maksold / magento-nginx.conf
Last active Oct 25, 2018 — forked from gwillem/magento-nginx.conf
Battle-tested #nginx configuration for #magento (source: www.hypernode.com)
View magento-nginx.conf
# 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
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@Maksold
Maksold / data-install-0.0.1.php
Last active Oct 25, 2018
#magento - Create Transactional Email in #migration script
View data-install-0.0.1.php
<?php
/** @var $installer Scandi_Migrations_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$templates = array(
array(
"name" => "New Invoice",
"code" => "sales_email_invoice_template",
"config" => "sales_email/invoice/template",
@Maksold
Maksold / Navigation.php
Last active Oct 25, 2018
#magento - get previous/next #category
View Navigation.php
<?php
/**
* Additional Methods for Mage Core Navigation
*
* @category Scandi
* @package Scandi_Extends
*/
class Scandi_Extends_Block_Catalog_Navigation extends Mage_Catalog_Block_Navigation
{
private function getCategoryByPositionOffset($offset)
@Maksold
Maksold / local.xml
Last active May 28, 2021
#magento #xml - local.xml boilerplate
View local.xml
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->
@Maksold
Maksold / list.phtml
Last active Oct 25, 2018
#magento - remove product_list_toolbar
View list.phtml
<?php if (!$this->getHideToolbar()): ?>
<?php echo $this->getToolbarHtml() ?>
<?php endif ?>