Skip to content

Instantly share code, notes, and snippets.

View eacousineau's full-sized avatar

Eric Cousineau eacousineau

View GitHub Profile
@eacousineau
eacousineau / gist:8823441
Created February 5, 2014 13:20
package version path
# ros-hydro-gazebo-*
ros-hydro-gazebo-msgs
ros-hydro-gazebo-msgs-current amd64 2.4.1-1precise ros-hydro-gazebo-msgs
ros-hydro-gazebo-plugins
ros-hydro-gazebo-plugins-current amd64 2.4.1-3precise ros-hydro-gazebo-plugins
ros-hydro-gazebo-ros
ros-hydro-gazebo-ros-control
ros-hydro-gazebo-ros-control-current amd64 2.4.1-1precise ros-hydro-gazebo-ros-control
ros-hydro-gazebo-ros-current amd64 2.4.1-3precise ros-hydro-gazebo-ros
ros-hydro-gazebo-ros-pkgs
@eacousineau
eacousineau / cellexpand.m
Last active August 29, 2015 13:57
cellexpand.m - Expand cell array value into varargout (similar to deal, but only accepts one argument)
%> @brief cellexpand Expand a cell (or array) value into the output
%> arguments. Similar to deal(), but only accepts one input argument.
%> @param X Cell or matrix vector to be distributed to varargout
function [varargout] = cellexpand(X)
if ismatrix(X)
X = num2cell(X);
end
assert(iscell(X));
@eacousineau
eacousineau / diff.patch
Created April 5, 2014 18:33
musescore_issue_fPIC.patch
From 6a16f029b4d5d5be1fe202bc961d919d85764203 Mon Sep 17 00:00:00 2001
From: eacousineau <eacousineau@gmail.com>
Date: Sat, 5 Apr 2014 13:31:49 -0500
Subject: [PATCH] CMakeLists: Haphazardly add -fPIC for gcc to see if we can
squelch the Qt5.2 #error directive
---
CMakeLists.txt | 5 +++++
aeolus/CMakeLists.txt | 2 +-
audiofile/CMakeLists.txt | 4 +++-
#!/usr/bin/python
import sys
class Tee(object):
"""
Allow forking of output to stdout and other files
From: http://stackoverflow.com/questions/11325019/output-on-the-console-and-file-using-python
@author Thrustmaster <http://stackoverflow.com/users/227884/thrustmaster>
@author Eric Cousineau <eacousineau@gmail.com>
"""
@eacousineau
eacousineau / dict_list_to_recarray.py
Last active August 29, 2015 14:00
dict_list_to_recarray.py
#!/usr/bin/python
import numpy as np
def dict_list_to_recarray(items):
"""
@brief Take a loose list of dictionaries, and turn them into a recarray with
fields defined as 'object' for clarity
@param items Iterable collection of dictionaries
@author Eric Cousineau <eacousineau@gmail.com>
@note xref: http://docs.scipy.org/doc/numpy/reference/generated/numpy.core.records.fromrecords.html
@eacousineau
eacousineau / git-fer.sh
Last active December 15, 2015 10:08
git-fer.sh: Different setup than git-submodule-foreach, some extensions. Can constrain module selection using 'scm.focusGroup' (spin off from Heiko Voigt's idea of submodule.includeSuper), with --force-all option to ignore it.
Incorporated into: https://github.com/eacousineau/util
@eacousineau
eacousineau / git-new-workdir.sh
Last active December 15, 2015 10:59
git-new-workdir: Modification to enable this script for submodules. Copies config (does not symlink) and removes 'core.worktree' option.
Incorporated into: https://github.com/eacousineau/util
@eacousineau
eacousineau / git-submodule-test.sh
Created March 26, 2013 21:35
Git Submodule - Test Setup
for dir in a b c d; do
git init $dir
pushd $dir
touch test
echo $dir > bob
git add -A
git commit -m "Init"
popd
done
@eacousineau
eacousineau / glum.sh
Created July 25, 2013 09:13
glum - Git Lightweight User Management
#!/bin/bash
# Git Lightweight User Management
# To start a new user 'session'
# glum USER EMAIL
# To end user 'session'
# glum
glum-broken() {
# This shows an error, and replaces git in the current shell as an alias to this function
#!/usr/bin/python
import fnmatch
import argparse
import rosgraph.masterapi
import roslib
import rospy
import uuid
import sys
parser = argparse.ArgumentParser()