Skip to content

Instantly share code, notes, and snippets.

View lunandd's full-sized avatar
🕳️

Pavlos Efstathiou lunandd

🕳️
View GitHub Profile
Setting wallpaper -
• Copy some images in folder drawable-hdpi like a.jpg, b.jpg etc.
• add following controls to layout
o ImageView1(width-200dp, height=200dp)
o Button1
o Add scroll view and linear layout
<HorizontalScrollView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:layout_gravity="center">
@kimji1
kimji1 / leetcode_409_Longest_Palindrome.kt
Created April 2, 2021 14:00
leetcode_409_Longest_Palindrome.kt
class Solution {
fun longestPalindrome(s: String): Int {
val map = mutableMapOf<Int, Int>()
s.forEach {
val value = map[it.toInt()]
map[it.toInt()] = if (value == null) 1 else value + 1
}
val sumEvens = map.filter { it.value % 2 == 0 }
.values
@geek-at
geek-at / trash.sh
Created August 13, 2020 07:27
The script used to trash a banking phishing site
#!/bin/bash
while :; do
verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1)
pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1)
ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))")
@Treeki
Treeki / TurnipPrices.cpp
Last active April 5, 2024 13:55
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@tye-shutty
tye-shutty / examples.clj
Last active January 2, 2022 00:48
Clojure
;;these code snipits and advice are not mine, I just copied these from various websites.
(Character/isAlphabetic <int>)
;True if char index is a letter
(set! *warn-on-reflection* true)
;Put at beginning of file to check for slow code
;;defn-
(def ^:private foo 1)

How To Make A Working TWRP Device Tree For Your MediaTek Device & Start Building Them, Online

This Guide is tested on 64-bit mt6735/53 chipset device. It will also work on any 64-bit and 32-bit devices.

You will need something from your Stock ROM first. Get them all and Try to modify it using the procedure.

Note: This guide will be helpful for you if you have older mediatek devices (android-5.1 or android-6.0), but up-to-date devices can also work.

Update: This guide had a few typos and derps (Oops..), but I've tried to make it free of those now (Dated November 18, 2020)

Bonus: You can also use this tool by @SebaUbuntu, @yshalsager and @mauronofrio to auto generate the twrp tree. The tool is best if your device runs on android-9.0. The tools is still not 100% compatible to all devices, but I'll still recommend it and give it 8.5/10 in the scale of varsatility.