Skip to content

Instantly share code, notes, and snippets.

View vaimalaviya1233's full-sized avatar
👨‍💻
Backing up data...

Vaibhav Malaviya vaimalaviya1233

👨‍💻
Backing up data...
View GitHub Profile
@trinadhthatakula
trinadhthatakula / CoreArchitecture.kt
Last active February 18, 2026 00:51
⚡ Trinadh's Core Android Architecture (Kotlin + Koin)
/**
* 🚀 Core Architecture: Safe API Calling with Koin & Coroutines
* Stack: Kotlin | Koin | Flow | Result Pattern
* Author: Trinadh Thatakula
*/
// 1. type-safe Result wrapper
sealed interface DataResult<out T> {
data class Success<T>(val data: T) : DataResult<T>
@Endermanch
Endermanch / swag.py
Created August 20, 2025 15:28
Swag and unswag your IP address
def swag(ip: str) -> int:
parts = ip.strip().split('.')
if len(parts) != 4:
raise ValueError("Invalid IPv4 address: must have 4 octets")
total = 0
for i, p in enumerate(parts):
@trinadhthatakula
trinadhthatakula / AdMob-in-Jetpack-Compose.md
Last active February 11, 2026 06:03
A collection of reusable Jetpack Compose functions for implementing various Google AdMob ad formats in modern Android apps using Kotlin.

💰 ADMOB COMPOSE INTEGRATION

  • Strategies: Banner, Interstitial, Native
  • Lifecycle: Handles onPause/onResume automatically
  • Interop: Uses AndroidView with factory lambdas to prevent leaks

Implementing AdMob Ads in Jetpack Compose

A guide to integrating Google AdMob ads (Banner, Adaptive Banner, Collapsible Banner, Interstitial, and Native Ads) into an Android application built with Jetpack Compose.

This guide provides reusable @Composable functions to display different types of ads and follows modern Android development practices, which as a mobile developer who prefers state-based programming with MVVM, you'll find quite familiar.

-- Aseprite script for permuting the palette
-- permute_palette_colours.lua
-- by increpare - public domain
-- This script randomly permutes the color palette in the active indexed sprite.
-- Ensure there is an active sprite
local sprite = app.activeSprite
if not sprite then
app.alert("There is no active sprite.")
return
@shahriarhasib
shahriarhasib / AdbCommands
Created November 28, 2024 06:09 — forked from Pulimet/AdbCommands
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@heo001997
heo001997 / char-keyevents.json
Last active June 22, 2025 13:27
This map includes all the keys from the original key_events map for ADB, with character representations used where applicable (for letters, numbers, and common punctuation marks). For special keys and those without a direct character representation, the original key names have been retained. Remember that this map doesn't distinguish between upp…
{
"char_events": {
"key_unknown": "adb shell input keyevent 0",
"key_soft_left": "adb shell input keyevent 1",
"key_soft_right": "adb shell input keyevent 2",
"key_home": "adb shell input keyevent 3",
"key_back": "adb shell input keyevent 4",
"key_call": "adb shell input keyevent 5",
"key_endcall": "adb shell input keyevent 6",
"0": "adb shell input keyevent 7",
@heo001997
heo001997 / AdbCommands
Created October 3, 2024 12:44 — forked from Pulimet/AdbCommands
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.
@FGRibreau
FGRibreau / suno-download-all-songs.js
Created June 24, 2024 20:03
Download all Suno (app.suno.ai) songs displayed on a page
// open your javascript console and paste this
copy([...$('[role="grid"]')[Object.keys($('[role="grid"]')).filter(x => x.startsWith('__reactProps'))[0]].children[0].props.values[0][1].collection].filter(x => x.value.audio_url).map(x => x.value.audio_url).join(' '))
// now you have a list of mp3 urls directly in your clipboard that you can pass to wget or a url downloader
@rahaaatul
rahaaatul / zsh_on_termux.md
Last active February 27, 2026 08:54
Installing ZSH on Termux including themes & useful plugins

ZSH on Termux!

Spice up termux with beautiful themes and productivity plugins to make your life easier!

Install ZSH, GIT & LSD

pkg install zsh git lsd vim

Install Oh-My-Zsh

@teebow1e
teebow1e / ssh_setup.md
Last active June 30, 2025 06:24
Integrate SSH keys to GitHub for working with private repo (or personal access)

Get SSH key working

  1. Create a SSH key
ssh-keygen -t rsa -C "your_email@example.com"
# this is also okay
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# maybe this (up to your preference)
ssh-keygen -t ed25519 -C "your_email@example.com"