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
# helper script to the xbar plugin | |
# copy this somewhere meaningful, then change TOTP_COPY variable in the plugin | |
#!/bin/sh | |
/Users/michaelmcnulty/Desktop/compilers/bin/totp -r "$1" | pbcopy |
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
SRCS := $(wildcard *.c) | |
OBJS := $(SRCS:.c=.o) | |
PROG_NAME := example_placeholder | |
CFLAGS += -Wall -Wextra -c | |
LDFLAGS += | |
# Production | |
.PHONY: all | |
all: CLFAGS += -O2 |
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
#include <iostream> | |
class HelloSayer { | |
private: | |
std::string greeting; | |
std::string name; | |
std::string makeMessage() { | |
return this->greeting + ", " + this->name + "!"; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Authenticated</title> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
const url_string = window.location.href; | |
const url_string_mod = url_string.split("#"); | |
elt usm = ""; |
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
/* | |
ISC License | |
Copyright 2022 Michael M. | |
Permission to use, copy, modify, and/or distribute this software for any purpose | |
with or without fee is hereby granted, provided that the above copyright notice | |
and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
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
/* | |
Michael's General Purpose CSS Styles. | |
*/ | |
/* | |
ISC License | |
Copyright 2022 Michael M. | |
Permission to use, copy, modify, and/or distribute this software for any purpose |
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
#include <signal.h> | |
#include <stdbool.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/ioctl.h> | |
#include <unistd.h> | |
bool rflag = false; | |
float speed = 0.05; |
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
# adapted from https://www.orangecoat.com/how-to/read-and-decode-data-from-your-mouse-using-this-pyusb-hack | |
# requirements: | |
# - macOS (although it may be adapted for linux) | |
# - pyusb (https://pypi.org/project/pyusb/) | |
# - my totp program (https://github.com/michaelfm1211/totp). you might be able to use another totp program | |
# - the accompanying totp-copy.sh (https://gist.github.com/michaelfm1211/32336940e1d27c4b2a44c9e3f665f26c). again, may be adapted for linux | |
# - terminal-notifier (https://github.com/julienXX/terminal-notifier). not stricly needed, but nice to have | |
import atexit |
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
// this program has been tested on macOS and Alpine Linux, but not Windows. Both | |
// GCC Clang and GNU GCC have also been tested to work. Ideally, this program | |
// should work on any x86-64 machine. | |
// | |
// the program assumes it's binary is called "poly", so you must change the | |
// source code if you want to rename the executable to anything else. | |
#include <arpa/inet.h> | |
#include <stdio.h> | |
#include <stdlib.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
from PIL import Image | |
from math import ceil | |
# these variables are not used everywhere and some parts just assume that they are both (100, 100). | |
# change at your own risk. | |
scale = (100, 100) | |
res = (100, 100) | |
OlderNewer