Skip to content

Instantly share code, notes, and snippets.

# Create the directory
cd ~ && mkdir bin
cd ~/bin
# Install composer
curl -s https://getcomposer.org/installer | php
# Clone the repo
git clone git@bitbucket.org:kjordan/magerun.git magerun
<script>
MageMailData = typeof(MageMailData) != 'undefined' ? MageMailData : {};
MageMailData.beforeInit = function() {
var cookies = new MageMail_Cookies();
var coupon = cookies.get('mm_coupon');
if (!coupon || coupon == '') {
MageMail_Magento.applyCouponToCart('BLACK_FRIDAY_10_OFF', 'custom_javascript');
cookies.set('mm_countdown', '2015-11-07T04:00:00+00:00'); // UTC
MageMail_Magento.setupCountdownTimer();
}
@kalenjordan
kalenjordan / emoji.csv
Created November 15, 2015 22:20
emoji.csv that can be used in php apps
&#x1f600; grinning face
&#x1f601; grinning face with smiling eyes
&#x1f602; face with tears of joy
&#x1f603; smiling face with open mouth
&#x1f604; smiling face with open mouth and smiling eyes
&#x1f605; smiling face with open mouth and cold sweat
&#x1f606; smiling face with open mouth and tightly-closed eyes
&#x1f609; winking face
&#x1f60a; smiling face with smiling eyes
&#x1f60b; face savouring delicious food
@kalenjordan
kalenjordan / web-crons.md
Last active November 6, 2015 21:07
Web Crons

I've been thinking about whether it might be easier to use a separate cron file for some of my extension-specific crons and access it over the web, so that I could control the cron schedule on my end without the customer having to worry about configuring it.

I know that running crons over HTTP is generally a bad idea, but I'm just trying to think through the pros and cons.

The main con to having Magento handle this is that many people seem to be running a 5 minute cron, even post-email-queueing, which I don't quite understand. But it is what it is. So now, all of a sudden, in order to enable a feature (order confirmation emails), they're having to go in and update their cron schedule. From a usability point of view, that's quite a bit deeper under the hood than I ever want a customer to have to go in order to enable a feature. If everyone was already running a 1 minute cron, this would make things a lot more seamless, but that just doesn't seem to be the case currently.

Also, I'm concerned that in some

<table class="custom-social-footer" cellspacing="0" cellpadding="0"><tr>
<td class='social-icon-wrapper'>
<table class="social-icon facebook" cellspacing="0" cellpadding="0"><tr><td>
<a href="https://facebook.com/{{ settings.facebook_handle }}">
<img border="0" src="{{ facebook_image_url }}">
</a>
</td></tr></table>
</td>
<td class='social-icon-wrapper'>
<table class="social-icon instagram" cellspacing="0" cellpadding="0"><tr><td>
@kalenjordan
kalenjordan / gist:3901671
Created October 16, 2012 20:11
Find and mass replace, Find and delete
# Delete backup files
find . -name "*.bak" -exec rm {} \;
# Find and mass replace. It creates .bak files, but without the .bak this doesn't work in OSX
find . -exec sed -i.bak s/Find/Replace/g {} \;
# find and replace
ack -l 'Find' | xargs perl -pi -E 's/Find/Replace/g'

Few things resonated with me about the article. I was never one of those "solopreneur on the beach" types anyways. But I think I did glamorize a little bit the benefits of being a successful one man show. Don't get me wrong, I do think it's a great gig, but I've been seeing a need for being part of a team growing in myself personally over time.

That's not to say everyone will feel like that. Certainly there are probably some people that will be perfectly content to work solo for their entire lives. And I may be one of them - jury is still out on that.

But I have been feeling more of a need to be part of a team over the past 2 or so years that I've been going solo.

Also the idea of working on bigger problems is something I've been thinking about more. I think earlier on I was more interested in working on manageable problems that wouldn't have a lot of complications and could still be reasonably profitable. I still think that's a great way to start and again a great way to live.

But I've also been

curl --data "api_key=aeb434592f1c0b8352448a54ddbe9db7&email=test@example.com" https://magemail.co/app/api/unsubscribe

Josh is a catalyst within the Magento community, having started MageUnity (a forum for discussing community issues), released open source addons to N98-MageRun, as well as a load testing tool for Magento 2. He's also working to release a book on Magento 2, has given a number of talks on test-driven development and deployment best practices, and is continually leading and encouraging innovation in the community.