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/env python | |
# coding=utf-8 | |
# | |
# Based on https://github.com/UnravelTEC/Raspi-Driver-SCD30 | |
# Copyright © 2018 UnravelTEC | |
# Michael Maier <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
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
# read temperature from DS18B20 | |
# https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/hardware | |
# TODO command line args for time to run/num iterations | |
# TODO command line args for output file | |
# TODO run this on startup so I can run it with no network connection | |
import re | |
import datetime | |
import os |
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
# find things like this { | |
# other stuff | |
# } | |
\w+.*\{\s*$ |
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) {} |
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
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
# 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
# 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
# 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
# - 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: |
NewerOlder