Skip to content

Instantly share code, notes, and snippets.

View jackhumbert's full-sized avatar

Jack Humbert jackhumbert

View GitHub Profile
@dogtopus
dogtopus / ds5.desc.xml
Last active September 19, 2024 07:45
DualSense descriptor
<?xml version="1.0"?>
<!--
DualSense (DS5) USB HID Report Descriptor
Documentation WIP
TODO: Extract info from hid-playstation and cross-verify with us.
-->
@rfuzzo
rfuzzo / witcher3_cr2w.ksy
Last active November 10, 2021 15:06
witcher 3 cr2w kaitai ksy
meta:
id: cr2w
endian: le
seq:
- id: header
type: cr2w_header
@mootari
mootari / observable-style.css
Created May 24, 2020 19:49
Monokai for ObservableHQ
/* ==UserStyle==
@name Monokai for Observable
@namespace github.com/openstyles/stylus
@version 1.0.0
@description Overrides the Observable CodeMirror theme with Monokai.
@author -
==/UserStyle== */
@-moz-document domain("observablehq.com") {
/* Based on Sublime Text's Monokai theme */
@vini-guerrero
vini-guerrero / Create_IsoCam.py
Created March 18, 2020 03:11 — forked from krasnovpro/Create_IsoCam.py
Creates a true isometric camera in blender
# This script creates two kinds of isometric cameras.
#The one, TrueIsocam called camera, is the mathematical correct isometric camera with the 54.736 rotation to get the 30 degrees angles at the sides of the rhombus.
#The other, GameIsocam called camera, is a camera with which you can render isometric tiles for a 2d game. Here we need a 60 degrees angle instedad of the 54.736 one to get a proper stairs effect and a ratio of 2:1
# Then there is the special case with a 4:3 ratio, which is button 3. You can also make 2D games with that one. The view is more topdown though as with a 2:1 ratio of the traditional game iso view.
# The fourth button creates a simple groundplane where you can place your stuff at.
#You can of course set up everything by hand. This script is a convenient solution so that you don't have to setup it again and again.
# The script is under Apache license
@acklavidian
acklavidian / olkb.12h.sh
Created June 11, 2019 14:26
Bitbar Script for tracking OLKB order...
#!/usr/bin/env bash
order_number=100001111
orders=$(curl -s https://orders.olkb.com | grep -E '10000\d{4}')
order_count=$(echo "$orders" | wc -l)
order_line=$(echo "$orders" | grep -n $order_number)
order_position=$(echo "$order_line" | grep -o '^\d*')
echo olkb:$order_position
echo '---'
echo total:$order_count
echo "Order#:$order_number"

Wooting USB config protocol

The Wooting config is based around a USH HID Generic interface. The base of this report is from the AVR ASF (http://ww1.microchip.com/downloads/en/appnotes/doc8499.pdf). If I remember correctly there are some slight changes, but nothing to major.

With this generic interface you can basically read and write bytes however you want it. The PC (host) will always initiate the configuration.

The Report In and Out are set as 128 bytes. The feature report size is 8 bytes.

There are two main parts in the protocol:

  1. Commands
  2. Reports
@nooges
nooges / VIA Porting Info.md
Last active November 17, 2022 15:57
Info on adding VIA Configurator support to a board using QMK

Making a board compatible with VIA Configurator

💥NOTE💥: Don't do this yet, all of this stuff is still 🚑💣BLEEDING EDGE💣🚑, and you will 🔪cut yourself🔪 badly if you choose to do it. Please wait for 🗿Wilba's QMK code to be refactored prior to pushing anything to QMK, as we don't want to end up with a bunch of different forks of the code.

So you've seen VIA Configurator in action, and you want to get this magic supported for your board?

There's two main steps:

  1. Add dynamic keymap support to keyboard in QMK
  2. Add layout to VIA
@lynn
lynn / kardytrixe.md
Last active May 6, 2021 13:10
la kardytrixe

This is a document explaining some intermediate-level Lojban to people who finished reading la karda. I'll try to explain the topics you really need to understand to bridge the gap between la karda and everyday conversations or prose!

More on tanru

You know about tanru: they are "compounds" of selbri formed simply by juxtaposing them. Let me jog your memory with some examples:

  • .i vi lenku tcima = It's cold-kind-of-weather here.
  • .i mi snuti darxi lo pendo ku = I accident-kind-of-hit my friend.
  • .i lo cukta pixra ku melbi = The book-kind-of-picture is pretty.
  • .i lo blanu karce ku spofu = The blue-kind-of-car is broken down.
@rmed
rmed / configfs_test.sh
Last active August 21, 2024 14:52
RPi Zero keyboard test
#!/bin/bash
sleep 15
# Create gadget
mkdir /sys/kernel/config/usb_gadget/mykeyboard
cd /sys/kernel/config/usb_gadget/mykeyboard
# Add basic information
echo 0x0100 > bcdDevice # Version 1.0.0
void backlight_effect_solid_reactive(void)
{
// Relies on hue being 8-bit and wrapping
for ( int i=0; i<DRIVER_LED_TOTAL; i++ )
{
uint16_t offset2 = g_key_hit[i]<<2;
// stabilizer LEDs use spacebar hits
if ( i == 42 || // LC6, LD13