Skip to content

Instantly share code, notes, and snippets.

baryluk /
Last active Jul 24, 2021
Mesa and libdrm git, amdgpu build 64-bit and 32-bit for Debian testing and unstable, and possibly Ubuntu, Mint, PopOS, etc. No root required.
# A simple script to build 64-bit and 32-bit libdrm, Mesa and vkpipeline-db
# on amd64 Debian testing, Debian unstable, and possibly some Ubuntu
# with some tweaks.
# libdrm is build too, because version right now in Debian sid and experimental
# is too old for current mesa git repo. Also it is nice to build debug
# versions of libdrm when troubleshooting some crashes and bugs.
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&
Last active Aug 29, 2021
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.
View VAAPI-hwaccel-encode-Linux-Ffmpeg&

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

XVilka /
Last active Sep 21, 2021
True Colour (16 million colours) support in various terminal applications and terminals

Most updated version is always available at termstandard/colors repository.

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
offlinehacker / seeker.c
Created Sep 14, 2012
Disk seek time measure
View seeker.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <time.h>
#include <signal.h>
#include <sys/fcntl.h>
#include <sys/ioctl.h>