Skip to main content

Posts

Showing posts from February, 2022

Notes on Shopify Theme dev - multiple themes and environment

  theme deploy --env=development => config.yml can store many config rather than dev https://github.com/shopify-graveyard/shopify_theme/issues/115 Understanding Shopify product data structure. From this understand we can match our product, business logic to its. On the other hand we can copy the idea of Shopify or WooCommerce design onto our product design. Product <= Variants Product <= product options Product <=> Collection Collect "table" structure and data (mapping product <=> collection). Product_variants. https://shopify.dev/api/liquid/objects/product Returns the variant object of the selected variant. The selected variant is based on the URL parameter variant. If there is no selected variant, then the first available variant is returned. For a variant to be available, its variant.inventory_quantity must be greater than zero or variant.inventory_policy must be set to continue. Products   id: 5609466331285    Options ["AXLE", "PATTERN/

Notes on csv handling with bash

  https://stackoverflow.com/questions/2535255/fastest-way-convert-tab-delimited-file-to-csv-in-linux grep -n ^$ /path/to/file ^$ start end => mean blank line import sys import csv tabin = csv.reader(sys.stdin, dialect=csv.excel_tab) commaout = csv.writer(sys.stdout, dialect=csv.excel) for row in tabin: commaout.writerow(row) Run it from a shell as follows: python script.py < input.tsv > output.csv

VirtualBox extend vdi disk size, RD Client extreme slow on Mac to Windows but faster with Ubuntu Virtual machine inside this Windows host.

https://askubuntu.com/questions/958114/resize-ubuntu-dev-sda1-partition-in-virtualbox-vmdk-when-dev-sda-is-already-la RD Client on Mac sometime cause issues, recently update seem make it hyper lagging to almost unusable. Android RD Client still work well. Restart Windows (remote PC) not help, restart, shutdown then start Mac not help. Strangely, Ubuntu virtualbox machine inside this Windows work much faster when remoting.