This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use eye::prelude::*; | |
use minifb::{Window, WindowOptions}; | |
use std::{io, time}; | |
fn main() -> io::Result<()> { | |
// Query for available devices. | |
let devices = Context::enumerate_devices(); | |
if devices.is_empty() { | |
return Err(io::Error::new(io::ErrorKind::Other, "No devices available")); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate eye; | |
extern crate gdk_pixbuf; | |
extern crate glib; | |
extern crate gtk; | |
use std::thread; | |
use eye::hal::traits::Device; | |
use eye::prelude::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.reddit.com/r/VFIO/comments/7n38lh/2nd_amd_gpu_also_usable_in_host/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
# package(s) | |
sudo zypper install -y podman | |
# create mappable user ranges | |
sudo touch /etc/sub{u,g}id | |
sudo usermod --add-subuids 10000-65536 $(whoami) | |
sudo usermod --add-subgids 10000-65536 $(whoami) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# show elements in workspace overview on second monitor | |
# ref: https://elementaryos.stackexchange.com/questions/2732/workspaces-seem-to-only-apply-to-the-primary-display-is-this-a-feature-or-a-bug | |
gsettings set org.gnome.mutter workspaces-only-on-primary true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# zswap | |
# https://fedoraproject.org/wiki/Zswap | |
sudo -i | |
echo "add_drivers+=\"lz4 lz4_compress\"" | tee /etc/dracut.conf.d/lz4.conf | |
dracut --regenerate-all --force | |
# /etc/default/grub | |
GRUB_CMDLINE_LINUX=" ... zswap.enabled=1 zswap.max_pool_percent=25 zswap.compressor=lz4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/env python3 | |
import os | |
import stat | |
import sys | |
def main(): | |
argc = len(sys.argv) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
""" | |
k-means algorithm | |
""" | |
data_set = [[2, 2], | |
[2, 1], | |
[1, 1], | |
[0, 0], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
HOSTS_FILE="/etc/hosts" | |
# check if we are root | |
USER_ID=`id -u` | |
if [ "$USER_ID" != '0' ]; then | |
echo "This script must be run with root permissions, try again." | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/drivers/video/exynos/decon/decon_core.c b/drivers/video/exynos/decon/decon_core.c | |
index 7f1e9f0e066a..e4327b24e4f9 100644 | |
--- a/drivers/video/exynos/decon/decon_core.c | |
+++ b/drivers/video/exynos/decon/decon_core.c | |
@@ -2453,6 +2453,10 @@ static int decon_set_win_buffer(struct decon_device *decon, struct decon_win *wi | |
} | |
} | |
+ decon_err("GRALLOC_DEBUG: [win_no=%d] WIN_BUF_DUMP! SRC: x=%d, y=%d, w=%u, h=%u, f_w=%u, f_h=%u\n", win_no, win_config->src.x, win_config->dst.y, win_config->src.w, win_config->src.h, win_config->src.f_w, win_config->src.f_h); | |
+ decon_err("GRALLOC_DEBUG: [win_no=%d] WIN_BUF_DUMP! DST: x=%d, y=%d, w=%u, h=%u, f_w=%u, f_h=%u\n", win_no, win_config->dst.x, win_config->dst.y, win_config->dst.w, win_config->dst.h, win_config->dst.f_w, win_config->dst.f_h); |