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
@vaimalaviya1233
vaimalaviya1233 / CoreArchitecture.kt
Created February 11, 2026 06:04 — forked from trinadhthatakula/CoreArchitecture.kt
⚑ 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>
@vaimalaviya1233
vaimalaviya1233 / AdMob-in-Jetpack-Compose.md
Created February 11, 2026 06:03 — forked from trinadhthatakula/AdMob-in-Jetpack-Compose.md
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.

# this the first option. if it didn't work. go to option 2
adb shell cmd overlay disable com.android.internal.systemui.navbar.gestural
adb shell cmd overlay enable com.android.internal.systemui.navbar.threebutton
# install any a launcher you like before option 2
@vaimalaviya1233
vaimalaviya1233 / swag.py
Created August 29, 2025 05:58 — forked from Endermanch/swag.py
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):
@vaimalaviya1233
vaimalaviya1233 / export-ble-infos.py
Created August 12, 2025 00:28 — forked from Mygod/export-ble-infos.py
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Copyright 2021 Mygod
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
-- 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
@vaimalaviya1233
vaimalaviya1233 / ssh_setup.md
Created June 30, 2025 06:24 — forked from teebow1e/ssh_setup.md
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"
@vaimalaviya1233
vaimalaviya1233 / gist:bd311c5aafa8e5b4cc3069d5a463291e
Created June 30, 2025 05:24 — forked from madrobby/gist:9476733
Download a single file from a private GitHub repo. You'll need an access token as described in this GitHub Help article: https://help.github.com/articles/creating-an-access-token-for-command-line-use
curl -H 'Authorization: token INSERTACCESSTOKENHERE' -H 'Accept: application/vnd.github.v3.raw' -O -L https://api.github.com/repos/owner/repo/contents/path