Skip to content

Instantly share code, notes, and snippets.

View ajankuv's full-sized avatar

Alex Jankuv ajankuv

  • JediCloudSolutions.com
  • Wake Forest, NC
View GitHub Profile

Keybase proof

I hereby claim:

  • I am ajankuv on github.
  • I am ajankuv (https://keybase.io/ajankuv) on keybase.
  • I have a public key ASBh8ibd3VcMRHnAiwwglRJJ6cjzn-oFxQD_IxVTu-tNpAo

To claim this, I am signing this object:

@ajankuv
ajankuv / setup.sh
Created October 31, 2018 15:06
instapy quick setup in venv
#!/bin/bash
# quick instapy installer
pip install git+https://github.com/timgrossmann/InstaPy.git;
latest_version=$(wget https://chromedriver.storage.googleapis.com/LATEST_RELEASE -O -);
wget https://chromedriver.storage.googleapis.com/${latest_version}/chromedriver_linux64.zip;
unzip chromedriver_linux64;
mkdir -p local/lib/python2.7/site-packages/assets;
mv chromedriver local/lib/python2.7/site-packages/assets;
chmod +x local/lib/python2.7/site-packages/assets/chromedriver;
@ajankuv
ajankuv / Prestashop 1.6 to magento 2 format customer export
Created February 18, 2018 20:35
Prestashop 1.6 to magento 2 format customer export
select DISTINCT ps_customer.email, 'base' AS _website, ps_customer.firstname,
ps_customer.lastname, ps_customer.passwd AS password_hash, ps_customer.company,
ps_customer.birthday AS dob, ps_customer.date_add AS created_at, '1' AS group_id,
ps_address.address1 AS _address_street, ps_address.postcode AS _address_postcode, IFNULL(NULLIF(ps_address.phone, ''), 5555555555) AS telephone,
ps_address.city AS _address_city, IFNULL(NULLIF(ps_address.phone, ''), 5555555555) AS _address_telephone, 'US' AS country_id,
'1' AS website_id, ps_customer.firstname AS _address_firstname, ps_customer.lastname AS _address_lastname
from ps_customer
INNER JOIN ps_address ON ps_customer.id_customer=ps_address.id_customer
WHERE ps_customer.active=1
GROUP BY ps_customer.id_customer;
@ajankuv
ajankuv / Prestashop to Magento2 product export
Last active March 7, 2022 11:16
Export prestashop 1.6 products for magento 2 import
select ps_product.id_product AS 'sku', ps_product.upc, ps_product.price, ps_product.weight, ps_product.date_add AS 'created_at',
CONCAT('/img/p/',
IF(CHAR_LENGTH(pi.id_image) >= 5,
CONCAT(
SUBSTRING(pi.id_image, -5, 1),
'/'),
''),
IF(CHAR_LENGTH(pi.id_image) >= 4, CONCAT(SUBSTRING(pi.id_image, -4, 1), '/'), ''),
IF(CHAR_LENGTH(pi.id_image) >= 3, CONCAT(SUBSTRING(pi.id_image, -3, 1), '/'), ''),
if(CHAR_LENGTH(pi.id_image) >= 2, CONCAT(SUBSTRING(pi.id_image, -2, 1), '/'), ''),