Skip to content

Instantly share code, notes, and snippets.

View shawndooley's full-sized avatar

Shawn Dooley shawndooley

  • 8F Software LLC
  • Boston MA
View GitHub Profile
@shawndooley
shawndooley / unique_index.hpp
Last active March 9, 2023 15:52
Template that will generate compile time errors if duplicate id's are reused
// Code modified from Boost.Units base_dimension.hpp
// https://www.boost.org/doc/libs/1_81_0/boost/units/base_dimension.hpp
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2007-2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@shawndooley
shawndooley / asio_pty_example.cpp
Last active May 28, 2020 12:51
Boost ASIO PTY example
#include <boost/asio.hpp>
#include <boost/bind.hpp>
#include <iostream>
#include <pty.h>
#include <string>
#include <sys/wait.h>
#include <unistd.h>
using namespace std;
void do_async_read();
@shawndooley
shawndooley / cpplint_pre_commit_hook.sh
Last active November 8, 2018 15:05 — forked from brickgao/cpplint_pre_commit_hook.sh
cpplint pre-commit hook
#!/bin/sh
#
# Modified from http://qiita.com/janus_wel/items/cfc6914d6b7b8bf185b6
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".

Keybase proof

I hereby claim:

  • I am shawndooley on github.
  • I am shawndooley (https://keybase.io/shawndooley) on keybase.
  • I have a public key whose fingerprint is FE2D 0B65 3768 8C09 24A1 5992 D667 B70F 1560 9BFF

To claim this, I am signing this object: