Skip to content

Instantly share code, notes, and snippets.

@evanslify
evanslify / kde_screenshot_to_clipboard.sh
Last active February 18, 2019 10:11
Take screenshot to clipboard in KDE
# Take regional screenshot
spectacle -nbr -o /dev/stdout | xclip -sel clip -t image/png && notify-send -t 2000 'Regional Screenshot Taken'
# Take full screenshot
spectacle -nbf -o /dev/stdout | xclip -sel clip -t image/png && notify-send -t 2000 'Full Screenshot Taken'
# Take screenshot of current focused window
spectacle -nba -o /dev/stdout | xclip -sel clip -t image/png && notify-send -t 2000 'Window Screenshot Taken'
@evanslify
evanslify / 99-hhkb-power.rules
Created June 20, 2020 06:13
Disable power key on HHKB
# /etc/udev/rules.d/99-hhkb-power.rules
# after writing this file, run:
# systemctl restart systemd-udevd.service
# udevadm trigger
# systemctl restart systemd-logind.service
ACTION=="remove", GOTO="hhkb_power_end"
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="Topre Corporation HHKB Professional", TAG-="power-switch"
LABEL="hhkb_power_end"

Windows Embedded CE 6.0 Advanced Memory Management

Douglas Boling

February 2007

Summary

This article covers how the new version of Windows Embedded CE handles memory, how it is architected, and what impacts these changes will have on applications.

Important

@evanslify
evanslify / demo_inotify.c
Created March 5, 2021 03:21
inotify/demo_inotify.c from The Linux Programming Interface with no extra headers
/*************************************************************************\
* Copyright (C) Michael Kerrisk, 2020. *
* *
* This program is free software. You may use, modify, and redistribute it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation, either version 3 or (at your option) any *
* later version. This program is distributed without any warranty. See *
* the file COPYING.gpl-v3 for details. *
\*************************************************************************/

Fix microphone mute LED on ThinkPad T14s Gen 2 AMD (Linux)

On this model, the indicator of micphone mute is not working properly in Linux due to how the device is implemented in ALSA and pulseuaio. The microphone device is suplex and has its micrphone LED event set to the wrong one.

Use the following script to fix this:

#!/bin/bash