Skip to content

Instantly share code, notes, and snippets.

View ilsubyeega's full-sized avatar
🖕
Busy

ilsubyeega

🖕
Busy
View GitHub Profile
@taiwbi
taiwbi / gnome-transparent-sidebar.css
Last active July 20, 2024 19:17
Make Gnome applications sidebar semi-transparent, and add blur with Blur My Shell Extension if you want to
/* Mohammad Mahdi Tayebi
*
* To apply transparent sidebar. copy this file into ~/.config/gtk-4.0/gtk.css and if
* you use adw-gtk3 theme you can add it to ~/.config/gtk-3.0/gtk.css as well
*
* Use blur my shell extension to add blur effect behind the transparent part of windows
*/
/* Transparent Sidebar */
window {
@Theldus
Theldus / README.md
Last active June 5, 2024 12:18
The only proper way to debug 16-bit (x86) code on Qemu+GDB

The only proper way to debug 16-bit code on Qemu+GDB

(or nearly so...)

GDB is undeniably an extremely versatile debugger, with the ability to add breakpoints, watchpoints, dump memory, registers, and the source code (along with its corresponding assembly). These features make it the perfect Swiss Army knife for most programmers. In addition to that, the possibility of implementing a 'GDB Stub' and automatically supporting GDB in your application makes it an almost universal debugger for a variety of tasks.

Qemu, like other virtual machines (such as 86Box), also implements debugging via GDB Stub, which enormously facilitates the development of bootloaders, operating systems, and more. The support for 32-bit and 64-bit code is quite good, and I have never seen any complaints about it. However, for 16-bit/real mode...

Is debugging in 16-bit/real mode really that bad?

If you have ever tried to debug 16-bit code on Qemu, you know how painful it can be:

  1. GDB thinks your code is
@kennytv
kennytv / readme.md
Last active May 8, 2024 06:32
Signed Chat and Chat Types

Signed chat

This gist intends on clearing up some of the misinformation surrounding signed chat/the reporting feature Mojang has added to Minecraft 1.19.1. Here you can find both technical information as well as a general explanation of how these work.

Profile keys

After joining a server, clients now send a profile key used for verifying a message's authenticity. This key and thus the whole signing process is optional, but by default, servers enforce secure profiles for clients to send chat messages. Whenever the player sends a chat message and has a key associated, the message will be signed using their own private key, which the server then verifies using the public key sent after join. Assuming signature, timestamp, and message contents line up, the message goes through.

On the other end, clients can also require all broadcasted player messages to be signed, disregarding the ones without sender verified signatures.

Message signatures

@RanolP
RanolP / iosevka-nf-concentrator.mjs
Last active June 4, 2022 04:48
Download, Unzip, Classify.
import { promises as fs, constants as FS } from 'node:fs';
import { exec } from 'node:child_process';
import { promisify } from 'node:util';
import path from 'node:path';
const ColorRegex = /(?:\\([fFbB])([0-9]))|(\\0)/g;
function echo(templates, ...params) {
console.log(
String.raw(templates, ...params)
.replaceAll(ColorRegex, (_, fb, id, zero) =>
@entrypointkr
entrypointkr / JavaCVPlayer.java
Last active April 4, 2022 08:24
Minecraft draw video frame using JavaCV, OpenGL
import org.bytedeco.javacv.FFmpegFrameGrabber;
import org.bytedeco.javacv.Frame;
import org.bytedeco.javacv.FrameGrabber;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import org.lwjgl.opengl.GL30;
import javax.sound.sampled.*;
import java.awt.image.*;
import java.io.File;
@kiwiyou
kiwiyou / main.rs
Created September 1, 2021 09:11
Rust Fast I/O
fn main() {
let buf = stdin();
let mut token = buf.split_ascii_whitespace();
use std::fmt::Write;
// buf.clear();
let mut buf = String::new();
writeln!(buf, "{}", token.next().unwrap()).unwrap();
print!("{}", buf);
}
@VicnAbi
VicnAbi / README.md
Last active February 26, 2023 01:50
Akai Nabang filter

I have no right or responsibility for the filter, but please read and use this article.
If you use the filter on Nabi, please read https://aoinabii.tumblr.com/guideline
Please do not use filters for all scenes because of Twitch stream.
Don't try to make other streamers laugh or gain popularity without affection for Nabi.
Stop using immediately when Nabi tells you to stop.
I hope it doesn't become like a lot of banned Hololive EN memes now.

저에게 어떠한 책임도 권리도 없지만, 아래 글을 읽고 사용하기를 부탁합니다.
나비에게 이 필터를 사용할경우 https://aoinabii.tumblr.com/guideline 을 먼저 읽어주세요.
트위치 방송이라는 이유만으로 모든 장면에 필터를 걸지 말아주세요.

@FreddieOliveira
FreddieOliveira / docker.md
Last active July 22, 2024 05:32
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@Treeki
Treeki / TurnipPrices.cpp
Last active July 8, 2024 02:08
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
/*
It's now a package. You can find it here:
https://github.com/joshnuss/svelte-local-storage-store
*/
// Svelte store backed by window.localStorage
// Persists store's data locally