Skip to content

Instantly share code, notes, and snippets.

View Megh-Rana's full-sized avatar
🙃
Hmmmmmmm

Megh Rana Megh-Rana

🙃
Hmmmmmmm
  • India
  • 20:30 (UTC +05:30)
View GitHub Profile
@Megh-Rana
Megh-Rana / build.sh
Last active September 6, 2026 08:15
m52xq build script
#!/bin/bash
## Build script for Samsung Galaxy M52 5G (m52xq) - LineageOS 23.2
## Usage:
## ./build_m52xq.sh # Full clone + build
## ./build_m52xq.sh sync # Clone/sync repos only, no build
## ./build_m52xq.sh build # Build only (assumes repos already cloned)
# REMOVED: set -e (We want the script to power through errors)

File header & includes

“This header comment briefly states what the program is: a single-file Flappy Bird clone using SDL2 and SDL_ttf.
The #include lines pull in SDL (windowing, rendering, events), SDL_ttf (TrueType text), and standard C headers for booleans, randomness, time, I/O and string utilities. These provide the APIs we rely on throughout the program.”


Types / small data structures

RectF

@Megh-Rana
Megh-Rana / alps.sh
Created June 25, 2025 15:52
alps build script
#!/bin/bash
repo init --depth=1 -u https://github.com/LineageOS-Revived/android.git -b lineage-17.1 --git-lfs
repo sync --force-sync --current-branch --no-tags --no-clone-bundle --optimized-fetch --prune -j8
git clone https://github.com/LenovoA536Development/android_device_lenovo_alps device/lenovo/alps
git clone https://github.com/LenovoA536Development/android_vendor_lenovo_alps vendor/lenovo/alps
git clone https://github.com/LenovoA536Development/android_kernel_mediatek_alps kernel/mediatek/alps
@Megh-Rana
Megh-Rana / kernel.sh
Created May 27, 2025 10:06
kernel build script
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install build-essential libelf-dev bzip2 lib32stdc++6 libc6-dev-i386 git -y
set -eo pipefail
git clone -n https://github.com/CruelKernel/aarch64-cruel-elf.git ${HOME}/toolchain
cd ${HOME}/toolchain
git checkout cf641f1153b02a9c6210c3abcf8cc9d4e31a4b3b
mkdir -p ${HOME}/toolchain_arm32
wget https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-eabi.tar.xz --output-document=${HOME}/toolchain_arm32/gcc-arm-10.2-2020.11-x86_64-arm-none-eabi.tar.xz
tar -xvf ${HOME}/toolchain_arm32/gcc-arm-10.2-2020.11-x86_64-arm-none-eabi.tar.xz -C ${HOME}/toolchain_arm32
git clone https://github.com/Neo5-development/android_kernel_oppo_neo5.git kernel/oppo/neo5 -b cm-12.1
git clone https://github.com/Neo5-development/android_vendor_oppo_neo5.git vendor/oppo/neo5 -b cm-12.1
git clone https://github.com/Neo5-development/android_device_oppo_common.git device/oppo/common -b cm-12.1
git clone https://github.com/Neo5-development/android_device_oppo_neo5.git device/oppo/neo5 -b cm-12.1
git clone https://github.com/LineageOS/android_device_qcom_common device/qcom/common -b cm-12.1
source build/envsetup.sh
lunch cm_neo5-eng
mka bacon
@Megh-Rana
Megh-Rana / form.html
Last active February 6, 2025 15:15
HTML referrence form
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>form</title>
<style type="text/css">
@Megh-Rana
Megh-Rana / flo.sh
Last active October 21, 2024 13:36
flo.sh
#!/bin/bash
rm -rf .repo/local_manifests
repo init -u https://github.com/PE12-Legacy/manifest -b twelve-plus
git clone https://github.com/Meghthedev/manifest_A37 -b temp .repo/local_manifests
/opt/crave/resync.sh
cp hardware/qcom-caf/msm8996/Android.mk hardware/qcom-caf/msm8960/Android.mk
source build/envsetup.sh
#TEMP FIX, PLS DONT KILL ME, JUST CHECKING SMTHNG
export TARGET_FACE_UNLOCK_SUPPORTED=false
export BUILD_BROKEN_MISSING_REQUIRED_MODULES=true
@Megh-Rana
Megh-Rana / mi439.sh
Last active April 19, 2024 03:09
mi439 build script
#!/bin/bash
# Init Alphadroid Source
repo init --depth=1 -u https://github.com/HorizonDroidLab/manifest.git -b 14 --git-lfs
# Clone local manifest
rm -rf .repo/local_manifests
git clone https://github.com/Meghthedev/local_manifests .repo/local_manifests
# Sync the repos
@Megh-Rana
Megh-Rana / tissot.sh
Last active November 2, 2024 10:18
tissot build script
#!/bin/bash
# Thanks to @Lafactorial for the initial script :D
rm -rf .repo/local_manifests
# Initialize repo with specified manifest
repo init --depth=1 -u https://github.com/ProjectEverest/manifest -b 14 --git-lfs
# Clone local_manifests repository
@Megh-Rana
Megh-Rana / neo5.sh
Last active March 28, 2024 05:05
neo5 build script
#!/bin/bash
# Set up the build environment
source build/envsetup.sh
rm -rf kernel/oppo/neo5
rm -rf build
# Sync Device Specific Repos
# Define repositories, branches, and directories in a single array