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
/** | |
* Title: gpio.c | |
* | |
* Author: Andrew Montag | |
* [email protected] | |
* sites.google.com/site/andrewmontag | |
* | |
* Licence: Boost Software Licence - Verison 1.0 | |
* http://www.boost.org/users/license.html | |
* |
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
/** | |
* 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; |
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
# - 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: |
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
# - try to find the dbus library | |
# | |
# Finddbus.cmake | |
# | |
# Cache Variables: (probably not for direct use in CMakeLists.txt) | |
# DBUS_ROOT_DIR | |
# DBUS_LIBRARY | |
# DBUS_INCLUDE_DIR | |
# | |
# Non-cache variables you might use in your CMakeLists.txt: |
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
# Andrew Montag <[email protected]> | |
# | |
# Borrowed from: | |
# http://slfsmm.indefero.net/p/meteoio/source/tree/HEAD/tags/MeteoIO-1.0.0/tools/cmake | |
# | |
# Works the same as find_package, but forwards the "REQUIRED" and "QUIET" arguments | |
# used for the current package. For this to work, the first parameter must be the | |
# prefix of the current package, then the prefix of the new package etc, which are | |
# passed to find_package. |
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
# Andrew Montag <[email protected]> | |
# | |
# Borrowed from: | |
# http://slfsmm.indefero.net/p/meteoio/source/tree/HEAD/tags/MeteoIO-1.0.0/tools/cmake | |
# | |
# - Try to find SigC++-2.0 | |
# Once done, this will define | |
# | |
# SigC++_FOUND - system has SigC++ |
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
# Makefile for myProgram | |
FLAGS = -Wall -g | |
COMPILEONLY = $(CXX) $(FLAGS) -c $< | |
LINK = $(CXX) $(FLAGS) -o $@ $+ | |
# All targets to be made | |
.PHONY: all | |
all: myProgram |
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
void postBlob(const std::string& uploadurl, const std::string& blobstring) { | |
CURL *easyhandle; | |
CURLcode res; | |
easyhandle = curl_easy_init(); | |
if (!easyhandle) { | |
throw std::runtime_error("Unable to init curl handle"); | |
} |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use WWW::Curl::Easy; | |
use DateTime::Format::Strptime; | |
use IO::Handle qw( ); # For autoflush | |
STDOUT->autoflush(1); |
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
// A sandbox for expirimenting with the throw() declaration | |
// Author: Andrew Montag | |
#include <iostream> | |
#include <stdexcept> | |
class ClassA { | |
public: | |
ClassA(bool throwOnDestruct) : throwOnDestruct_(throwOnDestruct) {} |
OlderNewer