Skip to content

Instantly share code, notes, and snippets.

View tarikuzzamantito's full-sized avatar

Tarikuzzaman Tito tarikuzzamantito

View GitHub Profile
@tarikuzzamantito
tarikuzzamantito / stack.c
Last active June 5, 2025 19:04
Implements a Stack using an Array in C Language
#include<stdio.h>
#define CAPACITY 3
int stack[CAPACITY];
int top = -1;
void push(int x) {
if(top < CAPACITY - 1) {
top = top + 1;
stack[top]= x;
@tarikuzzamantito
tarikuzzamantito / center-and-crop-image-thumbnails-with-CSS-keeping-aspect-ratio.css
Created April 25, 2025 18:38
Center and Crop Image Thumbnails with CSS keeping Aspect Ratio
/* Center and Crop Image Thumbnails with CSS keeping Aspect Ratio */
img {
width: 100%;
height: 100%;
object-fit: cover;
}
@tarikuzzamantito
tarikuzzamantito / Swap-Two-Variable-In-Kotlin-Using-Also.kt
Created March 26, 2025 08:46
🚀 𝗦𝘄𝗮𝗽 𝗧𝘄𝗼 𝗩𝗮𝗿𝗶𝗮𝗯𝗹𝗲𝘀 𝗶𝗻 𝗞𝗼𝘁𝗹𝗶𝗻 𝗨𝘀𝗶𝗻𝗴 𝘁𝗵𝗲 '𝗮𝗹𝘀𝗼' 𝗦𝗰𝗼𝗽𝗲 𝗙𝘂𝗻𝗰𝘁𝗶𝗼𝗻
/**
* Swapping two variables is a common task in programming. In Kotlin, we can do this in a clean and elegant way using the also scope function.
* 𝗮 = 𝗯.𝗮𝗹𝘀𝗼 { 𝗯 = 𝗮 }
* ✅ 𝘏𝘰𝘸 𝘐𝘵 𝘞𝘰𝘳𝘬𝘴?
* ✔ 𝘚𝘵𝘦𝘱 1: 𝘛𝘩𝘦 𝘣𝘭𝘰𝘤𝘬 { 𝘣 = 𝘢 } 𝘳𝘶𝘯𝘴 𝘧𝘪𝘳𝘴𝘵, 𝘶𝘱𝘥𝘢𝘵𝘪𝘯𝘨 𝘣 𝘸𝘪𝘵𝘩 𝘢'𝘴 𝘷𝘢𝘭𝘶𝘦.
* ✔ 𝘚𝘵𝘦𝘱 2: 𝘣.𝘢𝘭𝘴𝘰 𝘳𝘦𝘵𝘶𝘳𝘯𝘴 𝘵𝘩𝘦 𝘰𝘳𝘪𝘨𝘪𝘯𝘢𝘭 𝘷𝘢𝘭𝘶𝘦 𝘰𝘧 𝘣, 𝘸𝘩𝘪𝘤𝘩 𝘪𝘴 𝘵𝘩𝘦𝘯 𝘢𝘴𝘴𝘪𝘨𝘯𝘦𝘥 𝘵𝘰 𝘢.
*/
// Traditional approach
var a = 5
var b = 10
@tarikuzzamantito
tarikuzzamantito / add-an-author.txt
Created February 8, 2025 20:22
How to Automatically add an Author Using Android Studio File Templates?
-> Android Studio
-> Settings
-> Editor
-> File and Code Templates
-> Includes
-> File Header
-> Add Bellow Code and Change the USER Name as you wish
#set( $USER = "Tarikuzzaman" )
/**
@tarikuzzamantito
tarikuzzamantito / multi-tasks-with-one-click.html
Last active January 18, 2025 19:32
Multi Tasks With One Click
<a href="Your 1st link " onclick="window.open('your 2nd link'); return true;">Click Here</a>
@tarikuzzamantito
tarikuzzamantito / CollapsibleFooter.js
Created November 25, 2024 13:02
Shopify free Down theme and other paid theme Collapsible Footer feature can be added by using the Code. Place the code under the <style> tag within the sections > footer.liquid
<script>
window.addEventListener('DOMContentLoaded', () => {
const headings = document.querySelectorAll('.grid .footer-block__heading');
const handleCollapse = (heading) => {
const content = heading.nextElementSibling;
if (heading.classList.contains('block-collapsed')) {
heading.classList.remove('block-collapsed');
heading.setAttribute('aria-expanded', 'true');
@tarikuzzamantito
tarikuzzamantito / Shopify-Development-Store-Auto-Filling-Password.html
Created October 12, 2024 07:26
How to bypass Shopify Development Store Password Online Store / Auto Filling Shopify Development Store Password
<form method="post" action="https://tarikuzzamantito-02.myshopify.com/password/" target="_blank">
<input type="hidden" name="form_type" value="storefront_password">
<input type="hidden" name="utf8" value="✓">
<input type="password" name="password" id="Password" value="1234" placeholder="Your password" style="display: none">
<button class="preview-btn-small">View Demo</button>
</form>
<style>
button.preview-btn-small {
@tarikuzzamantito
tarikuzzamantito / amazing-HTML-emmet-shortcut.html
Created July 24, 2024 16:00
An Amazing HTML Emmet Shortcut that should know every Developer
.item>h1+p+a.btn-shop{Shop Now}
<div class="item">
<h1></h1>
<p></p>
<a href="" class="btn-shop">Shop Now</a>
</div>
@tarikuzzamantito
tarikuzzamantito / show-dropdown-menu-on-hover.js
Created July 2, 2024 14:05
Show dropdown menu on hover in Shopify Dawn Theme
// Instruction -> i. Online store > Themes > Edit code
// Instruction -> ii. Open theme.liquid file -> Paste this code below before </body> -> Within Script Tag [<script> </script>]
// =========== 01. START ========== -> Show dropdown menu on hover in Shopify Dawn Theme // How to make dropdown menu open on hover in Dawn Theme?
const inlineMenu = document.querySelector(".header__inline-menu");
const detailsItems = inlineMenu.querySelectorAll("details");
detailsItems.forEach(item => {
const ulElement = item.querySelector("ul");
=> Android Studio File Auther Header Insertion Tips
-> Android Studio -> File -> Settings -> File and Code Templates -> Includes Tab -> File Header [Paste the BELLOW CODE]
#set( $USER = "Tarikuzzaman Tito" )
/**
* Created by ${USER} on ${DATE} ${TIME}
*/