Skip to content

Instantly share code, notes, and snippets.

View ivon852's full-sized avatar

Ivon Huang ivon852

View GitHub Profile
@onomatopellan
onomatopellan / waydroidwsl2.md
Last active July 20, 2025 16:58
Waydroid in WSL2 with sound (Weston on top of Weston approach)

Waydroid in WSL2 with sound

Requirements

Recommended to install Waydroid in a brand new Ubuntu 25.04 install. Waydroid needs a custom linux kernel. Actually just needs latest kernel for WSL2 with just these changes before compiling:

CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
@samuelcolvin
samuelcolvin / cloudflare_page_delete_deployments.py
Last active March 8, 2025 07:29
Delete old CloudFlare Pages deployments to allow project deletion
import time
from datetime import datetime, timedelta, timezone
from httpx import Client, Response, HTTPError
ACCOUNT_ID = '...'
PROJECT_NAME = '...'
ENDPOINT = f'https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/pages/projects/{PROJECT_NAME}/deployments'
CF_API_TOKEN = '...'
EXPIRATION_BEFORE = datetime.now(timezone.utc) - timedelta(days=7)

Usage of virglrenderer

Introduction

virglrenderer is a library that gives emulators the necessary tools to implement a [virtio-gpu][] device, in particular one with 3D support. See capability sets below for a summary of the APIs virglrenderer can implement for the guest. It directly implements the logic behind some 3D commands like GET_CAPSET, CTX_CREATE, CTX_SUBMIT_3D, CREATE_RESOURCE_BLOB, and though it closely follows the semantics of virtio-gpu in most cases, it is in theory independent of virtio or any other transport.

Main user is [qemu][qemu-gpu-impl], but there also appears to be a [standalone virtio-gpu vhost-user][qemu-vhost-impl] implementation that uses virglrenderer in qemu/contrib.

virglrenderer's public header is at [src/virglrenderer.h][public-header]. This document attempts to outine the public API and contract, but you should look at the header for an authoritative source of truth since semantics described here could be slightly wrong or have changed, a

@lateautumn233
lateautumn233 / lxc.md
Last active June 29, 2025 02:50
在安卓上运行Lxc容器

Lxc on Android 📱

1. 编译内核

1.1. 调整内核配置

使用此仓库快捷添加配置

git fetch https://github.com/lateautumn233/android_kernel_docker main
git merge -s ours --no-commit --allow-unrelated-histories --squash FETCH_HEAD

Setup Altserver Linux on Raspberry Pi with Wifi Refresh

This is a rough outline on how to setup altserver-linux on the 🍓🍰. Wifi refreshing is enabled through the use of netmuxd, which acts as a proxy from AltServer to the iDevice (replaces/enhances usbmuxd).

Tutorials used

Prerequisites

@Theldus
Theldus / README.md
Last active December 19, 2024 11:18
Helping your 'old' PC build faster with your mobile device (no root required)

Helping your 'old' PC build faster with your mobile device

It all happened when I decided to run Geekbench 5 on my phone: surprisingly the single-core performance matched my 'old'¹ Pentium T3200 and surpassed it in multicore. Since I've been having fun with distcc for the last few days, I asked myself: 'Can my phone really help my old laptop build faster? nah, hard to believe... but let's try'.

Without further ado: YES. Not only can my phone be faster, but it can significantly help in the build process, I believe the results below speak for themselves:

asciicast

Building Git (#30cc8d0) on a Pentium T3200, 8m30s

asciicast Building Git (#30cc8d0) on a Pentium T3200 (2x 2.0 GHz)+ Snapdragon 636 (4x1.8 + 4x1.6 GHz), 2m9s

These instructions are based on this blogpost by Anton Semjonov and this video by Animortis Productions. Please follow the link if you want more details, they go into much more detail about each step, whereas this document is more focused on being a concise cheat sheet. Let's go.

Install base system

Boot the Ubuntu installation medium. When asked, choose the "Try Ubuntu" option and open a terminal.

Switch to root, otherwise you'll have to type sudo all the time:

sudo su -
@obrassard
obrassard / Cloudflare Tunnel Setup.md
Created February 26, 2022 03:40
This quick guide will help you set up a Cloudflare Tunnel on your Linux server

Cloudflare Tunnel Setup on Linux

This quick guide will help you set up a Cloudflare Tunnel on your Linux server !

Cloudflare Tunnel provides you with a secure way to connect your resources to the web without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP, instead, a lightweight daemon in your infrastructure (cloudflared) creates outbound-only connections to Cloudflare’s edge. Cloudflare Tunnel can connect HTTP web servers, SSH servers, remote desktops, and other protocols safely to Cloudflare. This way, your origins can serve traffic through Cloudflare without being vulnerable to attacks that bypass Cloudflare. (Source)

Getting Started

Pre-requisites

@ZenithalHourlyRate
ZenithalHourlyRate / GUD.md
Last active May 26, 2025 09:46
Use old phone as a second display: USB GUD with postmarketOS

Demo

Xiaomi Redmi 2 with resolution 1280x720 (GUD RGB565 with compression)

9.mp4
10.mp4

@interfect
interfect / castanet.sh
Last active May 30, 2025 07:08
Set up a Chromecast from a Linux PC, without an Android or iOS mobile device and without Google Home
#!/usr/bin/env bash
# castanet.sh: Script to connect a chromecast to a WiFi network.
#
# Allows you to put your Chromecast on WiFi and do Chromecast initial setup
# without using the Google Home app at all, just using a normal Linux computer.
#
# You do need your Chromecast to be on Ethernet, or (untested) to join its setup WiFi
# network with your PC, and you also need to find out its IP yourself with e.g.
# Wireshark.