Skip to content

Instantly share code, notes, and snippets.

View dvdhrm's full-sized avatar
✔️
Fixing Whitespace, what else would you do at this time?

David Rheinsberg dvdhrm

✔️
Fixing Whitespace, what else would you do at this time?
View GitHub Profile
@dvdhrm
dvdhrm / dmesg
Created August 4, 2011 11:15
dmesg output TrimSlice
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.38.3-trimslice-1.01-01637-gc2b2d3e (denis@denis-pc) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-202) ) #49 SMP PREEMPT Thu Jul 14 19:18:14 IDT 2011
[ 0.000000] CPU: ARMv7 Processor [411fc090] revision 0 (ARMv7), cr=10c5387f
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: trimslice
[ 0.000000] Ignoring unrecognised tag 0x54410008
[ 0.000000] Memory policy: ECC disabled, Data cache writealloc
[ 0.000000] On node 0 totalpages: 229376
[ 0.000000] free_area_init_node: node 0, pgdat c078b740, node_mem_map c0840000
@dvdhrm
dvdhrm / hidp-oops.txt
Created August 19, 2011 13:13
Linux bluetooth HIDP oops
Aug 19 14:54:10 localhost kernel: [94455.373443] wiimote 0005:057E:0306.0010: hidraw0: BLUETOOTH HID v3a.1c Gamepad [Nintendo RVL-CNT-01] on 00:1B:B1:11:C0:37
Aug 19 14:54:10 localhost kernel: [94455.373843] input: Nintendo Wii Remote Accelerometer as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/bluetooth/hci0/hci0:12:19/0005:057E:0306.0010/input/input65
Aug 19 14:54:10 localhost kernel: [94455.376992] input: Nintendo Wii Remote IR as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/bluetooth/hci0/hci0:12:19/0005:057E:0306.0010/input/input66
Aug 19 14:54:10 localhost kernel: [94455.378760] input: Nintendo Wii Remote as /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/bluetooth/hci0/hci0:12:19/0005:057E:0306.0010/input/input67
Aug 19 14:54:10 localhost kernel: [94455.385908] Registered led device: 0005:057E:0306.0010:blue:p0
Aug 19 14:54:10 localhost kernel: [94455.386929] wiimote 0005:057E:0306.0010: Remote error 1 on req 50
Aug 19 14:54:10 localhost kernel: [94455.388000] Registered led device: 0005:0
@dvdhrm
dvdhrm / kernel.log
Created August 25, 2011 16:53
bluetooth: sysfs duplicate oops
Aug 25 18:39:41 localhost kernel: [ 3893.024218] hci_rx_task: hci0
Aug 25 18:39:41 localhost kernel: [ 3893.024238] hci_send_to_sock: hdev ffff88003c24d000 len 12
Aug 25 18:39:41 localhost kernel: [ 3893.024267] hci_conn_request_evt: hci0 bdaddr 00:1E:35:3B:7E:6D type 0x1
Aug 25 18:39:41 localhost kernel: [ 3893.024277] l2cap_connect_ind: hdev hci0, bdaddr 00:1E:35:3B:7E:6D
Aug 25 18:39:41 localhost kernel: [ 3893.024292] hci_inquiry_cache_lookup: cache ffff88003c24d4c0, 00:1E:35:3B:7E:6D
Aug 25 18:39:41 localhost kernel: [ 3893.024301] hci_conn_add: hci0 dst 00:1E:35:3B:7E:6D
Aug 25 18:39:41 localhost kernel: [ 3893.024311] hci_conn_init_sysfs: conn ffff880038114800
Aug 25 18:39:41 localhost kernel: [ 3893.024321] hci_send_cmd: hci0 opcode 0x409 plen 7
Aug 25 18:39:41 localhost kernel: [ 3893.024328] hci_send_cmd: skb len 10
Aug 25 18:39:41 localhost kernel: [ 3893.024336] hci_cmd_task: hci0 cmd 1
@dvdhrm
dvdhrm / kmstest.c
Created November 14, 2011 20:11
DRM KMS Test
#define EGL_EGLEXT_PROTOTYPES
#define GL_GLEXT_PROTOTYPES
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <errno.h>
#include <gbm.h>
#include <GL/gl.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
#include <stdlib.h>
@dvdhrm
dvdhrm / modetest.log
Created November 14, 2011 20:41
Output of modetest script
trying to load module i915...success.
Encoders:
id crtc type possible crtcs possible clones
6 4 LVDS 0x00000002 0x00000001
12 0 DAC 0x00000003 0x00000002
Connectors:
id encoder status type size (mm) modes encoders
5 6 connected LVDS 220x120 1 6
modes:
@dvdhrm
dvdhrm / creature-mutation.rkt
Created November 18, 2011 16:08
Info1 Tüb. Blatt3-2
;; Die ersten drei Zeilen dieser Datei wurden von DrRacket eingefügt. Sie enthalten Metadaten
;; über die Sprachebene dieser Datei in einer Form, die DrRacket verarbeiten kann.
#reader(lib "DMdA-beginner-reader.ss" "deinprogramm")((modname creature-mutation) (read-case-sensitive #f) (teachpacks ()) (deinprogramm-settings #(#f write repeating-decimal #f #t none explicit #f ())))
; a feature scale
(: scale? (real -> boolean))
(check-expect (scale? 0) #t)
(check-expect (scale? 100) #t)
(check-expect (scale? 101) #f)
@dvdhrm
dvdhrm / ex-06
Created November 29, 2011 12:14
Analysis I - Zusatzaufgabe
Voraussetzungen:
Es sei f eine Funktion auf den positiven ganzen Zahlen mit Werten in den
ganzen Zahlen, die die folgenden Bedingungen erfüllt:
f(2) = 2
f(m * n) = f(m) * f(n) für 1 ≤ m,n ∈ N
f(m) > f(n) für m > n und m,n ∈ N
Behauptung:
f(2011) = 2011
@dvdhrm
dvdhrm / 0001-Fix-wiimote-device_get_address-to-use-new-API.patch
Created December 29, 2011 17:02
[PATCH 1/2] Fix wiimote device_get_address to use new API
From 6bf559eba2b7ad99964f14631a2275969720789b Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@googlemail.com>
Date: Thu, 29 Dec 2011 17:54:11 +0100
Subject: [PATCH 1/2] Fix wiimote device_get_address to use new API
Commit b06899eace1f484b387aae0e568fb1da988b468c introduced a new API for
device_get_name but apparently missed fixing the call in plugins/wiimote.c. This
patch converts the plugin to use the new API.
---
plugins/wiimote.c | 2 +-
@dvdhrm
dvdhrm / 0002-Detect-Wii-Remotes-by-device-name.patch
Created December 29, 2011 17:03
[PATCH 2/2] Detect Wii Remotes by device name
From ee2b70a486671016ca33e48fe25c99474465e1c4 Mon Sep 17 00:00:00 2001
From: David Herrmann <dh.herrmann@googlemail.com>
Date: Thu, 29 Dec 2011 17:35:30 +0100
Subject: [PATCH 2/2] Detect Wii Remotes by device name
We currently detect Wii Remotes by DID information. However, not all Wii Remotes
(especially 3rd party Wii Remotes) provide DID information. Moreover, they
provide no way of identifying them aside from their device name. Hence, this
adds an experimental name-detection for Wii Remotes.
---
@dvdhrm
dvdhrm / gcc-fix.patch
Created April 29, 2012 19:13
Fixing gcc bug in xf86-input-xwiimote
diff --git a/src/xwiimote.c b/src/xwiimote.c
index 37c818f..27cae77 100644
--- a/src/xwiimote.c
+++ b/src/xwiimote.c
@@ -60,21 +60,21 @@ struct func {
union {
int btn;
unsigned int key;
- };
+ } u;