Skip to content

Instantly share code, notes, and snippets.

View EBNull's full-sized avatar

EBNull EBNull

  • New York, NY
View GitHub Profile
@EBNull
EBNull / formatmessagesystem.py
Last active April 11, 2024 04:34
FormatMessage() in python, for system messages.
__all__ = (
FormatMessageSystem,
LCID_ENGLISH,
LCID_NEUTRAL,
)
import ctypes
import ctypes.wintypes
LANG_NEUTRAL = 0x00
import subprocess
import signal
def pipeline(cmds, first_stdin=None, last_stdout=None):
"""Pipe together programs using subprocess"""
pcount = len(cmds)
plist = []
for i, cmd in enumerate(cmds):
stdin = None
stdout = None
@EBNull
EBNull / capsule_order_history.sh
Created January 28, 2024 23:57
Get a CSV of all medication orders from Capsule pharmacy
#!/bin/bash
token() {
echo -n 'Authorization: Bearer YOUR_TOKEN_HERE'
}
acurl() {
curl \
-H 'tz: America/New_York' \
-H "$(token)" \
# This is a systemd user service
#
[Unit]
Description=Start krfb
After=graphical-session.target
[Service]
Type=exec
ExecStart=krfb --display $DISPLAY --nodialog
Restart=always