This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ vboxmanage list vms | |
"old-vm" {c700b8b6-b766-4638-871b-736b44b7db18} | |
$ vim .vagrant/machines/default/virtualbox/id | |
--> copy old-vm-id past here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
⟩ npm install -g n | |
⟩ n [your_version] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Enable passive mode: ftp_pasv($conn, true); | |
* Place it after ftp_login() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign return = false %} | |
{% if pass_product_handle and pass_collections %} | |
{% for collection in pass_collections %} | |
{% for product in collection.products %} | |
{% if pass_product_handle == product.handle %} | |
{% assign return = product %} | |
{% endif %} | |
{% endfor %} | |
{% endfor %} | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "scotch/box" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.hostname = "scotchbox" | |
#config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"] | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% paginate collection.products by 20 %} | |
<!-- the top of your collections.liquid --> | |
<!-- START PRODUCTS --> | |
{% for product in collection.products %} | |
<!-- START PRODUCT {{ forloop.index | plus:paginate.current_offset }} --> | |
<div class="product" id="product-{{ forloop.index | plus:paginate.current_offset }}"> | |
{% include 'product' with product %} | |
</div> | |
<!-- END PRODUCT {{ forloop.index | plus:paginate.current_offset }} --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% comment %} | |
This function will find value responding to the given key | |
params: | |
- keys: array | |
- values: array | |
- key: mixed | |
- default: mixed // the default value if not found | |
return: | |
- value: mixed | |
{% comment %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# link https://raisedbyturtles.org/shopify-associative-arrays | |
<% assign itemsArray = "item1#item2" | split: '#' %> | |
<% assign sizesArray = "small#large" | split: '#' %> | |
<% assign colorsArray = "blue#green" | split: '#' %> | |
<% for item in itemsArray %> | |
<% if item == 'item1' %> | |
{{ colorsArray[forloop.index0] }} | |
<% endif %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Link https://help.shopify.com/themes/liquid/objects/current-tags? | |
<ul> | |
{% for tag in collection.all_tags %} | |
{% if current_tags contains tag %} | |
<li class="active">{{ tag | link_to_remove_tag: tag }}</li> | |
{% else %} | |
<li>{{ tag | link_to_add_tag: tag }}</li> | |
{% endif %} | |
{% endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Link https://ecommerce.shopify.com/c/ecommerce-design/t/add-a-class-to-link_to_add_tag-255792 | |
{{ tag | link_to_add_tag: tag | replace: 'title=', 'class="new" title=' }} |