Skip to content

Instantly share code, notes, and snippets.

View flaviut's full-sized avatar

Flaviu Tamas flaviut

View GitHub Profile
Sep 27 14:34:07 tight-seat kernel: Fixing recursive fault but reboot is needed!
Sep 27 14:34:07 tight-seat kernel: CR2: 00007f98264ad0a0 CR3: 00000007f340a000 CR4: 00000000003406e0
Sep 27 14:34:07 tight-seat kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 27 14:34:07 tight-seat kernel: FS: 00007f9825772400(0000) GS:ffffa0947efc0000(0000) knlGS:0000000000000000
Sep 27 14:34:07 tight-seat kernel: R13: 0000000000000024 R14: 00000000ffffffff R15: ffffa0947b807640
Sep 27 14:34:07 tight-seat kernel: R10: 0000000000000018 R11: 0000000000000018 R12: 651927072fe29674
Sep 27 14:34:07 tight-seat kernel: RBP: 0000000000000dc0 R08: ffffa0947b807640 R09: ffffa08eaed0cd3c
Sep 27 14:34:07 tight-seat kernel: RDX: 0000000054211e0f RSI: 0000000054211e0f RDI: 00000000000310a0
Sep 27 14:34:07 tight-seat kernel: RAX: 651927072fe29694 RBX: 0000000000000000 RCX: 00000000000310a0
Sep 27 14:34:07 tight-seat kernel: RSP: 0018:ffffb4fe0c4bbbb8 EFLAGS: 00010202
// generates a websocket for a sockjs endpoint, as defined in
// https://sockjs.github.io/sockjs-protocol/sockjs-protocol-0.3.3.html
//
// This websocket works just like a regular websocket, and is compatible with
// stompjs.
//
// `onmessage` and `send()` are modified to transparently handle converting to and
// from sockjs messages
//
// (c) 2020, Flaviu Tamas
export CHROOT_DIR=/home/user/tmp/armhf-linux
mkdir -p "$CHROOT_DIR/usr/bin"
sudo cp /usr/bin/qemu-arm-static "$CHROOT_DIR/usr/bin"
sudo debootstrap --arch=armhf stable "$CHROOT_DIR" http://mirror.us.leaseweb.net/debian
sudo mount --bind /dev "$CHROOT_DIR/dev"
sudo mount --bind /sys "$CHROOT_DIR/sys"
sudo mount --bind /proc "$CHROOT_DIR/proc"
sudo chroot "$CHROOT_DIR"
export HOME=/root LC_ALL=C LANG=C.UTF-8 TERM=xterm-256color
$ sudo usbhid-dump -s1:17 | grep -v : | xxd -r -p | hidrd-convert -o spec
Usage Page (FF00h), ; FF00h, vendor-defined
Usage (01h),
Collection (Application),
Report ID (16),
Report Count (6),
Report Size (8),
Logical Minimum (0),
Logical Maximum (255),
Usage (01h),
import random
from pystrich.datamatrix import DataMatrixEncoder
ADJECTIVES = [
"used", "every", "large", "popular", "able", "basic", "known", "various",
"several", "united", "hot", "useful", "mental", "scared", "old", "similar",
"healthy", "medical", "federal", "entire", "strong", "actual", "poor",
"happy", "cute", "helpful", "recent", "willing", "nice", "serious", "huge",
"rare", "typical", "aware", "global", "legal", "capable", "foreign",
declare module 'preact-fluid/Animate' {
import { Component } from 'preact'
export type AnimateProps = {
component: JSX.Element;
animation?: {
active?: boolean;
duration?: number;
timingFunction?: string;
delay?: string;
@flaviut
flaviut / data
Created February 28, 2019 03:12
[{"x":915,"y":1330,"z":-1816},{"x":911,"y":1328,"z":-1804},{"x":928,"y":1312,"z":-1797},{"x":932,"y":1336,"z":-1764},{"x":928,"y":1329,"z":-1797},{"x":942,"y":1327,"z":-1781},{"x":920,"y":1304,"z":-1843},{"x":928,"y":1308,"z":-1780},{"x":930,"y":1312,"z":-1774},{"x":936,"y":1323,"z":-1812},{"x":938,"y":1323,"z":-1805},{"x":938,"y":1323,"z":-1785},{"x":940,"y":1333,"z":-1798},{"x":948,"y":1331,"z":-1787},{"x":913,"y":1324,"z":-1797},{"x":919,"y":1318,"z":-1777},{"x":934,"y":1320,"z":-1798},{"x":921,"y":1346,"z":-1821},{"x":934,"y":1326,"z":-1802},{"x":926,"y":1304,"z":-1784},{"x":924,"y":1338,"z":-1784},{"x":926,"y":1336,"z":-1793},{"x":924,"y":1328,"z":-1778},{"x":930,"y":1316,"z":-1790},{"x":917,"y":1326,"z":-1790},{"x":921,"y":1324,"z":-1786},{"x":913,"y":1326,"z":-1772},{"x":909,"y":1338,"z":-1789},{"x":924,"y":1335,"z":-1788},{"x":930,"y":1333,"z":-1814},{"x":936,"y":1340,"z":-1799},{"x":938,"y":1344,"z":-1804},{"x":930,"y":1312,"z":-1787},{"x":924,"y":1310,"z":-1543},{"x":875,"y":1290,"z":-1884},{"x":845
From cd5757b5d231294bc0e41f509ebe492569975ce1 Mon Sep 17 00:00:00 2001
From: Flaviu Tamas <tamasflaviu@gmail.com>
Date: Wed, 12 Dec 2018 17:49:27 +0000
Subject: [PATCH 1/5] Build using gdb-8.2
---
crosstool-config-overrides.patch | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/crosstool-config-overrides.patch b/crosstool-config-overrides.patch
@flaviut
flaviut / lin-py2.py
Created September 12, 2018 21:07
Output of sysconfig.get_config_vars() on various operating systems
Python 2.7.15 (default, Jun 27 2018, 13:05:28) [GCC 8.1.1 20180531] on linux2
>>> import sysconfig; from pprint import pprint; pprint(sysconfig.get_config_vars())
{'AC_APPLE_UNIVERSAL_BUILD': 0,
'AIX_GENUINE_CPLUSPLUS': 0,
'AR': 'ar',
'ARFLAGS': 'rc',
'ATHEOS_THREADS': 0,
'BASECFLAGS': '-fno-strict-aliasing',
'BASEMODLIBS': '',
'BEOS_THREADS': 0,
@flaviut
flaviut / todo.md
Last active September 10, 2018 19:02

Roadmap to calibre PY3

  • Make syntax correct for py3
  • build C extensions
    • ICU
    • speedups
    • winutils
    • everything else
  • Fix failing tests