Skip to content

Instantly share code, notes, and snippets.

View adithya2306's full-sized avatar
:shipit:
hac

Adithya R adithya2306

:shipit:
hac
View GitHub Profile
#!/bin/bash
#
# Script to set up an Ubuntu 22.04+ server
# (with minimum 16GB RAM, 8 threads CPU) for android platform, linux builds and more
#
# Sudo access is mandatory to run this script.
# Recommended to apply personal dotfiles afterwards.
#
# Usage:
# ./ubuntu-setup.sh
Windows Registry Editor Version 5.00
; Add "Open with VS Code" to folder context menu
[HKEY_CLASSES_ROOT\Directory\shell\Open with VS Code]
@="Open with VS Code"
"Icon"="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\""
[HKEY_CLASSES_ROOT\Directory\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%V\""
#!/usr/bin/env python3
import re
import sys
import xml.etree.ElementTree as ET
from typing import Dict, List, Union
# pip install cryptography
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.backends import default_backend
@adithya2306
adithya2306 / dvconvert.sh
Last active April 26, 2025 15:21
Convert dolby vision profile 8 mkv to dolby vision profile 5 mp4
#!/bin/bash
# Script to convert MKV files with dolby vision video (any profile), dolby audio (AC3 or EAC3)
# and subtitles, to MP4 with dolby vision profile 5 and SRT file.
# Default settings
video_id=0
audio_id=0
subtitle_id=0
skip_extraction=false
audio_codec="eac3"
#!/usr/bin/env python3
"""
SPDX-FileCopyrightText: 2025 Adithya R
SPDX-License-Identifier: MIT
"""
import sys
import xml.etree.ElementTree as ET
#!/bin/bash
ulimit -n $(ulimit -Hn)
push() {
BRANCH="vauxite"
repo="$1"
name=$(grep -m 1 "path=\"$repo\"" manifest/{aospa,system,vendor}.xml .repo/local_manifests/baristablend.xml | head -n 1 | sed -e 's/.*name="//' -e 's/".*//')
if [[ -z $name ]]; then
name=$(grep -m 1 "name=\"$repo\"" manifest/{aospa,system,vendor}.xml .repo/local_manifests/baristablend.xml | head -n 1 | sed -e 's/.*name="//' -e 's/".*//')
#!/bin/bash
export BRANCH="vauxite"
ulimit -n $(ulimit -Hn)
list() {
if ! git -C $1 diff m/$BRANCH > /dev/null; then
echo -e "Error in $1\n"
echo $1 >> .failed_list
[wsl2]
processors=8
memory=6GB
swap=4GB
[experimental]
autoMemoryReclaim=dropcache
sparseVhd=true
@adithya2306
adithya2306 / roomsync.py
Created July 17, 2024 06:10
sync only roomservice.xml
#!/usr/bin/env python3
import xml.etree.ElementTree as ET
import os
tree = ET.parse('.repo/local_manifests/roomservice.xml')
repos = []
for child in tree.getroot():
repos.append(child.attrib['path'])
#!/usr/bin/python3
from github import Github # requires pip3 install pygithub
g = Github(input("Enter token: "))
org = g.get_organization(input("Enter org name: "))
branch = input("Enter branch: ")
for repo in org.get_repos():
try: