Skip to content

Instantly share code, notes, and snippets.

@alyssarosenzweig
alyssarosenzweig / demo.m
Created September 25, 2021 02:09
AppleJPEGDriver decode routine for the Apple M1
/*
* Copyright (C) 2021 Alyssa Rosenzweig <alyssa@rosenzweig.io>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
@alyssarosenzweig
alyssarosenzweig / Cube.png
Last active April 18, 2021 23:52
Spinning cube
Cube.png
@alyssarosenzweig
alyssarosenzweig / driver.diff
Created February 25, 2017 18:12
Prelimininary framebuffer driver for Topaz signature pads
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
index 1aeb80e52424..c8bd6991339a 100644
--- a/drivers/hid/Kconfig
+++ b/drivers/hid/Kconfig
@@ -985,6 +985,12 @@ config HID_ALPS
Say Y here if you have a Alps touchpads over i2c-hid or usbhid
and want support for its special functionalities.
+config HID_TOPAZ
+ tristate "Topaz signature pad HID support"
python3 << EOF
import ctypes, vim
markov = ctypes.cdll.LoadLibrary("/usr/local/lib/libmarkov.so")
markov.initialize_chain(b"/usr/local/share/markov-chain")
def insert():
out = ctypes.create_string_buffer(128)
ln = vim.current.line.encode()
s = markov.nextWord(out, 128, ctypes.create_string_buffer(ln), len(ln))
From 95c78f2e207370f894765fde09b158a7a8da02fa Mon Sep 17 00:00:00 2001
From: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Date: Sat, 12 Nov 2016 02:35:58 -0800
Subject: [PATCH] Markov patch
---
CMakeLists.txt | 4 ++--
src/core/wee-command.c | 4 ++++
src/core/weechat.c | 2 ++
src/gui/curses/gui-curses-key.c | 3 +++
@alyssarosenzweig
alyssarosenzweig / smile!.py
Created June 25, 2013 20:51
Fun with z-fighting :3
from direct.showbase.ShowBase import ShowBase
from panda3d.core import *
from direct.task import Task
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.velocity = .1
from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.box = self.loader.loadModel("models/box")
self.box.setPos(0, -10, 0)
self.box.reparentTo(self.render)
<html>
<body onload="myFunction();">
<script type="text/javascript">
function myFunction() {
var d = new Date();
var y = d.getHours() + ":" + d.getMinutes();
document.getElementById("dash").innerHTML = y;
setTimeout(myFunction, 2000);