Skip to content

Instantly share code, notes, and snippets.

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
@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. *
\*************************************************************************/

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 / 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"
@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 / s3_multipart_upload.py
Last active August 22, 2018 16:55 — forked from teasherm/s3_multipart_upload.py
boto3 S3 Multipart Upload
import argparse
import os
import boto3
from botocore.exceptions import ClientError
class S3MultipartUpload(object):
# AWS throws EntityTooSmall error for parts smaller than 5 MB
PART_MINIMUM = int(5e6)
@evanslify
evanslify / s3_multipart_upload.py
Created August 22, 2018 08:15 — forked from fabiant7t/s3_multipart_upload.py
Parallel S3 multipart upload with retries
import logging
import math
import mimetypes
from multiprocessing import Pool
import os
from boto.s3.connection import S3Connection
from filechunkio import FileChunkIO
@evanslify
evanslify / iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment.md
Created April 8, 2018 06:23
iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

Keybase proof

I hereby claim:

  • I am evanslify on github.
  • I am evanslify (https://keybase.io/evanslify) on keybase.
  • I have a public key whose fingerprint is 4D39 117A 15CE 8864 471E 6C93 9A9E 08BA E30B 3605

To claim this, I am signing this object:

const performance = require('perf_hooks').performance
const cluster = require('cluster');
const http = require('http');
const numCPUs = require('os').cpus().length;
if (cluster.isMaster) {
for (let i = 0; i < numCPUs; i++) {
cluster.fork()
}
} else {