Skip to content

Instantly share code, notes, and snippets.

View RellikJaeger's full-sized avatar
:octocat:
Learning...

Rellik Jaeger RellikJaeger

:octocat:
Learning...
View GitHub Profile
@RellikJaeger
RellikJaeger / gist:ec356a4afd57d7df4ddf81393c7ee4bb
Created January 5, 2026 13:23
Custom stderr-silent prefix function. Copy and paste this code into `~/.bashrc` or `~/.zshrc`, then run `source ~/.bashrc` or `source ~/.zshrc`.
# Custom stderr-silent prefix function
# Example: `_ find / -name pkgx`
# This will silence stderr in the output
_() {
# if first arg is "_", shift it
if [[ "$1" == "_" ]]; then
shift
fi
"$@" 2>/dev/null
}
@RellikJaeger
RellikJaeger / _creating_a_purely_cpp_android_app_with_the_ndk.md
Created July 12, 2025 19:01 — forked from jonnybrooks/_creating_a_purely_cpp_android_app_with_the_ndk.md
Creaing a purely C++ Android app with the NDK (and without Android Studio)

Creating a purely C++ Java app with the NDK (and without Android Studio)

There are a few main steps to getting this working:

  1. Install tools - Android SDK (along /w JDK and build-tools), and the NDK
  2. Configure project - setting up AndroidManifest.xml, adding android_native_app_glue to your project
  3. Build - setup Android.mk for use with ndk-build, and write a simple build script to pipe it all together

Install tools

If you haven't already, you'll need to install the Android SDK (which I think includes the JDK? Otherwise grab that as well), the Android NDK, and the SDK build-tools. You can do that using SDK manager. Downloading these will get you the following tools:

  • ndk-build (NDK) - for building the final .so file for the .apk
  • aapt (build-tools) - this is for packaging your .apk (app) file
@RellikJaeger
RellikJaeger / LICENSE
Created February 9, 2023 11:22 — forked from lifeparticle/LICENSE
Custom Edittext with Line Number
MIT License
Copyright (c) 2023 Mahbub Zaman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@RellikJaeger
RellikJaeger / LineNumberedEditText
Created February 9, 2023 11:20 — forked from francisnnumbi/LineNumberedEditText
implementing an EditText with line number on the left. What is new is: - get/set line number margin gap - set line number visible - set line number color Everything is done in the overridden onDraw() method.
import android.widget.*;
import android.util.*;
import android.content.*;
import android.graphics.*;
/**
* the simple implementation of an EditText where each line is numbered on the left
*/
public class LineNumberedEditText extends EditText {
@RellikJaeger
RellikJaeger / WSL2GUIXvnc-en.md
Created January 14, 2023 19:07 — forked from tdcosta100/WSL2GUIXvnc-en.md
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key components we need to install are tigervnc-standalone-server and systemd-genie.

For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

So let's go. First, we need a working [WSL2](https://docs.microsoft.com/pt-br/windows/wsl/w

@RellikJaeger
RellikJaeger / duplicates.py
Created September 13, 2022 02:20 — forked from tfeldmann/duplicates.py
Fast duplicate file finder written in python
#!/usr/bin/env python
"""
Fast duplicate file finder.
Usage: duplicates.py <folder> [<folder>...]
Based on https://stackoverflow.com/a/36113168/300783
Modified for Python3 with some small code improvements.
"""
import os
import sys
@RellikJaeger
RellikJaeger / AnimePahe auto downloader.js
Last active September 12, 2025 06:51
AnimePahe auto downloader for Tampermonkey
// ==UserScript==
// @name AnimePahe auto downloader
// @namespace https://gist.github.com/RellikJaeger/cdbf58eec030a87235fd20703527ff0f
// @version 0.5.5
// @description AnimePahe auto downloader
// @author Rellik Jaeger
// @match https://animepahe.com/play/*/*
// @match https://animepahe.org/play/*/*
// @match https://animepahe.ru/play/*/*
// @match https://pahe.win/*
@RellikJaeger
RellikJaeger / AnimePahe new download page redirect timer bypass.js
Created February 23, 2022 03:20
AnimePahe new download page redirect timer bypass script for Tampermonkey.
// ==UserScript==
// @name AnimePahe new download page redirect timer bypass.
// @namespace http://github.com/RellikJaeger
// @version 0.1
// @description AnimePahe new download page redirect timer bypass.
// @author Rellik Jaeger
// @match *://pahe.win/*
// @include *://kwik.cx/f/*
// @icon https://www.google.com/s2/favicons?domain=animepahe.ru
// @grant none
@RellikJaeger
RellikJaeger / include.js
Last active February 22, 2022 21:22
Include external javascript file using javascript dom. Check this example: https://replit.com/@RellikJaeger/A-way-to-include-external-javascript-files
'use strict';let include=(f)=>document.head.appendChild(document.createElement('script')).src=f;
@dbrookman
dbrookman / build-mpv_silicon.sh
Last active November 8, 2025 21:39
How to build mpv & mpv.app on an Apple silicon Mac
#!/usr/bin/env bash
# Builds mpv & mpv.app on Apple silicon Macs.
# Run this script from the root directory of the mpv repo.
# if anything fails, gtfo
set -ex
meson setup build
meson compile -C build