Skip to content

Instantly share code, notes, and snippets.

View aario's full-sized avatar

Aario aario

View GitHub Profile
@aario
aario / LLMs-on-Android-mali.md
Last active January 13, 2026 13:01
Running LLMs on Poco X7 Pro (Dimensity 8400 Ultra) via Termux and llama.cpp

Running Local LLMs on Android (MediaTek Dimensity / Mali GPU)

This guide documents how to compile and run llama.cpp natively on Android using Termux, specifically optimized for devices with Mali GPUs (like the Dimensity 8400 Ultra in the Poco X7 Pro).

Unlike Snapdragon devices, Mali GPUs require specific build flags and Vulkan loaders to work correctly.

📱 Hardware Tested

  • Device: Poco X7 Pro
  • SoC: MediaTek Dimensity 8400 Ultra
  • GPU: Mali-G720 MC7
@aario
aario / gcal-reminder
Last active August 9, 2024 15:22
Have a loud audible reminder on your desktop 10 minute before a google calendar event on linux desktops; Requires gcalcli, mpv and zenity; Modify the constants to your needs
#!/bin/bash
IFS=$'\n'
#dependencies:
# gcalcli
# zenity
# mpv
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
export DISPLAY=:0
@aario
aario / sorted-copy-mp3player
Created August 9, 2024 10:23
Play your music folders on non-folder mp3 players. This script copies your folder of music into a destination folder, making them perfectly suitable for mp3 players that Only play music by their ID3 tag and not by folder. You will have all files in 1 folder, named with md5sum of their parent folder and filename, have id3 tag of their album set t…
#!/bin/bash
IFS=$'\n'
source="$1"
dest="$2"
i=0
total=`find "$source" -type f -name '*.mp3' | wc -l`
for file in ` \
@aario
aario / kanboard-dark-theme.css
Last active June 9, 2020 11:40
Kanboard dark theme
/* ==UserStyle==
@name Kanboard Dark
@namespace github.com/openstyles/stylus
@version 0.0.1
@license MIT
@description Dark theme for Kanboard
@author Calinou
==/UserStyle== */
:root {
@aario
aario / jsScreenshot.html
Created April 7, 2020 11:44
Fetch screenshot cliend side using javascript and Google PageSpeedApi
<!DOCTYPE html>
<html>
<body>
URL: <input type="text" id="url" value="https://developers.google.com">
<p>Click the button to fetch screenshot.</p>
<button onclick="run()">Fetch</button>
<div id="results"></div>
No errors have been found.
@aario
aario / display-dual
Created March 7, 2017 08:47
Quickly enable external output on your laptop with one script. Modify it to match your setting at work place or home.
#!/bin/bash
external=`xrandr | grep connected | grep -v eDP1 | grep -v disconnected | head -1 | cut -d ' ' -f1`
xrandr --output $external --auto --output eDP1 --mode 1440x900 --pos 1920x1000
@aario
aario / status
Last active March 7, 2017 08:45
Hybrid statusbar daemon script for my fork of DWM with hybrid-bar support (See https://github.com/aario/dwm )
#!/bin/bash
[ -f /tmp/status ] || touch /tmp/status
while [ 1 ]; do
mem=`free | grep Mem | awk '{mem=($3-$7)*100/$2; printf "%2.0f\n", mem}'`
bat=`acpi -b | cut -d '%' -f1 | awk '{print $NF}'`
cpu_temp=`sensors | grep Core | head -1 | awk '{print $3}'`
curr_date=`date "+%a %d|%H:%M:%S" | tr -d '\n'`
#You can also write extra scripts which put text in /tmp/status to be displayed on your bar (i.e. current playing track)
extra_status=`cat /tmp/status | tr -d '\n'`
xsetroot -name "BAT:$bat""%|$curr_date"'$'"$extra_status""[MEM:$mem%] [BAT:$bat""%] [CPU:$cpu_temp] [$curr_date]"
@aario
aario / wallpaper
Last active March 7, 2017 08:41
Choose a random wallpaper every 30 minute. Works best with window managers like my DWM at: https://github.com/aario/dwm
#!/bin/bash
WALLPAPER_PATH="$HOME/Pictures/Wallpapers"
#Delay time below is something bizzare so you can skip this delay and switch to the next wallpaper by:
# pkill -f 1799
DELAY=1799
while [ 1 ]; do
count=`find $WALLPAPER_PATH -type f | wc -l`
@aario
aario / copy-libs
Created December 11, 2016 15:55
Copy libraries required by a linux binary file
#!/bin/bash
#This script reads a binary file and tries to copy all the linked libraries from /usr folders to ./lib
#Usefull for creating portable packages for linux.
set -e
mkdir -p ./lib
copylibs() {
for lib in `ldd $1 | grep '=>' | awk '{print $1}'`; do
if [ -f ./lib/`basename $lib` ]; then