Skip to content

Instantly share code, notes, and snippets.

@hikiko
hikiko / win_line_endings.vim
Created Aug 15, 2021
Git "\ No newline at end of file" solution for VIM (*finallyyyyyy*)
View win_line_endings.vim
" 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 Aug 7, 2021
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
View appleseed_env.sh
#!/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 Jul 29, 2021
.asoundrc for jabra in build machine and other settings
View .asoundrc
pcm.jabra {
type hw
card 1
device 0
rate 48000
format "S16_LE"
channels 2
}
pcm.ReSpeaker {
@hikiko
hikiko / angle.gn
Last active May 18, 2021
gn args I've used to build ANGLE
View angle.gn
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 Mar 7, 2021
copy paste it to dump float rgba textures (*data = the pointer I'd give in TexImage2D)
View dump_float_rgba_tex.c
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 Mar 7, 2021
gn args I use in angle, on GDB: set directories $HOME/igalia/code/angle/out/Debug
View args.gn
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 Feb 18, 2021
set env for angle just notes to myself (I set those paths better in shctx Makefiles check each branch)
View iso_angle.sh
#!/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 Nov 19, 2020
perl script to create an index.html from a dir of images
View image-list.pl
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
use File::MimeInfo;
my @files;
@hikiko
hikiko / run_mustpass_selection.pl
Last active Nov 18, 2020
Reads CTS from files and runs them with run_cts.pl (previous gist).
View run_mustpass_selection.pl
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
use File::Copy 'move';
my $file_sel_tests = "";
@hikiko
hikiko / run_cts.pl
Last active Nov 18, 2020
Run and display a cts test, save the result image in a directory png/<testname.png> for later, ./run_cts -h
View run_cts.pl
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
use Getopt::Long;
use Cwd qw(cwd);
my $test = "";