Skip to content

Instantly share code, notes, and snippets.

@TheNotary
TheNotary / stuxnet_for_keyboards.md
Created September 13, 2024 21:58
I Accidentally Discovered the Stuxnet of Keyboards while Writing a Userspace HID Driver

I Accidentally Discovered the Stuxnet of Keyboards while Writing a Userspace HID Driver

Before we get into the secret codes I stumbled upon that are seemingly capable of mass destruction against a boutique mechanical keyboard company's product line... I want to explain my background and how I even wound up reverse engineering a keyboard and writing my own driver for it in C++. Most of the time, my professional work is done at a much higher level while engaged working on digital products. But lately I've been excited to be working on a Go server to handle the backend traffic for an upcoming multiplayer scavenger/ action title. Researching the real-time networking stuff has entailed reading and watching a lot of networking content authored by C++ gurus, with slides of C++ code cropping up left and right that only serve to raise more questions about C++ syntax than they answered about handling latency. Tired of the uncertainty, I finally decided to deep

@wiz4host
wiz4host / setup-users.groovy
Created November 6, 2018 17:25 — forked from johnbuhay/setup-users.groovy
jenkins init.groovy.d script for configuring users
import jenkins.*
import hudson.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
import hudson.model.*
import jenkins.model.*
import hudson.security.*
@johnbuhay
johnbuhay / setup-users.groovy
Created January 21, 2016 01:15
jenkins init.groovy.d script for configuring users
import jenkins.*
import hudson.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import hudson.plugins.sshslaves.*;
import hudson.model.*
import jenkins.model.*
import hudson.security.*
@bantic
bantic / bucket_sync_service.rb
Created November 15, 2012 19:47
ruby class to copy from one aws s3 bucket to another
require 'aws/s3' # gem name is 'aws-sdk'
class BucketSyncService
attr_reader :from_bucket, :to_bucket, :logger
attr_accessor :debug
DEFAULT_ACL = :public_read
# from_credentials and to_credentials are both hashes with these keys:
# * :aws_access_key_id
@ianmackinnon
ianmackinnon / match.c
Created August 8, 2012 12:01
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>