Skip to content

Instantly share code, notes, and snippets.

View taeber's full-sized avatar

Taeber Rapczak taeber

View GitHub Profile
@taeber
taeber / timer.c
Last active December 14, 2017 22:02
Simple Countdown Timer
/* Copyright 2017 Taeber Rapczak
*
* Simple countdown timer
*
* EXAMPLES
* $ timer 10 # sets timer for 10 seconds
* $ timer 1m # sets timer for 1 minute
* $ timer 3h5m2 # sets timer for 3 hours, 5 minutes, 2 seconds
*/
@taeber
taeber / standup.bash
Last active January 4, 2018 18:07
Stand up every thirty minutes reminder via i3-nagbar
#!/bin/bash
# Copyright 2017 Taeber Rapczak
# Reminds the user to stand up or sit down on the hour and half-hour
# Uses timer from https://gist.github.com/taeber/20d6b000ae68f5f623f3467233017f34
seconds=$(date +%T | cut -d: -f3)
minutes=$(date +%T | cut -d: -f2)
if [[ $minutes -ne 0 ]] || [[ $seconds -ne 0 ]]
@taeber
taeber / functions.bash
Last active June 20, 2019 15:43
Bash Functions
function envload {
if [ "$#" -ne 1 ]
then
echo "usage: envload <envfile>"
echo ""
echo "Reads an environment file (lines of key=value pairs) into the current Environment"
return
fi
case $(uname) in
@taeber
taeber / fakesay.c
Created November 13, 2019 23:13
Fake say program
// Fake say program
//
// Author:
// Taeber Rapczak <[email protected]>
//
// Compile:
// $ cc -o say fakesay.c
// Example:
// $ ./say hi
// $ ./say alexa unlock front door
@taeber
taeber / mousectl.c
Created February 13, 2024 03:44
mousectl - Swap mouse buttons from the macOS Terminal
// mousectl - Swap mouse buttons from the macOS Terminal
// From https://superuser.com/a/1782251
// with changes by [email protected]
// Compile:
// clang -framework IOKit -framework Foundation -o mousectl mousectl.c
#include <IOKit/hidsystem/IOHIDLib.h>
#include <IOKit/hidsystem/IOHIDParameter.h>