Skip to content

Instantly share code, notes, and snippets.

View taktoa's full-sized avatar
🤔
Confused about why this feature exists

Remy Goldschmidt taktoa

🤔
Confused about why this feature exists
View GitHub Profile
@taktoa
taktoa / tangxi.md
Last active July 12, 2023 07:34
Review of Tangxi Smart USB UHF RFID Reader 915Mhz, USB Desktop Contactless Card Reader Writer, Electronic Tag Access Control ID Card Reader for ISO18000‑6C/ISO18000‑6B Label

TLDR summary: Not much documentation, works as a USB keyboard and emits the contents of tag EPC memory (hex encoded) plus a newline, decent sensitivity, seems very hackable if you are into that kind of thing.

The box contained nothing other than the reader and a mini-USB B to USB A cable.

The reader enclosure can be opened easily by removing 4x 10 mm foam pads at the bottom and unscrewing some self-tapping Phillips head screws. The enclosure measures 64 mm x 105 mm x 13.5 mm. The board inside is slightly smaller at 60 mm x 100 mm x ~9 mm. A large portion of the height of the board is occupied by two LEDs (one blue, one green) inside a large flat diffuser. If desired, the board could be stripped down by removing the antenna/LEDs/beeper and cutting a large empty part of the PCB off, resulting in dimensions 60 mm x 46 mm x 5.1 mm.

The board is essentially a MagicRF M100 module attached to an antenna and an STM32F103 c

(require 'package)
(add-to-list
'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(package-install 'use-package)
(use-package use-package-ensure
@taktoa
taktoa / README.md
Last active July 17, 2021 01:53
manim 0.8.0 for nix

First, clone this gist.

Then run nix-shell -A shell -Q --pure

Finally, inside the Nix shell, run manim render -p -ql example.py OpeningManim && reset.

The && reset part is because for some reason the shell gets broken after you run that command. I suspect it would not happen with previewing (-p) disabled.

@taktoa
taktoa / config.json
Created July 7, 2021 02:03
Tree Sitter config.json with Zenburn theme
{
"parser-directories": [
"/home/remy/github",
"/home/remy/src",
"/home/remy/source"
],
"theme": {
"attribute": {
"color": "#ffcfaf",
"italic": true
{ stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation {
pname = "pigpio";
version = "78";
src = fetchFromGitHub {
owner = "joan2937";
repo = "pigpio";
rev = "cc17196c7586c3625ac8adf8f34838d320ffeda6";
sha256 = "0x628bsjb8iqnjvmz3bs0k0jc9m14yq0grfnsnwr53fs6fprh0wr";
-- Reboot --
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: Successfully initialized wpa_supplicant
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: wpa_supplicant v2.9
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: Copyright (c) 2003-2019, Jouni Malinen <j@w1.fi> and contributors
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: This software may be distributed under the terms of the BSD license.
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: See README for more details.
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: This product includes software developed by the OpenSSL Project
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: for use in the OpenSSL Toolkit (http://www.openssl.org/)
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: usage:
Nov 08 07:00:18 raspi4-1 wpa_supplicant-start[651]: wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] [-g<global ctrl>] \
-- Reboot --
Nov 06 15:16:56 raspi4-1 systemd[1]: Started WPA Supplicant.
Nov 06 15:16:56 raspi4-1 wpa_supplicant[1323]: Successfully initialized wpa_supplicant
Nov 06 15:16:58 raspi4-1 wpa_supplicant[1323]: wlan0: Trying to associate with SSID 'Fios-8EKST'
Nov 06 15:17:01 raspi4-1 wpa_supplicant[1323]: wlan0: Associated with 20:c0:47:ce:af:ce
Nov 06 15:17:01 raspi4-1 wpa_supplicant[1323]: wlan0: CTRL-EVENT-CONNECTED - Connection to 20:c0:47:ce:af:ce completed [id=0 id_str=]
Nov 06 15:17:01 raspi4-1 wpa_supplicant[1323]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Nov 06 15:17:01 raspi4-1 wpa_supplicant[1323]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=US
Nov 06 15:17:12 raspi4-1 wpa_supplicant[1323]: nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
Nov 06 15:17:12 raspi4-1 systemd[1]: Stopping WPA Supplicant...

ArrayFire Nix Package

I haven't tested this under the full Nix sandbox, so it may still have some impurities.

If you have rustup installed and you want to build the ArrayFire Rust bindings impurely, just remember to set the AF_PATH environment variable to the output path resulting from building arrayfire.nix.

A Self-Taught Course in Automated Reasoning using Haskell

Variables, Terms, and Syntactic Unification

Resources

  • [Introduction to Unification Theory Lecture 1][itut-1]
  • Sections 8.1 and 8.2 of [The Handbook of Automated Reasoning][hoar]

Exercises

Ideas to improve my workflow

Easy

diff-factor-comments

A script that automatically separates a Haskell file diff into two diffs: one with only changes to comments, and one with changes to actual code.

Could be extended to other languages, as long as you can describe what the