This file contains hidden or 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
| /* Copyright 2021 @ Keychron (https://www.keychron.com) | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 2 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or 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 | |
| set -e | |
| arch=$(uname -m) | |
| apt update && apt install -y libzstd-dev liblzma-dev libbz2-dev zlib1g-dev libacl1-dev libtinfo-dev libncurses-dev libbsd-dev pkg-config cmake byacc git build-essential clang lld autoconf libtool meson flex wget curl | |
| export CC=clang | |
| export CXX=clang++ | |
| export LD=ld.lld | |
| export CXXFLAGS="-std=c++17" | |
| export LDFLAGS="-ltinfo" |
This file contains hidden or 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
| local mp = require 'mp' | |
| -- Track which EQ preset is active | |
| local active_preset = nil | |
| local auto_eq_mode = nil -- "bass", "treble", or nil | |
| local volume_adaptive_enabled = false -- toggled by Ctrl+4 | |
| -- Helper function to apply an EQ preset | |
| local function apply_eq(name, filters) | |
| if active_preset == name then |
This file contains hidden or 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
| local mp = require 'mp' | |
| -- Track which EQ preset is active | |
| local active_preset = nil | |
| -- Helper function to apply an EQ preset | |
| local function apply_eq(name, filters) | |
| if active_preset == name then | |
| mp.commandv("af", "clr") | |
| mp.osd_message("🔄 EQ Reset (Flat)", 3) |
This file contains hidden or 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
| /* | |
| * List directories using getdents() because ls, find and Python libraries | |
| * use readdir() which is slower (but uses getdents() underneath. | |
| * | |
| * $ gcc gs.c -o gs | |
| */ | |
| #define _GNU_SOURCE | |
| #include <fcntl.h> | |
| #include <stdio.h> |
This file contains hidden or 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
| #define _GNU_SOURCE | |
| #include <dirent.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <sys/stat.h> | |
| #include <sys/syscall.h> | |
| #include <string.h> | |
| #include <limits.h> |
This file contains hidden or 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
| /* | |
| * List directories using getdents() because ls, find and Python libraries | |
| * use readdir() which is slower (but uses getdents() underneath. | |
| * | |
| * Compile with | |
| * ]$ gcc getdents.c -o getdents | |
| */ | |
| #define _GNU_SOURCE | |
| #include <dirent.h> /* Defines DT_* constants */ | |
| #include <fcntl.h> |
This file contains hidden or 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
| /* | |
| * List directories using getdents() because ls, find and Python libraries | |
| * use readdir() which is slower (but uses getdents() underneath. | |
| * | |
| * Compile with | |
| * ]$ gcc getdents.c -o getdents | |
| */ | |
| #define _GNU_SOURCE | |
| #include <dirent.h> /* Defines DT_* constants */ | |
| #include <fcntl.h> |
This file contains hidden or 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 logging | |
| import base64 | |
| import getpass | |
| import struct | |
| from fido2.hid import CtapHidDevice | |
| from fido2.ctap2 import CredentialManagement, Ctap2, ClientPin | |
| from fido2.ctap2.bio import BioEnrollment | |
| # Configure logging (only log errors and above) | |
| logging.basicConfig(level=logging.ERROR) |
This file contains hidden or 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
| /* Copyright 2021 @ Keychron (https://www.keychron.com) | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 2 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
NewerOlder