Skip to content

Instantly share code, notes, and snippets.

@hikiko
hikiko / game_hacks.sh
Last active November 29, 2022 18:43
changes in scripts etc for various games to play
# Playing retro 32bit games (eg ABC murders) changes in start.sh:
# 1. install 32-bit mesa and MangoHud:i386
# 2. add the following lines to start.sh
export vsync_blank=1
LD_PRELOAD=/usr/lib/i386-linux-gnu/mangohud/libMangoHud.so ./"The ABC Murders.x86" # instead of ./"The ABC Murders.x86"
# Playing latest Monkey Island:
# edit ~/.local/share/Terrible Toybox/Return to Monkey Island/Prefs.json and add the following line:
renderer="opengl"
@hikiko
hikiko / .config
Created January 6, 2022 18:37
drm-tip kernel config - for experiments
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.15.0-rc5 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.2.0-10) 11.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23700
@hikiko
hikiko / win_line_endings.vim
Created August 15, 2021 17:20
Git "\ No newline at end of file" solution for VIM (*finallyyyyyy*)
" When git complains about line endings with this message:
" \ No newline at end of file
" the easier fix is to use the following VIM command:
set noendofline binary
@hikiko
hikiko / appleseed_env.sh
Last active August 7, 2021 18:58
the commands I use to setup the appleseed environment on Debian (made it it script mostly for the highlight), it's *different* from the instructions in the documentation
#!/usr/bin/bash
export APPLESEED_DEPENDENCIES=/home/eleni/code/forks/appleseed/prebuilt-linux-deps
export CMAKE_INCLUDE_PATH=$APPLESEED_DEPENDENCIES/include
export CMAKE_LIBRARY_PATH=$APPLESEED_DEPENDENCIES/lib
export LD_LIBRARY_PATH=$APPLESEED_DEPENDENCIES/lib:$LD_LIBRARY_PATH
export LD_RUN_PATH=$APPLESEED_DEPENDENCIES/lib:$LD_RUN_PATH
export QT5_DIR=/usr/lib/x86_64-linux-gnu/qt5
mkdir -p $HOME/code/forks/appleseed/build
cd $HOME/code/forks/appleseed/build
@hikiko
hikiko / .asoundrc
Last active March 13, 2023 11:27
.asoundrc for jabra in build machine and other settings
#############################################################################
# in /etc/udev/rules.d/10-usb-sound.rules:
#############################################################################
SUBSYSTEM=="sound", ATTRS{idVendor}=="<foo>", ATTRS{idProduct}=="<bar>" MODE="0666", GROUP="users"
################ actual .asoundrc ###########################################
pcm.plugdmix {
type plug
@hikiko
hikiko / angle.gn
Last active May 18, 2021 10:57
gn args I've used to build ANGLE
use_debug_fission = false
strip_debug_info = false
enable_iterator_debugging = false
is_debug = true
use_dwarf5 = false
enable_dsyms = true
symbol_level = 2
dcheck_always_on = true
supports_llvm = false
@hikiko
hikiko / dump_float_rgba_tex.c
Last active March 7, 2021 18:34
copy paste it to dump float rgba textures (*data = the pointer I'd give in TexImage2D)
static bool
dump_float_image_rgba(const char *fname,
int w, int h,
float *data)
{
FILE *fp;
int i;
float *p;
if (!(fp = fopen(fname, "wb"))) {
@hikiko
hikiko / args.gn
Last active March 7, 2021 18:30
gn args I use in angle, on GDB: set directories $HOME/igalia/code/angle/out/Debug
clang_emit_debug_info_for_profiling = true
enable_iterator_debugging = true
is_debug = true
symbol_level = 2
use_dwarf5 = false
strip_debug_info = false
use_debug_fission = false
@hikiko
hikiko / iso_angle.sh
Created February 18, 2021 18:54
set env for angle just notes to myself (I set those paths better in shctx Makefiles check each branch)
#!/bin/sh
PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \[\033[0;36m\]\h \w\[\033[0;32m\]$(__git_ps1)\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\] '
PS1="[angle] $PS1"
export PATH=$PATH:$HOME/igalia/install/bin:~/igalia/code/depot_tools
export LD_LIBRARY_PATH=/home/eleni/igalia/code/angle/out/Debug:/home/eleni/igalia/install/lib
export LD_RUN_PATH=/home/eleni/igalia/code/angle/out/Debug:/home/eleni/igalia/install/lib
export LIBGL_DRIVERS_PATH=$HOME/igalia/install/lib/x86_64-linux-gnu/dri/
export MESA_DEBUG=1
@hikiko
hikiko / image-list.pl
Last active October 11, 2022 01:35
perl script to create an index.html from a dir of images
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
use File::MimeInfo;
my @files;