Skip to content

Instantly share code, notes, and snippets.

View faizul726's full-sized avatar
๐ŸŒณ
Living life...

Fzul faizul726

๐ŸŒณ
Living life...
View GitHub Profile
@Not-Dhanraj
Not-Dhanraj / gnome-wayland-screenshot.md
Last active January 10, 2026 15:08
GNOME Wayland screenshot solution - save file + copy to clipboard (area screenshot and screenshot without Enter)

GNOME Wayland Screenshot: Save File + Copy to Clipboard

A solution for taking area screenshots on Fedora GNOME (Wayland) that both saves the file AND copies it to clipboard with a single keyboard shortcut.

Problem

  • gnome-screenshot -c flag is broken on Wayland
  • grim + slurp don't work with GNOME's compositor (zwlr_layer_shell_v1 not supported)

Solution

@samarlyka
samarlyka / ImagePainterFromFile.kt
Created July 19, 2024 13:06
Kotlin: Load External Image in Jetpack Compose without Coil or Glide Dependencies
/**
* This class allows one to display an external image in Kotlin Jetpack Composable
* without external dependencies such as Coil and Glide.
* Written by Samarthya Lykamanuella (github.com/groaking)
* ---
* Load an ImageBitmap from a specific path, then convert it into a Painter
* that can be loaded in a composable Image element.
* SOURCE: https://developer.android.com/develop/ui/compose/graphics/images/custompainter
*/
@miredirex
miredirex / AndroidFpsCounter.kt
Last active November 11, 2025 07:38
Android Compose FPS counter with frame rate graph
package com.fps
import android.view.Choreographer
import androidx.compose.material3.Text
import androidx.compose.runtime.*
import androidx.compose.ui.Modifier
import androidx.compose.ui.text.font.FontStyle
import kotlin.math.roundToInt
private const val UPDATE_FPS_EVERY_MS = 60
@mmolosay
mmolosay / LoadingButton.kt
Last active November 12, 2025 10:31
Animated button with loading indicator in Jetpack Compose
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.Transition
import androidx.compose.animation.core.VisibilityThreshold
import androidx.compose.animation.core.animateDp
import androidx.compose.animation.core.spring
import androidx.compose.animation.core.updateTransition
import androidx.compose.animation.expandHorizontally
import androidx.compose.animation.fadeIn
@itszechs
itszechs / AppSignature.kt
Created April 4, 2022 16:09
Retrieve android app's signature programmatically
import android.content.Context
import android.content.pm.PackageManager
import android.util.Log
import java.security.MessageDigest
import java.security.NoSuchAlgorithmException
object AppSignature {
@Suppress("unused")
enum class Hash {
@Zekfad
Zekfad / conventional-commits.md
Last active March 16, 2026 19:57
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@ThomasVille
ThomasVille / remove_json_comments.sh
Last active March 28, 2025 09:04
Remove comments from JSON file
# This sed command removes every C-style single line comments (//) from a file that can contain strings delimited by `"`
# (intended for use with JSON files).
# So this JSON:
# {
# "app url": "https://www.example.com" // URL of the application
# }
# becomes:
# {
# "app url": "https://www.example.com"
# }
@omarrodriguez15
omarrodriguez15 / ConvertTo-CompatJson.ps1
Last active November 24, 2024 11:04
Remove comments from json so that powershell can convert it into a Object without throwing up.
Get-Content .\settings.json | %{ if ($_.Contains('//')){ $_.SubString(0, $_.IndexOf('//')) } else {$_}} | ConvertFrom-Json
@pavelburov
pavelburov / set_command_output_to_variable.bat
Created January 26, 2018 14:10
windows batch (bat, cmd) - How to set command output to variable
for /f %%i in ('application arg0 arg1') do set VARIABLE=%%i
echo %VARIABLE%

How to setup a minimal X11 environment on Debian GNU/Linux

  1. Install the following packages

    • xserver-xorg-core (server)
    • xserver-xorg-video-XXX (video driver, XXX depends on your hardware)
    • xserver-xorg-input-XXX (input device driver, XXX depends on your hardware. evdev works well for most cases)
    • x11-xserver-utils (xmodmap, xrandr)
    • x11-xkb-utils (setxkbmap)
  • x11-utils (xdpyinfo, xev, xkill, xprop, xwininfo)