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 / basic.c
Created October 26, 2024 05:37
3 words order lexicographically by C
#include <stdio.h>
int main()
{
char s1[1001], s2[1001], s3[1001];
scanf("%s %s %s", s1, s2, s3);
int min1;
// min calculate for first 2 string
@osama2kabdullah
osama2kabdullah / export.sh
Created October 8, 2024 13:31 — forked from janbiasi/export.sh
Export Markdown file as HTML files
#!/bin/bash
# for each md file in the directory
for file in *.md
do
# convert each file to html and place it in the html directory
# --gfm == use github flavoured markdown
marked -o pages/$file.html $file --gfm
done
@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 September 19, 2024 15:20
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