Skip to content

Instantly share code, notes, and snippets.

View bezzad's full-sized avatar
:octocat:
Hi

Behzad Khosravifar bezzad

:octocat:
Hi
View GitHub Profile
@jbe2277
jbe2277 / DiscoveryService.cs
Last active September 4, 2021 10:50
[Xamarin, MAUI] Parse IPAddress provided by iOS NetServiceBrowser (supports IPv4 and IPv6)
private void ServiceAddressResolved(object sender, EventArgs e)
{
var service = (NSNetService)sender;
var addresses = service.Addresses.Select(x => x.ToArray()).ToArray();
var ipAddress = GetIPAddress(addresses.First()); // Consider that resolve might provide multiple IP addresses
// ...
}
private static IPAddress? GetIPAddress(byte[] data)
{
@andrebrait
andrebrait / keychron_linux.md
Last active May 13, 2026 12:44
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@davidfowl
davidfowl / MinimalAPIs.md
Last active April 29, 2026 16:47
Minimal APIs at a glance
@mahmoud-eskandari
mahmoud-eskandari / README.md
Last active January 7, 2026 10:37
Install v2ray on Bridge:(Ubuntu +18 via systemd) - Upstream (Ubuntu +18/CentOS +7 via docker)

پنل x-ui

پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور

mkdir x-ui && cd x-ui
docker run -itd --network=host \
    -v $PWD/db/:/etc/x-ui/ \
 -v $PWD/cert/:/root/cert/ \