Skip to content

Instantly share code, notes, and snippets.

View dev-harsh1998's full-sized avatar
:shipit:
I may be slow to respond.

Harshit Jain dev-harsh1998

:shipit:
I may be slow to respond.
View GitHub Profile
address=Ad.dr.es.sx
assume=1 #Assume thing is is up by default
while true
do
echo -n $(date +"%a, %b %d, %r") "-- "
ping -c 1 ${address} > /tmp/ping.$
if [[ $? -ne 0 ]]; then
if [[ ${assume} -eq 1 ]]; then #Edge trigger to be sure
echo -n "SQL Thing down"
else
home/hyper/aosp/kernel/zuk/msm8996/scripts/unifdef.c:453:28: warning: ���strncpy��� output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
static void Mpass (void) { strncpy(keyword, "if ", 4); Pelif(); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~
@dev-harsh1998
dev-harsh1998 / cpp.json
Created July 31, 2019 15:26
just personal vs code template because i mess up lot and have to reinstall
{
"CPP1": {
"prefix": "hax",
"body": [
"/*",
"* वाह मोदी जी वाह!",
"* Author: dev-harsh1998",
"*/",
"#include<bits/stdc++.h>",
"using namespace std;",
/*
* Copyright (C) 2019 The LineageOS Project
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
@dev-harsh1998
dev-harsh1998 / build.sh
Last active October 18, 2021 12:17
update
# User Setup
export TZ="Asia/Kolkata"
export KBUILD_BUILD_USER="dev-harsh1998"
export KBUILD_BUILD_HOST="PhAnToMiZeR"
#ccache setup
export USE_CCACHE=1
export CCACHE_EXEC=$(which ccache)
export CCACHE_DIR=$(pwd)/../../ccache/loss_x2_eng
From 6e902d37d4a4170a85143c806425c662237889fe Mon Sep 17 00:00:00 2001
From: Karthick C <karthickrko61@gmail.com>
Date: Thu, 24 Sep 2020 21:35:37 +0000
Subject: [PATCH] BatteryService: Implement vooc charging support
* Realme devices support non standard charger type, i.e vooc charger that has its own crazy charge speeds
luckily vooc charger can be determined upon the value of one node, Let's use that and update user when
vooc charger is coonected and vooc charging is in progresss, Also guard this via a overlay flag and set
it to false by default to preserve the default aosp behaviour for non standard chargers if user uses them.
@dev-harsh1998
dev-harsh1998 / nabu_partner-gms
Created August 17, 2023 20:10
kickout-google-communicagion
From d9cd359e345aa0472ec35c723f38e35df08d95fd Mon Sep 17 00:00:00 2001
From: Rohan Hasabe <rohanhasabe8@gmail.com>
Date: Thu, 17 Aug 2023 20:08:33 +0000
Subject: [PATCH] gms: disable communication suit for nabu
---
apps/SearchLauncher/Android.mk | 2 +-
products/gms.mk | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
{
"response": [
{
"datetime": 1673143267,
"filename": "lineage-20.0-20230903-UNOFFICIAL-nabu.zip",
"id": "708ab8fddd1dbac350b6a164b2ed513146cf499f1d39efa0608891d850fda182",
"romtype": "UNOFFICIAL",
"size": 1876033331,
"url": "google.com",
"version": "20.0"
#!/usr/bin/bash
# Time and stuff
export TZ="Asia/Kolkata"
export KBUILD_BUILD_USER="dev-harsh1998"
export KBUILD_BUILD_HOST="Phantomizer"
# CCACHE setup
export CCACHE_EXEC=$(which ccache)
export USE_CCACHE=1
@dev-harsh1998
dev-harsh1998 / settings.patch
Last active May 1, 2024 04:54
Settings patch 14 QPR2 fixes the aosp settings crash on tablet devices (Bascially devices without sim)
From c366b2029a3dc747d19f2363e578dc1280f7adf9 Mon Sep 17 00:00:00 2001
From: Harshit Jain <reach@harsh1998.dev>
Date: Wed, 1 May 2024 05:10:13 +0530
Subject: [PATCH] system: ClientInitiatedActionRepository: avoid
IIllegalStateException
Change-Id: Ica790f8c61ea8d814e2e70e66c5ad589378abbf3
---
.../settings/system/ClientInitiatedActionRepository.kt | 10 ++++++++++
1 file changed, 10 insertions(+)