This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import annotations | |
from subprocess import Popen, PIPE | |
import sys | |
def select_i(choices: List[str], multi:bool=False) -> (List[int], List[str]): | |
""" | |
Interactively select from a list of choices, returning the selections | |
and their indices in the original list of choices. | |
""" | |
stdin_data = '\n'.join(choices).encode('utf-8') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/libwdi/libwdi.c b/libwdi/libwdi.c | |
index 0bd1296..2c2b072 100644 | |
--- a/libwdi/libwdi.c | |
+++ b/libwdi/libwdi.c | |
@@ -25,6 +25,7 @@ | |
#include <crtdbg.h> | |
#endif | |
+#include <initguid.h> | |
#include <windows.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
socat /dev/ttyUSB2,rawer system:'tee in.log | socat stdio "pty,rawer,link=/tmp/relay" | tee out.log' | |
# this doesn't seem to work with all applications, but it's a start. Redirect your application to talk to /tmp/relay instead of /dev/ttyUSB2, in this example. | |
# IOCTLs are not transferred, so you may need to set the port speed manually with stty -F <port> <speed> <settings> |
OlderNewer