Skip to content

Instantly share code, notes, and snippets.

Avatar
🦄
Unicorn!

dogtopus

🦄
Unicorn!
  • ~/
View GitHub Profile
View lkp-logo-draft4.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dogtopus
dogtopus / outpoke5.py
Created Nov 4, 2020
DualSense output report fuzzer
View outpoke5.py
#!/usr/bin/env python3
import hid
import os
import contextlib
import time
if __name__ == '__main__':
with contextlib.closing(hid.device()) as dev:
dev.open(0x054c, 0x0ce6)
@dogtopus
dogtopus / ds5.desc.xml
Last active Jan 12, 2021
DualSense descriptor
View ds5.desc.xml
<?xml version="1.0"?>
<!--
DualSense (DS5) USB HID Report Descriptor
Documentation WIP
-->
<descriptor xmlns="http://digimend.sourceforge.net" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://digimend.sourceforge.net hidrd.xsd">
<usage_page>desktop<!-- Generic desktop controls (01h) --></usage_page>
@dogtopus
dogtopus / ft-slider-illust-all-primitive-allpath.svg
Last active Oct 13, 2020
Alpaca slider illustration draft. Font is Xolonium https://sev.dev/fonts/xolonium/. CC-BY-SA
View ft-slider-illust-all-primitive-allpath.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View 5800p_twi.md

fx-5800p Two Wire Interface

Connector

2.5mm TRS audio jack and plugs.

Pinout: T: SCL, R: SDA, S: GND

Link layer

@dogtopus
dogtopus / kpartx-psvita-pt.diff
Created Sep 14, 2020
PSVita eMMC partition table support for kpartx
View kpartx-psvita-pt.diff
diff --git a/kpartx/Makefile b/kpartx/Makefile
index 2906a984..0404f029 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -13,7 +13,7 @@ ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0)
endif
OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \
- gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o
+ gpt.o mac.o ps3.o psvita.o crc32.o lopart.o xstrncpy.o devmapper.o
@dogtopus
dogtopus / ptouch_tape2.inx
Last active Aug 26, 2020
PTouch tape template for Inkscape 1.x
View ptouch_tape2.inx
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape">
<_name>PTouch Tape</_name>
<id>org.inkscape.render.ptouch_tape2</id>
<dependency type="executable" location="extensions">ptouch_tape2.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<!-- TODO Not sure about the valid printing region (conflicts with what
datasheet says). More tests needed. -->
<!-- Format: width,valid_width,offset -->
@dogtopus
dogtopus / wipf.py
Last active Jun 26, 2020
WillPlus Image Pack (WIP) reader
View wipf.py
#!/usr/bin/env python3
# WillPlus Image Pack (WIP) reader
# The format is used by older (200x era) WillPlus VN engine.
# Special thanks to: asmodean's exbelarc (http://asmodean.reverse.net/pages/exbelarc.html).
# Although the source release is incomplete and didn't compile, it provides all the information necessary for me to write my own (and improved) parser.
import argparse
import ctypes
import fnmatch
View datsum.c
/*
* datsum.c
* Generates checksum for Taiko no Tatsujin iOS dat file
*
* NOTE: For 32-bit build, set _FILE_OFFSET_BITS=64
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <sys/types.h>
@dogtopus
dogtopus / bddazz.sh
Created Jan 4, 2020
Tieba pseudo-"dazzle" post generator
View bddazz.sh
#!/bin/bash
# 20131221 - Add new font type - 1040006, 104900{1,2,3}
getglyphname(){
if [ ! $1 == ' ' ]
then {
printf "%s.jpg\n" \
$({
LC_CTYPE=C.UTF-8 printf "baidu_dazz%x" "'$1" \
| md5sum \
You can’t perform that action at this time.