Skip to content

Instantly share code, notes, and snippets.

@kajott
kajott / vaapi_egl_interop_example.c
Last active November 12, 2024 08:22
example code for minimal-overhead hardware-accelerated video decoding and display on Linux using VA-API/EGL interoperability
#if 0 // self-compiling code: chmod +x this file and run it like a script
BINARY=vaapi_egl_interop_example
gcc -std=c99 -Wall -Wextra -pedantic -Werror -g -fsanitize=address -o $BINARY $0 \
`pkg-config libavcodec libavformat libavutil libva gl egl libdrm --cflags --libs` \
-lX11 -lva-x11 -lva-drm || exit 1
test "$1" = "--compile-only" && exit 0
exec env ASAN_OPTIONS=fast_unwind_on_malloc=0 ./$BINARY $*
#endif /*
Minimal example application for hardware video decoding on Linux and display
@RobertAKARobin
RobertAKARobin / python.md
Last active October 12, 2024 17:37
Python Is Not A Great Programming Language
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
Disable "heads up" notifications in Android 7
$ adb shell settings set global heads_up_notifications_enabled 0
@smarr
smarr / truffle-material.md
Last active May 14, 2024 07:48
Truffle: Languages and Material
@ayosec
ayosec / cypher.rb
Last active August 29, 2015 14:26
Launch Cypher queries
#!/usr/bin/env ruby
case ARGV.size
when 1
host = ARGV[0]
body = STDIN.read
when 2
host = ARGV[0]
body = ARGV[1]
else
Interconnect: LAN(1GB)
Server: 12 core Xeon E5-2620 at 2Ghz, 16GB RAM
Client running on idle node with similar h/w configuration. Used latest wrk2 release
https://github.com/giltene/wrk2
Tried different configuration options, results for configuration that gave best results
See also: https://gist.github.com/markpapadakis/dee39f95a404edfb8d6c
# Apache2: http://10.5.5.20/index.html
Requests/sec: 83704.15
> More or less expected that kind of throughput