Skip to content

Instantly share code, notes, and snippets.

View janmyszkier's full-sized avatar

Jan Myszkier janmyszkier

View GitHub Profile
<?php
//for: Molongui authorship version 4.3.9
//bug: does not render correct author
/**
* To reproduce:
* 1. open author.php
* 2. paste the php code into it
* 3. open ANY author page, let's call it John doe, with slug of blog.com/authors/john-doe
* 4. notice how you will get 10 posts, but all of them will say it's author is john doe instead of the real author
*/
@janmyszkier
janmyszkier / gist:2974796128aa017aa9d4fd38465bede8
Last active September 26, 2019 10:11
58113854 Quickest way to get the key by value of a multidimensional associative array
<?php
$initialArray = [];
for ($i = 0; $i < 10000; $i++) {
$data[] = [
'Joe Bloggs',
rand(0, 99999),
'Manager',
'Male',
12
@janmyszkier
janmyszkier / ProductMultipleImagesWriterStep.php
Created January 3, 2019 12:44
Product Import Multiple Images Importer Step
<?php
/**
* This file is part of the Spryker Commerce OS.
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
namespace Pyz\Zed\DataImport\Business\Model\ProductImage;
use Orm\Zed\ProductImage\Persistence\SpyProductImage;
@janmyszkier
janmyszkier / updating-custom-vuesf-theme.md
Last active March 21, 2019 09:05
updating vue-storefront custom theme

For the basic approach, please follow official upgrade notes: https://github.com/DivanteLtd/vue-storefront/blob/master/doc/Upgrade%20notes.md

But if that fails, this is the way to go that worked for me.

This gist requires you to create your repository from a vue-storefront, so you know exactly when you started work on your theme. For the sake of this gist, I'll name that fork/clone of vue-storefront: your-vuesf-repo

  1. open your-vuesf-repo directory, check git log for most recent non-your commits write down the SHA. In my case:

Keybase proof

I hereby claim:

  • I am janmyszkier on github.
  • I am jamysz (https://keybase.io/jamysz) on keybase.
  • I have a public key whose fingerprint is 4141 90EA FDA5 4F5A 580D 5578 DBFD 714D 9FD7 C2C1

To claim this, I am signing this object: