Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kalenjordan
kalenjordan / Batched Iterator for Magento collections
Last active May 9, 2022 12:25
Batched iterator for Magento collections
// This is how you would use it. Pass in your collection
// along with an individual callback as well as a batch callback
Mage::getSingleton('stcore/resource_iterator_batched')->walk(
$collection,
array($this, 'batchIndividual'),
array($this, 'batchAfter'),
self::BATCH_SIZE
);
public function batchIndividual($model)
0:00:01.760,0:00:09.600
um trying to not use profanity um but um oh we
appreciate that yeah we like our clean rating
0:00:09.600,0:00:14.880
on me on mage talk we we don't want to lose our
clean reading i mean phillip because it's like
0:00:14.880,0:00:20.320
a sailor when i like like when i talk before you
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
dc = diff --cached
lg = log -p
l = log --graph --decorate --pretty=oneline --abbrev-commit
ll = log --pretty=format:'%h : %s' --graph --decorate
[20998] Log opened at 2020-06-25 19:54:20
[20998] I: Connecting to configured address/port: localhost:9000.
[20998] W: Creating socket for 'localhost:9000', poll success, but error: Operation now in progress (19).
[20998] I: Connected to client. :-)
[20998] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///Users/kalenjordan/sites/kalenjordan.com/public/index.php" language="PHP" xdebug:language_version="7.4.2" protocol_version="1.0" appid="20998" idekey="kalenjordan"><engine version="2.9.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>
[20998] <- feature_set -i 1 -n show_hidden -v 1
[20998] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
[20998] <- feature_set -i 2 -n max_depth -
<template>
<div>
<multiselect track-by="username" :loading="isLoading" @search-change="asyncFind"
:options="options" placeholder="Enter a twitter handle" :show-no-results="false"
label="name" :option-height="104" :show-labels="false">
<template slot="noOptions">
Type the name of a product, service, or agency
</template>
<template slot="singleLabel" slot-scope="props">
<img class="option__image w-4 h-4 rounded-full inline" :src="props.option.img">
@kalenjordan
kalenjordan / new-social-network.md
Last active April 22, 2020 16:01
We need a new type of social network

We need a new type of social network.

One where you share deeply with your closest friends who you care about and who care about you.

Somewhere to share privately the things that you're actually thinking about, decisions you're actually struggling with.

Where you can share the moments of pride that you have and accomplishment, without worrying about whether you're humblebragging too much.

A place for those closest to you to cheer you on in your wins, to encourage you in your down moments.

@kalenjordan
kalenjordan / safer-magento-registration-emails.md
Created March 26, 2015 15:17
Safer Magento Registration Emails

Safer Magento Registration Emails

This is a little idea for a module maybe for a hackathon or something. Magento includes passwords in plain text in registration emails by default. In some cases you can just suppress the password, but in other cases you can't - for example if you have customer service reps creating accounts over the phone that need to generate password and send them to customers.

So - how about integrating with readthenburn.com to send email passwords, or perhaps generating temporary password that expire after a day or two, requiring them to use the forgot password if they didn't login by that time.

<table class="top-navigation" width="100%" cellpadding="0" cellspacing="0"><tr>
<td class="first"><a href="#">Women</a></td>
<td class="second"><a href="#">Men</a></td>
<td class="third no-border-on-phone"><a href="#">Sale</a></td>
<td class="fourth hidden-on-phone"><a href="#">Home & Decor</span></a></td>
<td class="last hidden-on-phone"><a href="#">Accessories</span></a></td>
</tr></table>
<div data-remodal-id="mm-exit-modal" id="mm-exit-modal" style="display: none;">
<h1>(Custom) Before you leave...</h1>
<div class="cart-contents-wrapper">
<p class="loading">Loading...</p>
<div class="cart-contents hidden" style="display: none;">
<div class="item item-template" style="display: none;">
<div class="image-wrapper">
<img src="">
</div>
<div class="name-wrapper">
ALTER TABLE `sales_flat_order_item` ADD INDEX `IDX_SALES_FLAT_ORDER_ITEM_PRODUCT_ID` (`product_id`);
ALTER TABLE `cataloginventory_stock_status` ADD INDEX `IDX_CATALOGINVENTORY_STOCK_STATUS_STOCK_STATUS` (`stock_status`);
ALTER TABLE `cataloginventory_stock_status` ADD INDEX `IDX_CATALOGINVENTORY_STOCK_STATUS_PRODUCT_ID` (`product_id`);
ALTER TABLE `sales_flat_order` ADD INDEX `IDX_SALES_FLAT_ORDER_CUSTOMER_EMAIL` (`customer_email`);
ALTER TABLE `sales_flat_order` ADD INDEX `IDX_SALES_FLAT_ORDER_UPDATED_AT` (`updated_at`);
ALTER TABLE `sales_flat_quote` ADD INDEX `IDX_SALES_FLAT_QUOTE_CUSTOMER_EMAIL` (`customer_email`);
ALTER TABLE `sales_flat_quote` ADD INDEX `IDX_SALES_FLAT_QUOTE_UPDATED_AT` (`updated_at`);
ALTER TABLE `sales_flat_quote_item` ADD INDEX `IDX_SALES_FLAT_QUOTE_ITEM_CREATED_AT` (`created_at`);
ALTER TABLE `sales_flat_quote_item` ADD INDEX `IDX_SALES_FLAT_QUOTE_ITEM_UPDATED_AT` (`updated_at`);
ALTER TABLE `catalog_product_entity` ADD INDEX `IDX_CATALOG_PRODUCT_ENTITY_UPDATED_AT` (`updated_at`);