Skip to content

Instantly share code, notes, and snippets.

View poleguy's full-sized avatar

Nicholas Dietz poleguy

View GitHub Profile
@poleguy
poleguy / Makefile
Created January 29, 2021 15:49 — forked from cat-in-136/Makefile
CC=gcc
CFLAGS=-Wall -O2 `pkg-config --cflags x11`
LDFLAGS=`pkg-config --libs x11`
SOURCES=toggle-decorations.c
EXECUTABLE=$(patsubst %.c,%,$(SOURCES))
all: $(EXECUTABLE)
clean: $(EXECUTABLE)
@poleguy
poleguy / run-as-cron.sh
Last active July 13, 2020 20:45 — forked from daladim/run-as-cron.sh
Run a command or a script as cron would
#!/bin/bash
# Run as if it was called from cron, that is to say:
# * with a modified environment
# * with a specific shell, which may or may not be bash
# * without an attached input terminal
# * in a non-interactive shell
function usage(){
echo "$0 - Run a script or a command as it would be in a cron job, then display its output"
echo "Usage:"