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
| {% liquid | |
| assign current_variant = product.selected_or_first_available_variant | |
| assign variant_index = product.variants | find_index: 'id', current_variant.id | |
| assign variant_media_index = product.media | find_index: 'id', current_variant.featured_media.id | |
| assign next_variant_media_index = product.media.size | |
| assign next_variant_index = variant_index | plus: 1 | |
| if product.variants[next_variant_index] != blank | |
| assign next_variant_featured_media_id = product.variants[next_variant_index].featured_media.id | |
| endif | |
| if next_variant_featured_media_id |
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
| import {JSDOM} from 'jsdom'; // npm i jsdom | |
| function htmlToObj(htmlString) { | |
| const newString = htmlString.replace('<br />','\n') | |
| // string hacks for edge cases | |
| // .replace('<small>','') | |
| // .replace('</small>','') | |
| // .replace('<b>','<strong>') | |
| // .replace('</b>','</strong>'); | |
| const dom = new JSDOM(newString); |
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
| # Ask for folder name | |
| # echo "Enter the folder name:" | |
| # read folder_name | |
| # Create the folder | |
| mkdir "$1" | |
| # Navigate into the folder | |
| cd "$1" |
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
| /* ------------------- ADD GOOGLE SHEET URL HERE -------------------------------- */ | |
| var GoogleSheetURL = "SHEET_URL_HERE"; | |
| /* ------------------------------------------------------------------------------ */ | |
| var googleSheet, timeStamp = Date.now(); | |
| function main() { | |
| googleSheet = connectToGoogleSheet(GoogleSheetURL); | |
| createAccountsList(); | |
| } |
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
| /* ------------------- ADD GOOGLE SHEET URL HERE -------------------------------- */ | |
| var GoogleSheetURL = "ADD_URL_HERE"; | |
| var CakeCreativeGoogleSheetURL = "https://docs.google.com/spreadsheets/d/1PDq3JJXrd-os-GzD7UiW8vF3DCHOmlgpWVFqM4GQAZQ/edit#gid=1492232636"; | |
| /* ------------------------------------------------------------------------------ */ | |
| var cakeCreativeValues, actionListValues; | |
| function main() { | |
| var googleSheet = connectToGoogleSheet(GoogleSheetURL); | |
| cakeCreativeValues = getCakeCreativeValues(); | |
| actionListValues = getActionListValues(googleSheet); |
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
| (function(SC){ | |
| const scIframes = [...document.querySelectorAll('iframe[src*="soundcloud.com/player"]')], | |
| soundFinished = function(sc){ | |
| const index = scIframes.findIndex((item) => item === this); | |
| if(index < scIframes.length) scWidgets[index + 1].play(); | |
| }; | |
| let scWidgets = scIframes.map((item) => { | |
| const widget = SC.Widget(item); |
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
| export default class { | |
| constructor({ | |
| elements | |
| }) { | |
| let that = this, | |
| raf = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame; | |
| // set some property values | |
| this.elements = elements; |
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
| service apache2 start/stop/restart | |
| # a2enconf, a2disconf - enable or disable an apache2 configuration file | |
| # a2ensite, a2dissite - enable or disable an apache2 site / virtual host | |
| # a2enmod, a2dismod - enable or disable an apache2 module | |
| # a2query - retrieve runtime configuration from a local Apache 2 HTTP server | |
| # php5enmod, php5dismod - enable or disable an php5 module |