Skip to content

Instantly share code, notes, and snippets.

@csmr
csmr / install.ansible.deps.debian.sh
Created March 15, 2024 10:41
Basic Debian 12 Ansible bootstrap
#!/bin/bash
# caveat emptor
# Update package lists
apt update
# Install Ansible dependencies
apt install -y python3 python3-pip
@csmr
csmr / gist:8ca39a96954948f0425d4e562236007b
Last active March 15, 2024 08:07
Debian 12 devbox installer script
#!/bin/bash
installer_version="0.0.1"
echo "Dev stuff installer for Debian. User needs to have sudo and wget installed."
set -e # exit immediately on error
# install basic tools
devbox_pack=(
@csmr
csmr / stratagame.txt
Last active July 20, 2022 19:17
Strategy game names
Disciples Of Exoplanet Stratagem
Cyber-Noir Lidar Mutineers
Dies Noir Manouver
C.Y.B.E.R.-.N.O.I.R.
Cyber-Noir Powerstucture Cult
Head and the Angry Chiefs
Au Revoir Lidar!
Rage Against the Lidar
Lidarhead Stratagem
@csmr
csmr / spiral.mock.rewrite.2022.js
Created June 1, 2022 07:58
Mock canvas gfx gen with functional style
<!DOCTYPE html>
<html>
<head>
</head>
<body onLoad="run()">
<script>
// JS Kompositio 2022 spiraaligeneraattorille
// funktionaalista eli ei mutatoi tilaa, SRP, funktiotparametrit ~ g(f(x))
// Onko graffageneraattori muuta kuin ketju funktioita?
$ 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 March 21, 2022 01:42
Debian 10 Intel GPU driver setting
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
ValueObject = function(value) {
this.value = value;
}
$.extend(ValueObject.prototype, {
get: function() {
return this.value;
}
});
@csmr
csmr / camspec.202010.txt
Last active October 24, 2020 21:59
Spec for a camera 10/2020
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 November 28, 2019 19:15
Initial fibonacci fn draft
// 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 March 14, 2019 22:07
Process spawning and named-pipe inter-process messaging between them (infinite loops)
# 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