Skip to content

Instantly share code, notes, and snippets.

{
"name": "t:sections.header.name",
"type": "header",
"sections": {
"announcement-bar": {
"type": "announcement-bar",
"blocks": {
"announcement-bar-0": {
"type": "announcement",
"settings": {
└─ theme
├─ assets
├─ config
├─ layout
│ └─ theme.liquid
├─ locales
└─ sections
├─ footer-group.json
├─ header.liquid
├─ header-group.json
@shopifypartners
shopifypartners / backup_rate_example.yml
Created October 25, 2022 17:14 — forked from krzysztofbialek/backup_rate_example.yml
Backup rates example for Shipping Applications development good practices
rate_definitions:
-
name: Standard
price: 0
currency: CAD
rate_class_id: 10
conditions:
-
field: total_price
criteria: 100
@shopifypartners
shopifypartners / curl_result_example.txt
Created October 25, 2022 17:14 — forked from krzysztofbialek/curl_result_example.txt
Latency curl result example for Shipping Applications development good practices
time_namelookup: 0.326604s
time_connect: 0.467748s
time_appconnect: 0.000000s
time_pretransfer: 0.467986s
time_redirect: 0.000000s
time_starttransfer: 0.584812s
----------
time_total: 0.584852s
@shopifypartners
shopifypartners / curl_example.txt
Created October 25, 2022 17:13 — forked from krzysztofbialek/curl_example.txt
Latency curl example for Shipping Applications development good practices
time_namelookup: %{time_namelookup}s\n
time_connect: %{time_connect}s\n
time_appconnect: %{time_appconnect}s\n
time_pretransfer: %{time_pretransfer}s\n
time_redirect: %{time_redirect}s\n
time_starttransfer: %{time_starttransfer}s\n
----------\n
time_total: %{time_total}s\n
@shopifypartners
shopifypartners / cache_example.rb
Created October 25, 2022 17:13 — forked from krzysztofbialek/cache_example.rb
Cache example for Shipping Applications development good practices
{
destination_address: {
country_code: "CA",
province_code: "QC",
city: "Montreal",
address1: "address 1",
address2: "address 2",
address3: "address 3",
postal_code: "K2K2K2"
},
if ( 'AmbientLightSensor' in window ) {
const sensor = new AmbientLightSensor();
sensor.onreading = () => {
if ( sensor.illuminance < 20) {
element.style.setProperty('--bg', 'black’);
} else {
element.style.setProperty('--bg', 'blue’);
}
};
sensor.start();