Skip to content

Instantly share code, notes, and snippets.

View gist:3ce0afa977c133f09506d1e535848857
$ lspci | grep -ie VGA
$ sudo lspci -s 00:02.0 -k -nn -vvv
$ aptitude show mesa-va-drivers mesa-vdpau-drivers | grep -ie ^version -ie ^package
$ inxi -G --display
Graphics: Device-1: Intel UHD Graphics 630 driver: i915 v: kernel
Display: x11 server: X.org 1.20.4 driver: modesetting unloaded: fbdev,vesa tty: 187x59
Message: No advanced graphics data found on this system.
@csmr
csmr / intel-gpu-debian-10-debug.txt
Created Mar 21, 2022
Debian 10 Intel GPU driver setting
View intel-gpu-debian-10-debug.txt
https://forums.debian.net/viewtopic.php?t=142585 Intel graphics on Buster
https://forums.debian.net/viewtopic.php?t=143813 Configuring Intel integrated graphics processor on Debian 10
https://manpages.debian.org/testing/xserver-xorg-video-intel/intel.4.en.html man xorg.conf
https://packages.debian.org/buster/firmware-misc-nonfree firmware-misc-nonfree
$ sudo lspci -vk|grep -A 15 Bridge
00:00.0 Host bridge: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers (rev 07)
Subsystem: ASRock Incorporation 8th Gen Core Processor Host Bridge/DRAM Registers
Flags: bus master, fast devsel, latency 0
View gist:c10604f63de267b73ec98dc1b7a9465c
ValueObject = function(value) {
this.value = value;
}
$.extend(ValueObject.prototype, {
get: function() {
return this.value;
}
});
@csmr
csmr / camspec.202010.txt
Last active Oct 24, 2020
Spec for a camera 10/2020
View camspec.202010.txt
Videocamera
Minimal requirements:
- FHD @ 60 fps.
- realtime HDMI video-out, without in-camera menu-titles or date superimposed, or can be disabled.
- can be USB-powered while operated.
- SD memory card.
- Electronic Image Stabilization, that can be disabled.
- Price < €200.
- format can be photography/actioncam.
@csmr
csmr / fibo.with.memoization.txt
Last active Nov 28, 2019
Initial fibonacci fn draft
View fibo.with.memoization.txt
// fibo with memoization
spiralVertices = function ( args ) {
let fibmemo = []
function fibocas ( n, fibmemo ) {
fibmemo = fibmemo || {}
if (n < 1) return fm 0 // magik num
if (n < 2) return fm 1
if (fibmemo[n]) return fibmemo[n]
return fibmemo[n] = fibocas ( n-1, fibmemo ) + fibocas ( n-2, fibmemo )
}
@csmr
csmr / pipedprocs.rb
Created Mar 14, 2019
Process spawning and named-pipe inter-process messaging between them (infinite loops)
View pipedprocs.rb
# Module for handling process spawning, interproc messaging, and process logging
module PipedProcs
module NamedPipe
## IO methods for named pipe IPC fifo
## requires OS supports File.mkfifo.
# Open one end of named pipe
# @argument pipe_path - path to fifo
# @argument flag - r, w, w+ - open in read/write mode
@csmr
csmr / pipedprocs.draft.rb
Last active Mar 14, 2019
Process handling with spawning and named-pipe messaging (some pseudocode)
View pipedprocs.draft.rb
# Module for handling process spawning, interproc messaging, and process logging
module PipedProcs
module NamedPipe
## IO methods for named pipe IPC fifo
## requires OS supports File.mkfifo.
# Open one end of named pipe
# @argument pipe_path - path to fifo
# @argument flag - r, w, w+ - open in read/write mode
@csmr
csmr / stylesheet.delet0r.js
Created Feb 12, 2019
[js] Deleting stylesheets from DOM
View stylesheet.delet0r.js
var list = doc.querySelectorAll('link[rel=stylesheet]');
// Remove all stylesheet references
list.forEach( el => {
el.parentNode.removeChild(el);
});
@csmr
csmr / helpers-and-use-snippet.rb
Last active Oct 21, 2018
Succintifying the POSIX named pipe comm in 3 processes of the lilgameng...
View helpers-and-use-snippet.rb
# ...
# somewhere in class initialize
# create file path string
fpath_eng_srv = "/user/home/dir/engine2state.pipe"
# open a named pipe
@pipe_from_eng = named_pipe( fpath_eng_srv, "r", "ENG: HELO SRV" )
# ...
# These called in the process loop
# get_input
View gist:177daf69dfaffed11306f9a5b6fa0cbf
# Reads from a named pipe
# @agument timeout_secs_int - timeout for waiting on something to read
# @return nil if nothing to read
def read_line_nonblocking( pipe_handle_io, timeout_secs_int=0 )
rwe = IO.select([pipe_handle_io], [], [], timeout_secs_int)
msg = rwe[0][0].gets unless rwe==nil || rwe[0][0]==nil
msg.strip if msg!=nil
end
# read_pipes