Skip to content

Instantly share code, notes, and snippets.

View ryank231231's full-sized avatar
😪
I may be slow to respond.

ryank231231 ryank231231

😪
I may be slow to respond.
View GitHub Profile
@ibireme
ibireme / kpc_demo.c
Last active April 24, 2025 08:25
A demo shows how to read Intel or Apple M1 CPU performance counter in macOS.
// =============================================================================
// XNU kperf/kpc demo
// Available for 64-bit Intel/Apple Silicon, macOS/iOS, with root privileges
//
//
// Demo 1 (profile a function in current thread):
// 1. Open directory '/usr/share/kpep/', find your CPU PMC database.
// M1 (Pro/Max/Ultra): /usr/share/kpep/a14.plist
// M2 (Pro/Max): /usr/share/kpep/a15.plist
// M3: /usr/share/kpep/as1.plist
@emojifreak
emojifreak / clang-kbuild.sh
Last active December 5, 2023 03:27
Linux kernel compilation by clang as Debian .deb package
#!/bin/sh
if ! which clang ld.lld llvm-ar >/dev/null; then
echo "Please install clang, lld, and llvm packages."
exit 1
fi
if ! [ -d /usr/src/linux-config-5.15 ]; then
echo "Please install linux-config-5.15 package."
exit 1
@artem78
artem78 / SymbianDev-en.md
Last active April 26, 2025 07:53
Developing for Symbian OS guide

TJS2 VM

TJS2 compiles the script into binary code for the virtual machine (TJS2 VM) and then executes it.
A brief description of this virtual machine is provided, as the disassembly result of this TJS2 VM code is displayed when an exception occurs or when a dump is taken.

Instruction code

The TJS2 VM is independent for each execution unit such as functions and properties, and one function does not share the instruction code space, register space, flags, and constant area with other functions.
The instruction pointer (ip) always starts from 0 at the head of a function or the like.
A mnemonic is a simple human-readable name for an instruction code.

@kai11
kai11 / README.md
Created October 25, 2020 11:20
Running Archivebox through SOCKS5 proxy

Corresponding Archivebox issue ArchiveBox/ArchiveBox#249

I cannot use Wireguard because I cannot setup it on my VPS. i decided to use https://hub.docker.com/r/ncarlier/redsocks/ However, by default it generates redsocks config with unauthenticated http\https proxy, for SOCKS5 it must be modified.

Running Archivebox thorugh SOCKS5 proxy

1. Creating docker bridge with name "archivebox"

docker network create --opt com.docker.network.bridge.name=archivebox -d bridge archivebox
@probonopd
probonopd / Wayland.md
Last active May 22, 2025 02:02
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@egernst
egernst / ipmi-sol.md
Created March 4, 2020 17:51 — forked from krsna1729/ipmi-sol.md
ipmi serial over lan sol

Pre-requisites

Install IPMItools using your package manager on laptop and target machine. Load the drivers on the target.

modprobe ipmi_devintf
modprobe ipmi_si

If you see the following, drivers are not loaded.

@LukeZGD
LukeZGD / NekoparaExtraction.md
Last active March 26, 2025 19:56
Nekopara Data Extraction for Vol. 1, 0, 2, 3, 4, and Extra

Nekopara Data Extraction for Vol. 1, 0, 2, 3, 4, and Extra

  • This guide can also be used in other VNs that have the Kirikiri/CatSystem2 engine

Tools Needed:

@allenyllee
allenyllee / install_tools.sh
Last active April 3, 2025 12:17
mount vhdx in linux
#!/bin/bash
# install qemu utils
sudo apt install qemu-utils
# install nbd client
sudo apt install nbd-client