Skip to content

Instantly share code, notes, and snippets.

@ajmontag
ajmontag / Finddbus-cxx.cmake
Created November 9, 2012 05:24
Find dbus-cxx
# - try to find the dbus-cxx library
#
# Finddbus-cxx.cmake
#
# Cache Variables: (probably not for direct use in CMakeLists.txt)
# DBUS-CXX_ROOT_DIR
# DBUS-CXX_LIBRARY
# DBUS-CXX_INCLUDE_DIR
#
# Non-cache variables you might use in your CMakeLists.txt:
@ajmontag
ajmontag / progname.c
Created November 4, 2012 21:18
A simple C program to compare different ways of getting your program's name in unix.
/**
* A simple program to compare different ways of getting your program's name.
*/
#include <stdio.h>
#include <stdlib.h>
extern char* __progname;
extern char* program_invocation_name;
extern char* program_invocation_short_name;
@ajmontag
ajmontag / gpio.c
Created November 4, 2012 19:24
A C program that listens for button presses on a Beaglebone GPIO pin and reports the press duration.
/**
* Title: gpio.c
*
* Author: Andrew Montag
* ajmontag@gmail.com
* sites.google.com/site/andrewmontag
*
* Licence: Boost Software Licence - Verison 1.0
* http://www.boost.org/users/license.html
*