Skip to content

Instantly share code, notes, and snippets.

View iago-lito's full-sized avatar

Iago-lito iago-lito

View GitHub Profile
@sigmaSd
sigmaSd / showkey.rs
Last active November 4, 2020 16:21
[dependencies] ctrlc = "3.1.7" libc = "0.2.80" scopeguard = "1.1.0" termios = "0.3.3"
use std::io;
use std::io::prelude::*;
use std::os::unix::io::AsRawFd;
use termios::*;
const KDSKBMODE: u64 = 0x4B45;
fn main() {
if let Err(e) = try_main() {
eprintln!("Something happened: {}", e);

Guix on WSL2

(updated versions of this document, plus more, live here)

This will show you how to get Guix running on WSL2.
We're going to go as "minimal" as possible, without starting off one of the readily available WSL2 distros.
Parts of this guide should help with understanding how to set up any custom distro on WSL, not just Guix.

Disclaimer: I'm a Guix nOOb! (hence going through the trouble of installing it on WSL2)

@ivanstepanovftw
ivanstepanovftw / vtune-amplifier-install.md
Last active March 1, 2023 12:11
Patch if Intel's shitty installer cant find libraries, but they are presents

If you cannot install Intel VTune Amplifier on Manjaro/Arch Linux (or other non-supported OS), because this shit cannot find installed libraries via ldconfig -p, you can use this script.
Unpack vtune_amplifier_2019_update3.tar.gz, then go to vtune_amplifier_2019_update3, then copy and paste following:

shopt -s globstar

for i in **/sysreq.cab; do
    echo "processing ${i}"
    perl -pi -e 's/(\W*)RESULT=255(.*)/\1RESULT=1  \2/' "${i}"  # COMPARE_VERSIONS() never returns 255
    perl -pi -e 's/(\W*)LI_(.+)=unsupp(.*)/\1LI_\2=ok    \3/' "${i}"