Skip to content

Instantly share code, notes, and snippets.

View aashahin's full-sized avatar
💭
I may be slow to respond.

Abdelrahman Shaheen aashahin

💭
I may be slow to respond.
View GitHub Profile
@mjbalcueva
mjbalcueva / password-input.tsx
Last active July 16, 2024 02:18
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@marioroy
marioroy / GCC_12.x_on_Fedora_38.README.txt
Last active April 7, 2024 18:16
Notes for GCC 12.x installation on Fedora 38
#################################################################
# Install minimum dependencies.
#################################################################
# On "Fedora"-based systems, install minimum dependencies.
# sudo dnf install binutils libgcc glibc-devel libstdc++ patchelf wget
# On "Clear Linux" 40690+, install minimum dependencies.
# sudo swupd bundle-add c-basic patchelf wget
# Fetch gcc-12 packages from Debian:
@abdullahmansss
abdullahmansss / FCM Rest APIs
Last active December 2, 2022 22:34
How to implement (FCM Rest APIs)
Steps:
1. make sure to save device token in database related to user (when register a new user).
2. make sure to update device token every time user logging in app.
3. implement code ...
fcm api documnetation link : https://firebase.flutter.dev/docs/messaging/notifications#via-rest
method type : POST
base url : https://fcm.googleapis.com
@wojteklu
wojteklu / clean_code.md
Last active July 16, 2024 13:35
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@zenozeng
zenozeng / remove-title-bar.sh
Created February 9, 2014 11:28
remove title bar using xprop
xprop -id $xid -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"