Skip to content

Instantly share code, notes, and snippets.

@ksimek
ksimek / program_options_boilerplate.cpp
Last active December 28, 2023 05:12
Boilerplate code for a C++ program using boost program options. Usage string is automatically generated from positional arguments.
#include <boost/program_options.hpp>
#include <sstream>
#include <fstream>
#include <iterator>
#include <algorithm>
namespace po = boost::program_options;
class Options
{
@NikolausDemmel
NikolausDemmel / gist:cb8a30231a66efd5b07b
Last active August 29, 2015 14:01
Install ROS hydro on OS X
brew update
brew uninstall cmake
brew install nikolausdemmel/devel/cmake
brew install python libyaml
brew tap ros/hydro
brew tap osrf/simulation
brew tap homebrew/versions
brew tap homebrew/science
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten