Skip to content

Instantly share code, notes, and snippets.

View aleasto's full-sized avatar

Alessandro Astone aleasto

  • Europe
View GitHub Profile
@aleasto
aleasto / main.c
Last active November 17, 2023 18:05
Broken nvidia glGetTexImage
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <fcntl.h>
#include <unistd.h>
#include <gbm.h>
#include <epoxy/egl.h>
@aleasto
aleasto / Makefile
Last active November 16, 2023 22:11
Trying to break nvidia's glGetTexImage
CFLAGS ?= -std=c11 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -g
PKG_CONFIG ?= pkg-config
# Host deps
WAYLAND_FLAGS = $(shell $(PKG_CONFIG) wayland-client --cflags --libs)
WAYLAND_PROTOCOLS_DIR = $(shell $(PKG_CONFIG) wayland-protocols --variable=pkgdatadir)
# Build deps
WAYLAND_SCANNER = $(shell pkg-config --variable=wayland_scanner wayland-scanner)
@aleasto
aleasto / 03-mesa.xml
Last active July 8, 2022 17:31
Mesa 22.1 for waydroid
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="freedesktop" fetch="https://gitlab.freedesktop.org/" />
<remove-project name="WayDroid/android_external_mesa3d" />
<remove-project name="WayDroid/android_external_llvm90" />
<remove-project name="WayDroid/android_external_libdrm" />
<project path="external/mesa" name="aleasto/mesa" remote="freedesktop" revision="waydroid" />
<project path="external/llvm-project" name="maurossi/llvm-project" remote="ghub" revision="release_14.x"/>
@aleasto
aleasto / find-lol.sh
Created December 23, 2021 13:51
Lutris mobalytics find league of legends
#!/bin/bash
[ -z $GAMEDIR ] && GAMEDIR="$1"
[ -z $WINEBIN ] && WINEBIN="$2"
export GTK_USE_PORTAL=0
export WINE="$WINEBIN"
export WINEPREFIX="$GAMEDIR"
# Guess the league of legends installation path
@aleasto
aleasto / mobalytics.desktop
Created December 22, 2021 23:29
Lutris mobalytics url schema defintion
[Desktop Entry]
Type=Application
Name=mobalytics
Exec=##GAMEDIR##/mimehelper.sh "Mobalytics Desk" "%u"
StartupNotify=false
MimeType=x-scheme-handler/mobalytics;
X-KDE-Protocols=mobalytics
NoDisplay=true
@aleasto
aleasto / mimehelper.sh
Created December 22, 2021 23:15
Lutris mimehelper
#!/bin/bash
# Get process id (one of them)
PID=$(pidof "$1" | cut -d " " -f 1)
# Ignore if the program is closed
[ -z $PID ] && exit
# Copy WINE environment variables
export $(xargs -0 -L1 -a /proc/$PID/environ | grep WINE | grep -Ev "LOAD|SERVER")
#!/sbin/sh
#
# ADDOND_VERSION=3
#
# /system/addon.d/30-gapps.sh
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
diff --git a/colors/Breeze.colors b/colors/Breeze.colors
index a6989283..3f57c409 100644
--- a/colors/Breeze.colors
+++ b/colors/Breeze.colors
@@ -157,9 +157,9 @@ shadeSortColumn=true
contrast=4
[WM]
-activeBackground=71,80,87
+activeBackground=71,80,87,100
@aleasto
aleasto / LgeRILConstants.java
Last active July 12, 2018 22:55
lge d802 ril
package com.lge.internal.telephony;
import com.android.internal.telephony.RILConstants;
public interface LgeRILConstants extends RILConstants {
public static final int INVALID_PARAMETER = 29;
public static final int LGE_SC_MTK_INVALID_PARAMETER = 18;
public static final int LGE_SC_MTK_MISSING_RESOURCE = 16;
public static final int LGE_SC_MTK_NO_SUCH_ELEMENT = 17;
public static final int MTK_RIL_REQUEST_VENDOR_BASE = 2000;
01-01 14:25:53.066 5771 5932 E BrcmNfcNfa: nfc_ncif_cmd_timeout
01-01 14:25:53.069 5771 5932 E BrcmNfcJni: nfaDeviceManagementCallback: NFA_DM_NFCC_TIMEOUT_EVT; abort
01-01 14:25:53.069 5771 5932 E BrcmNfcJni: nfaDeviceManagementCallback: crash NFC service
01-01 14:25:53.070 5771 5932 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 5932 (AsyncTask #2), pid 5771 (com.android.nfc)
01-01 14:25:53.224 6017 6017 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
01-01 14:25:53.224 328 328 I /system/bin/tombstoned: received crash request for pid 5771
01-01 14:25:53.225 6017 6017 I crash_dump32: performing dump of process 5771 (target tid = 5932)
01-01 14:25:53.226 6017 6017 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-01 14:25:53.226 6017 6017 F DEBUG : Build fingerprint: 'lge/g2_open_com/g2:5.0.2/LRX22G/151061918340a:user/release-keys'
01-01 14:25:53.226 6017 6017 F DEBUG : Revision: '0'