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
#!/usr/bin/env python3
import bisect
import subprocess
import sys
import time
from threading import Thread
def run_shell_cmd(*args):
@adithya2306
adithya2306 / pa-gr.xml
Last active October 23, 2022 06:31
Repo local manifest for https://github.com/pa-gr
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="gr"
fetch="https://github.com/pa-gr/"
review="gerrit.aospa.co"
revision="topaz" />
<remove-project name="AOSPA/android_art" />
<remove-project name="AOSPA/android_bionic" />
@adithya2306
adithya2306 / AutomaticBrightnessControllerImpl.java
Created June 30, 2022 07:06
AutomaticBrightnessControllerImpl from MIUI 13 (lisa)
package com.android.server.display;
import android.content.Context;
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.hardware.camera2.CameraManager;
@adithya2306
adithya2306 / KeyguardSensorInjector.java
Last active June 30, 2022 07:06
KeyguardSensorInjector from MIUI 13 (lisa)
package com.android.keyguard.injector;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Handler;
import android.os.Looper;
import android.os.PowerManager;
/*
Copyright (c) 2014, The Linux Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
@adithya2306
adithya2306 / assessment-2-marking-scheme.txt
Created October 14, 2019 08:26
XII CS 2nd assessment marking pattern
CS 2nd assessment marking pattern
----------------------------------
16 marks - python revision
8 marks - complexity
- 5 marks for for calculating complexity + best & worst case
- 3 marks for complexity only
NOTE: step by step calculation needed for both
12 marks - matplotlob
- 2 marks - theory question
#
# Automatically generated file; DO NOT EDIT.
# LEDE Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
# CONFIG_TARGET_arm64 is not set
# CONFIG_TARGET_sunxi is not set
# CONFIG_TARGET_apm821xx is not set
# CONFIG_TARGET_ath25 is not set
@adithya2306
adithya2306 / los_gerrit_push.txt
Created July 19, 2019 11:46
Push commit(s) in a repo to LOS Gerrit even if you're not in LOS env
# Push commits to LOS Gerrit
git push ssh://<gerrit-user-id>@review.lineageos.org:29418/LineageOS/<repo-name> HEAD:refs/for/<branch>
git push ssh://[email protected]:29418/LineageOS/android_device_cyanogen_msm8916-common HEAD:refs/for/lineage-16.0
git push ssh://[email protected]:29418/LineageOS/android_device_yu_lettuce HEAD:refs/for/lineage-16.0
# Install change-id hooks first:
gitdir=$(git rev-parse --git-dir); scp -p -P 29418 [email protected]:hooks/commit-msg ${gitdir}/hooks/
@adithya2306
adithya2306 / Jenkins setup in Ubuntu.txt
Last active June 13, 2019 15:06 — forked from SilverShades02/Jenkins setup in Ubuntu.txt
Jenkins setup in Ubuntu - GCE, DigitalOcean or AWS instance
What is Jenkins?
Jenkins is an open source automation server written in Java. Jenkins helps to automate the non-human part of the software development process, with continuous integration and facilitating technical aspects of continuous delivery. (Wikipedia)
1. Install required packages
wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt update
sudo apt install -y jenkins
@adithya2306
adithya2306 / lettuce_partition_table.txt
Last active March 27, 2019 15:55
YU Yuphoria partition table
Number Start (sector) End (sector) Size Code Name
1 131072 262143 64.0 MiB 0700 modem
2 262144 262145 1024 bytes FFFF fsc
3 262146 262161 8.0 KiB FFFF ssd
4 262162 263185 512.0 KiB FFFF sbl1
5 263186 264209 512.0 KiB 0700 sbl1bak
6 264210 265233 512.0 KiB FFFF rpm
7 265234 266257 512.0 KiB 0700 rpmbak
8 266258 267281 512.0 KiB FFFF tz
9 267282 268305 512.0 KiB 0700 tzbak