Skip to content

Instantly share code, notes, and snippets.

View osama2kabdullah's full-sized avatar
🎯
Focusing

Osama Abdullah osama2kabdullah

🎯
Focusing
View GitHub Profile
@osama2kabdullah
osama2kabdullah / video_url.liquid
Created March 19, 2024 05:27
Grab the raw video url in shopify hosted video.
{% assign video_url = block.settings.video.sources | where: 'format', 'mp4' | first %}
@osama2kabdullah
osama2kabdullah / filter.js
Created February 5, 2024 05:35
Shopify Collection Filter AJAX request URL.
Shopify.queryParams = {};
if (location.search.length) {
var params = location.search.substr(1).split("&");
$.each(params, function (i, param) {
var keyValue = param.split("=");
if (keyValue.length) {
Shopify.queryParams[decodeURIComponent(keyValue[0])] =
decodeURIComponent(keyValue[1]);
}
});
@osama2kabdullah
osama2kabdullah / show-comment.liquid
Created December 24, 2023 04:27
The condition about show the date of article and comment.
{% if section.settings.show_date %}
<div class="card-footer">
<div class="d-flex justify-content-between">
<small class="text-muted">{{ article.published_at | date: '%B %d, %Y' }}</small>
{% if article.comments_count > 0 %}
<small>{{ article.comments_count }} Comments</small>
{% endif %}
</div>
</div>
{% else %}
@osama2kabdullah
osama2kabdullah / Tailwind CSS with Shopify Theme.md
Created June 12, 2023 08:45
How to add Tailwind CSS in a shopify theme in development mode only

Add Tailwind CSS in Shopify Theme

  1. Initial node.js package manager with npm or yarn by running
yarn init -y 
#or
npm init -y
@osama2kabdullah
osama2kabdullah / redshift.conf
Last active June 17, 2023 13:43
Redshift configuration for lower brightness and protect UV as possible.
[redshift]
temp-day=1600
temp-night=1600
brightness-day=1.0
brightness-night=1.0
gamma=0.8
location-provider=manual
[manual]
lat=22.820000
lon=89.550003