Skip to content

Instantly share code, notes, and snippets.

View Aeva's full-sized avatar

Aeva & Watch Gallery 2 Aeva

View GitHub Profile
@Aeva
Aeva / shell.nix
Created May 4, 2024 20:05
shell.nix for monogame
{ pkgs ? import <nixpkgs> {} }:
# This seems sufficient enough to run a mgdesktopgl project with `dotent run`.
# I have not tested this beyond running a blank one without crashing.
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
dotnet-sdk_6
];
@Aeva
Aeva / nixos_swap_insert_and_delete_howto.md
Last active April 16, 2024 16:59
how to swap insert and delete keys on nixos

First, scan through these helpful links:

This is what I ended up adding to /etc/nixos/configure.nx file. This is specific to the keyboard that is in my laptop. Unless you also have the same basic US keyboard they shiped with my framework 13 (circa April 2024), you will want to modify this udev rule accordingly. The information on how to do that can be found in the reddit post and 60-evdev.hwdb file

@Aeva
Aeva / psmove_windows.md
Last active January 17, 2023 01:09
notes on using psmove on windows

To successfully pair multiple PS4 Move Controllers on Windows with the psmove utility:

  1. Make sure your computer supports bluetooth, and that bluetooth is currently activated.
  2. Download one of the release Windows binary distributions from https://thp.io/2010/psmove/. I picked the MSVC Win64 build of 4.0.12, which seems to work mostly ok.
  3. Extract the archive. Copy the contents of the "lib" folder into the "bin" folder.
  4. Open an administrator cmd shell, and cd to the bin folder. Leave this shell open for the following commands.
  5. Plug exactly one move controller into a working USB port, and turn the controller on.
  6. Run psmove.exe pair, and follow the instructions it prints. You may will see an OS notification popup to confirm the device pairing, and you should hit approve. You may need to try this process multiple times. If this worked, then the commandline output will look something like this:
Connected controllers: 1
@Aeva
Aeva / seaside-town.rkt
Created June 12, 2022 05:19
Seaside Town
#lang racket/base
; Copyright 2022 Aeva Palecek
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
@Aeva
Aeva / ray_marching_comparison.txt
Created December 4, 2019 06:19
ray marching comparison
--------------------------------------------------------------------------------
CASE 1: OLD
samples: 2
ray hit:
(tx: 1.2360679774997898, sd: -2.220446049250313e-16)
error: 0.0
--------------------------------------------------------------------------------
@Aeva
Aeva / setup.sh
Last active September 13, 2019 05:45
calling cl.exe from within wsl
echo 'call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat">NUL' > /mnt/c/Users/aeva/cl.bat
echo '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.22.27905\bin\Hostx64\x64\cl.exe" %*' >> /mnt/c/Users/aeva/cl.bat
alias cl="cmd.exe /q /c C:/Users/aeva/cl.bat"
@Aeva
Aeva / roland_midi_events2.txt
Created October 2, 2018 03:48
more MIDI events from a Roland ep7ii
38: 11111110 ( 0xfe ) event : Active Sense
39: 11111110 ( 0xfe ) event : Active Sense
40: 11000000 ( 0xc0 ) status : Program Change, Channel: 0
41: 00000001 ( 0x1 ) data : 1
42: 11111110 ( 0xfe ) event : Active Sense
43: 11111110 ( 0xfe ) event : Active Sense
44: 11111110 ( 0xfe ) event : Active Sense
45: 11111110 ( 0xfe ) event : Active Sense
46: 11111110 ( 0xfe ) event : Active Sense
47: 11111110 ( 0xfe ) event : Active Sense
@Aeva
Aeva / roland_midi_events.txt
Created October 2, 2018 03:28
MIDI events from a Roland ep7ii
1: 10110000 ( 0xb0 ) status : Control Change, Channel: 0
2: 01111100 ( 0x7c ) data : 124
3: 00000000 ( 0x0 ) data : 0
4: 01111111 ( 0x7f ) data : 127
5: 00000000 ( 0x0 ) data : 0
6: 11111110 ( 0xfe ) event : Active Sense
7: 11111110 ( 0xfe ) event : Active Sense
8: 11111110 ( 0xfe ) event : Active Sense
9: 11111110 ( 0xfe ) event : Active Sense
10: 11111110 ( 0xfe ) event : Active Sense
@Aeva
Aeva / rendering.py
Created October 14, 2017 23:52
python rendering API mockup
# "DataSource" classes are used to define assorted properties and
# functions that might be used by a shader. The properties etc are
# not specific to any particular shader stage. So, "vertex"
# properties will have an implied varrying variable if they're
# accessed from the fragment shader.
class BasicModel(DataSource):
position = vertex.float4(index=0)
normal = vertex.float3()
uv = vertex.float2()
@Aeva
Aeva / keyboard_matrix.cpp
Created July 3, 2017 21:36
simple keyboard matrix
// Pinout assumes Arduino Micro
int verticals[] = { 6, 5, 4, 3, 2 };
int horizontals[] = { 12, 11, 10, 9, 8 };
// State tracker for keyboard events
bool state[5][5];
// Define which pin sets are used for what when scanning.
#define drains verticals
#define inputs horizontals