Skip to content

Instantly share code, notes, and snippets.

View atikju's full-sized avatar

MD. Atiqur Rahman atikju

View GitHub Profile
@atikju
atikju / step-1.txt
Last active April 8, 2024 06:58
NGINX, PHP, MYSQL installation with Amazon Linux 2023
Step 1: Let's start with NGINX installation
sudo dnf update //To Install Latest Update
sudo dnf install -y nginx // Install Nginx
sudo systemctl start nginx.service //Start Nginx Server
sudo systemctl status nginx.service // Check Server Status
sudo systemctl enable nginx.service // Enable Auto Server Start on Reboot
Now you should be able to see the server running by hitting your public ip.
if (window.location.search != '') {
var fb_campaign_id = '';
var search_items = window.location.search;
search_items = search_items.replace('?', '');
search_items = search_items.split('&&');
for(i=0;i<search_items.length;i++){
var thisItem = search_items[i];
if(thisItem.indexOf('utm_medium') > -1){
var getCampaign = thisItem.split("=");
@atikju
atikju / fb-open-graph.liquid
Created May 3, 2021 16:54 — forked from chrisjhoughton/fb-open-graph.liquid
Facebook Open Graph meta tags for Shopify. Add this as a snippet called "fb-open-graph.liquid" in your theme, and then add {% include 'fb-open-graph' %} to your theme.liquid file.
{% 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 }}">
@atikju
atikju / Additional Scripts.liquid
Created April 24, 2021 10:20
Install Facebook Pixel on Shopify Manually
{% comment %}
Paste these codes in the additional scripts box. Settings > Checkout > Additional Scripts
{% endcomment %}
{% if first_time_accessed %}
{% assign ordered_products = '' %}
{% assign ordered_product_ids = '' %}
{% assign totalItems = line_items.size %}
{% for lineItem in line_items %}
@atikju
atikju / .htaccess
Created April 16, 2021 02:05
force all urls to use one file and get last segment of url
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [PT,L,QSA]
@atikju
atikju / receiver.php
Last active August 30, 2021 01:08
PHP POST receiver from jQuery Ajax
<?php
//Allow CORS
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST');
header("Access-Control-Allow-Headers: X-Requested-With");
//Allow CORS ends
echo $_GET['first_name'];
@atikju
atikju / related-articles.liquid
Created February 25, 2021 11:24
Show related articles based on article tags - Shopify
@atikju
atikju / automatic-discount-url.liquid
Created January 19, 2021 02:20
Automatic discount code with url redirection
/discount/code?redirect=/new-path
@atikju
atikju / recharge.js
Created July 8, 2020 05:10
Recharge JS add to cart and redirect to checkout
//recharge redirect to checkout
function reChargeProcessCart() {
function get_cookie(name){ return( document.cookie.match('(^|; )'+name+'=([^;]*)')||0 )[2] }
do {
token=get_cookie('cart');
}
while(token == undefined);
var myshopify_domain='{{ shop.permanent_domain }}'
try { var ga_linker = ga.getAll()[0].get('linkerParam') } catch(err) { var ga_linker ='' }
@atikju
atikju / shopify-video-backgrou-section.liquid
Created April 15, 2020 21:24
Shopify Video Background with Text
<div class="containerX">
<video autoplay id="video" width="100%">
<source src="{{ section.settings.video-url }}" type="video/mp4" />
</video>
<div class="overlay">
<p>{{ section.settings.video-text1 }}</p>
<p>{{ section.settings.video-text2 }}</p>
<p>{{ section.settings.video-text3 }}</p>
</div>
</div>