Skip to content

Instantly share code, notes, and snippets.

View codayon's full-sized avatar

Reshad Ahammed Ayon codayon

  • Dhaka, Bangladesh
View GitHub Profile
[2025-10-04 19:29:11] INFO: rating 300 mirror(s) by download speed
[2025-10-04 19:29:11] INFO: Server Rate Time
[2025-10-04 19:29:44] INFO: https://mirror.theash.xyz/arch/ 1805.85 KiB/s 4.51 s
[2025-10-04 19:29:57] INFO: https://berlin.mirror.pkgbuild.com/ 1729.22 KiB/s 4.71 s
[2025-10-04 19:30:07] INFO: https://geo.mirror.pkgbuild.com/ 2270.35 KiB/s 3.59 s
[2025-10-04 19:30:17] INFO: https://singapore.mirror.pkgbuild.com/ 2453.77 KiB/s 3.32 s
[2025-10-04 19:30:39] INFO: https://mirror.osbeck.com/archlinux/ 2289.30 KiB/s 3.56 s
[2025-10-04 19:30:50] INFO: https://al.arch.niranjan.co/ 2043.95 KiB/s 3.98 s
[2025-10-04 19:30:55] INFO: https://at.arch.niranjan.co/ 1974.73 KiB/s 4.12 s
[2025-10-04 19:31:10] INFO: https://in.arch.niranjan.co/

Keyboard Shortcuts

Keys Action
Ctrl + Super + Q Log out
Ctrl + Super + R Reload config
Shift + Super + S Take a screenshot
Shift + Super + R Record screen
Super + X Execute an application
Super + Q Close window
@codayon
codayon / style.css
Created October 2, 2025 10:19
its for waybar hyprland
* {
font-family: JetBrainsMono, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 14px;
font-weight: 500;
}
window#waybar {
background-color: rgba(30, 30, 46, 0.8);
border-radius: 8px;
color: #cdd6f4;
@codayon
codayon / config.jsonc
Last active October 2, 2025 10:21
its for waybar hyprland
{
"layer": "top",
"position": "top",
"height": 32,
"spacing": 4,
"modules-left": [
"hyprland/workspaces",
"hyprland/submap",
"custom/media"
],

Let's talk in Redux and Vanilla JS

createSlice

It's used for creating a slice. Example,

createSlice({
    name: "slice-name",
 initialState = {
import { useState } from "react";
import { useSelector } from "react-redux";
const Navbar = () => {
const [cart, setCart] = useState(false);
const cartItems = useSelector((state) => state.cart.value);
return (
<div className="bg-gray-800 flex justify-end relative">
<button onClick={() => setCart(!cart)} className="border-gray-500 bg-gray-500 border w-24 m-4 py-2 px-4 cursor-pointer">
import { createSlice } from "@reduxjs/toolkit";
const initialState = {
value: [],
};
const cartSlice = createSlice({
name: "cart",
initialState,
reducers: {
import { useDispatch } from "react-redux";
import { addToCart } from "./cartSlice";
const ProductCard = ({ product }) => {
const dispatch = useDispatch();
return (
<div className="bg-gray-800 text-gray-100 border-2 border-gray-700 w-[300px] relative group">
<img src={product.thumbnail} alt={product.title} className="bg-gray-500 aspect-square p-4" />
<span className="bg-gray-800 top-5 left-5 py-2 px-4 absolute">{Math.round(product.discountPercentage)}%</span>
<div className="p-3 text-xl">