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
#!/bin/bash | |
####### Constants ############ | |
USER=$(who | grep -o "^[^ ]\+" | head -n 1) | |
USER_ID=$(id -u $USER) | |
HDMI_FLDR="/sys/class/drm/" | |
PULSE_SERVER="unix:/run/user/$USER_ID/pulse/native" | |
# Use different lock files depending on if this is run by udev or manually from the terminal |
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
#!/usr/bin/python3 | |
import requests | |
import sys | |
from html.parser import HTMLParser | |
from validators import url as is_url | |
from os import system as cmdline | |
from time import sleep | |
from twilio.rest import Client |
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
#ifndef STATICVECTOR_H_INCLUDED | |
#define STATICVECTOR_H_INCLUDED | |
#include <memory> | |
#include <new> | |
/// A (fixed capacity) vector with data stored on the stack instead of the heap. | |
/// Every function in implemented in "one line" | |
/// Does no error checking | |
template<typename T, std::size_t Cap> |
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
#!/usr/bin/python3 | |
# ^^^^^^^ | |
# I originally wrote this in python2, and then later the minimal edits necessary to get it to run on | |
# python3, so the code isn't always idiomatic. | |
import sys | |
import csv | |
from datetime import datetime |
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
(defun range (max &key (min 0) (step 1) (runninglist nil)) | |
(if (<= max min) runninglist (range max :min (+ min step) :step step :runninglist (append runninglist `(,min))))) | |
(defun entry (mat i j) | |
(elt (elt mat i) j))(defun row->latex (row) | |
(format t "~a ~{& ~a ~}\\\\~%" (car row) (cdr row)) | |
) | |
(defun mat->latex (mat) | |
(princ "\\begin{vmatrix}") | |
(princ #\newline) | |
(loop for row in mat do (row->latex row)) |