Skip to content

Instantly share code, notes, and snippets.

View itisFarzin's full-sized avatar
:octocat:

Farzin Kazemzadeh itisFarzin

:octocat:
View GitHub Profile
@itisFarzin
itisFarzin / DockerOnUbuntuTouch.md
Last active June 13, 2025 05:12
Docker On Ubuntu Touch

Docker On Ubuntu Touch

How did we get here?

NOTE: The detailed building process for the boot and rootfs only works for devices using the GSI approach (Halium 10 and above).

UPDATE: My MR got merged, yay.

I like to give a purpose to the phones I don't use actively, so let's run Docker on one of them. My experience with running Docker on Ubuntu Touch was a bit rough. I compiled the kernel with the "required" configurations for Docker and lost Wi-Fi. After a couple of days (sigh), I remembered that our kernel uses modules for certain drivers, and one of them was for WLAN. After I generated my own rootfs and flashed it, Wi-Fi started working again. After installing the Apt version of Docker (We get to the reason later on), I got Docker to work—yay!

Ever wanted to change the Daria logo on your Daria Bond device? Now you can! Here's how:

Getting Started

  1. Download the mtklogo binary from the mtklogo repo.
  2. Get the default logo.bin from my Telegram channel.
  3. Put both files in the same folder along with my custom config.

Unpacking the Logo

import requests
headers = {
'accept': 'application/json',
'accept-language': 'en,fa-IR;q=0.9,fa;q=0.8',
'content-type': 'application/json',
'origin': 'https://foss.crave.io',
}
@itisFarzin
itisFarzin / reverse_number.py
Last active October 3, 2021 07:42
reverse number
def reverse_number(number: int):
return int(str(number)[::-1])
print(reverse_number(123))
@itisFarzin
itisFarzin / typing_action.py
Last active October 3, 2021 07:44
send message typing action to chat_id (async)
import pyrogram
chat_id = 777000
await app.send(pyrogram.raw.functions.messages.SetTyping(peer = await app.resolve_peer(chat_id), action = pyrogram.raw.types.SendMessageTypingAction()))