Skip to content

Instantly share code, notes, and snippets.

View kbingham's full-sized avatar

Kieran Bingham kbingham

View GitHub Profile
@kbingham
kbingham / officespace
Last active January 29, 2016 10:41 — forked from anonymous/officespace
#!/bin/sh
launchonce() {
app=`basename $1`
pidof $app >/dev/null && echo "$app is already running" || $1 &
}
launchonce_alt() {
pidof $2 >/dev/null && echo "$1 is already running" || $1 &
}
@kbingham
kbingham / Makefile
Last active April 1, 2024 11:38
My Generic Makefile.Useful for creating a simple build for a single target from a set of c files.This could extended to provide support for other languages, or cross compilations.Let me know if you find this useful, or make any useful (generic) updates that are worth sharing.
# Kierans Generic Makefile
# www.kieranbingham.co.uk
# Default to build with multiple instances for speed
MAKEFLAGS =+ -j
# Beware, This will create this application
# binary based on the current directory name.
TARGET := $(shell basename `pwd`)