This file contains 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 video_url = 'https://www.youtube.com/watch?v=R5jIoLnL_nE' %} | |
{% assign thumbnail_url = '' %} | |
{% assign video_id = video_url | split: '/' | last %} | |
{% assign video_id = video_id | split: '?' | last %} | |
{% assign video_id = video_id | split: 'v=' | last %} | |
{% if video_id != blank %} | |
{% assign thumbnail_url = 'http://img.youtube.com/vi/' | append: video_id | append: '/maxresdefault.jpg' %} | |
{% endif %} |
This file contains 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 to Cart module for Checkout | |
*/ | |
.checkout-add-cart-module { | |
padding: 0px; | |
background-color: transparent; | |
margin-top: 30px; |
This file contains 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
/** | |
* Get the url of an S3 file | |
* @param [string] $key [naem of the file object on S3 e.g. logs/thisismylog.txt] | |
* @return [string] url to the file | |
*/ | |
private function getFileUrl($key) { | |
$s3 = Storage::disk('s3'); | |
$client = $s3->getDriver()->getAdapter()->getClient(); | |
$bucket = config("filesystems.disks.s3.bucket"); |
This file contains 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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Materialize/schemes/Material Stereokai.tmTheme", | |
"font_face": "Fira Code", | |
"font_options": | |
[ | |
"gray_antialias", | |
"subpixel_antialias" | |
], | |
"font_size": 12, |
This file contains 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
{% capture time_seed %}{{ 'now' | date: "%s" }}{% endcapture %} | |
{% assign random = time_seed | times: 1103515245 | plus: 12345 | divided_by: 65536 | modulo: 32768 | modulo: 10 %} | |
This will generate pseudo-random numbers beetween 0 and 9. If you need from 0 to 99, just adjust the last modulo to 100 instead of 10 (and 1000 if you need 0-999). |
This file contains 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 found = false %} | |
{% for c in product.collections %} | |
{% if c.handle=='merchandise' %} | |
{% assign found = true %} | |
{% endif %} | |
{% endfor %} | |
{% if found %} | |
... do stuff ... |
This file contains 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
/*------------------------------------------------ | |
KLAVIYO signup form | |
------------------------------------------------*/ | |
.klaviyo_styling{ | |
max-width: none; | |
} | |
.klaviyo-form-wrap.klaviyo_form_actions { | |
text-align: left; |
This file contains 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
<style> | |
button.Cart__Checkout { | |
padding-left: 20px; | |
} | |
svg.checkout-lock { | |
height: 20px; | |
width: auto; | |
margin-left: 0; |
This file contains 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
<?php | |
$url = 'URL GOES HERE'; | |
$key = 'KEY GOES HERE'; | |
// View https://developers.google.com/speed/docs/insights/v1/getting_started#before_starting to get a key | |
$data = json_decode(file_get_contents("https://www.googleapis.com/pagespeedonline/v1/runPagespeed?url=$url&key=$key")); | |
$dat = $data->formattedResults->ruleResults; | |
foreach($dat as $d) { | |
$name = $d->localizedRuleName; |
This file contains 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
.conversio-container-footer{ | |
.rf-header h3 { | |
padding: 0 !important; | |
margin: 0 0 10px 0 !important; | |
border-top: 1px solid #ded9cf; | |
border-bottom: 1px solid #ded9cf; | |
line-height: 2.3; |
NewerOlder