Skip to content

Instantly share code, notes, and snippets.

@rsarrazin2
rsarrazin2 / Dockerfile
Created August 27, 2025 07:33
Enable Intel VTune on WSL
# ...
RUN cd /tmp && wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB \
&& rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB && add-apt-repository "deb https://apt.repos.intel.com/oneapi all main" \
&& apt update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends libgtk-3-0 intel-oneapi-vtune
@rsarrazin2
rsarrazin2 / gather_lines_from_file.bat
Created October 18, 2024 15:05
Batch file to collect lines from a file into a space-separated list stored into a variable exported to the call site
@echo off
rem Required to expand the list at every for step
setlocal enabledelayedexpansion
rem Reference: https://stackoverflow.com/a/33824457/1945549
set "list="
for /f "delims=" %%i in (%~dp0\local_file) do set list=!list! %%i
rem Pattern required to export variable to the call site
{
GoogleTestValue8
Memcheck:Value8
fun:_itoa_word
fun:__vfprintf_internal
fun:__vsnprintf_internal
fun:snprintf
...
}