This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.
Use it like this!
| # | A | B | C | 
|---|---|---|---|
| 1 | a | b | slug | 
| 2 | foo | baz bing | =slugify(A2:B4) | 
| 3 | bar | BAZ | |
| 4 | FOO | baz-bing | 
| // Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e | |
| // by @levelsio | |
| // HOW TO | |
| // 1) Make a Google Sheet, we'll pull the first cell e.g. A1 | |
| // 2) Publish your Google Sheet, File -> Publish To Web | |
| // 3) Copy the SHEET_ID in the URL, put it in here below: | |
| const endpoint = "https://spreadsheets.google.com/feeds/cells/SHEET_ID/1/public/full?alt=json" | |
| // 4) Install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188 | |
| // 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc) | 
| MAILCHIMP_API_KEY="...-us19" | |
| MAILCHIMP_LIST_ID="..." | 
| // Colors reference | |
| // You can use the following as so: | |
| // console.log(colorCode, data); | |
| // console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`); | |
| // | |
| // ... and so on. | |
| export const reset = "\x1b[0m" | |
| export const bright = "\x1b[1m" | |
| export const dim = "\x1b[2m" | 
| /******************************************************************************* | |
| * Description: | |
| * | |
| * Gulp file to push changes to remote servers (eg: staging/production) | |
| * | |
| * Usage: | |
| * | |
| * gulp deploy --target | |
| * | |
| * Examples: | 
| /* | |
| github.com style (c) Vasily Polovnyov <[email protected]> | |
| */ | |
| .hljs { | |
| display: block; | |
| overflow-x: auto; | |
| padding: 0.5em; | |
| color: #333; | |
| background: #f8f8f8; | 
| <script type="text/javascript"> | |
| (function () { | |
| "use strict"; | |
| // once cached, the css file is stored on the client forever unless | |
| // the URL below is changed. Any change will invalidate the cache | |
| var css_href = './index_files/web-fonts.css'; | |
| // a simple event handler wrapper | |
| function on(el, ev, callback) { | |
| if (el.addEventListener) { | |
| el.addEventListener(ev, callback, false); | 
| // ========================================================================== \\ | |
| // About | |
| // ========================================================================== \\ | |
| // The Sass below will generate a class for each of the columns required to | |
| // fill your grid. For example, a four column grid requires columns with | |
| // widths of 1/4, 1/2 and 3/4. | |
| // |----| | | | | |
| // |1/4 | | 
| # block content | |
| location ~ ^/content/(.*).(txt|md|mdown)$ { | |
| rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect; | |
| } | |
| # block all files in the site folder from being accessed directly | |
| location ~ ^/site/(.*)$ { | |
| rewrite ^/site/(.*)$ /error redirect; | |
| } | 
This script for Google Spreadsheets allows you to generate slugs for your data such as might be used for creating unique urls.
Use it like this!
| # | A | B | C | 
|---|---|---|---|
| 1 | a | b | slug | 
| 2 | foo | baz bing | =slugify(A2:B4) | 
| 3 | bar | BAZ | |
| 4 | FOO | baz-bing | 
| {% if template contains 'product' %} | |
| <meta property="og:type" content="product"> | |
| <meta property="og:title" content="{{ product.title | strip_html | escape }}"> | |
| <meta property="og:category" content="{{ product.type }}" /> | |
| {% for image in product.images limit:3 %} | |
| <meta property="og:image" content="http:{{ image.src | product_img_url: 'master' }}"> | |
| <meta property="og:image:secure_url" content="https:{{ image.src | product_img_url: 'master' }}"> | |
| {% endfor %} | |
| <meta property="og:price:amount" content="{{ product.price | money_without_currency | stip_html | escape | remove: ',' }}"> | |
| <meta property="og:price:currency" content="{{ shop.currency }}"> |