Skip to content

Instantly share code, notes, and snippets.

@MaxVerevkin
MaxVerevkin / main.rs
Last active August 22, 2022 08:45
list interfaces
// [dependencies]
// neli = "0.6.2"
#![allow(dead_code)]
use std::convert::TryInto;
use std::error::Error;
use std::net::{Ipv4Addr, Ipv6Addr};
use neli::attr::Attribute;
@MaxVerevkin
MaxVerevkin / auto_brightness.py
Last active August 27, 2020 19:50
Automatically adjust screen brightness based on webcam readings (no root privileges, works with both AMD and Intel, works on wayland)
#!/bin/env python3
from subprocess import run,PIPE
from time import sleep
import math
# Config
delay = 10
animation_duration = 10