Skip to content

Instantly share code, notes, and snippets.

@ahoarau
ahoarau / install
Last active August 9, 2021 20:53
ROS Melodic on macOS Catalina
#!/bin/bash
# Software License Agreement (BSD)
#
# Author Mike Purvis <mpurvis@clearpathrobotics.com>
# Corrected by Fuzzy Logic Robotics, Inc., All rights reserved.
# Copyright (c) 2014-2016, Clearpath Robotics, Inc., All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that
# the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, this list of conditions and the
@ahoarau
ahoarau / CMakeLists.txt
Last active September 19, 2018 23:07
libxml2 cmake support (static embedded)
cmake_minimum_required(VERSION 3.1)
project(xml2 C)
set(xml2_dir ${PROJECT_SOURCE_DIR}/libxml2-2.9.8)
file(GLOB srcs ${xml2_dir}/*.c)
list(FILTER srcs EXCLUDE REGEX "/(run|test|trio)[^/]*$")
list(FILTER srcs EXCLUDE REGEX "xml(lint|catalog).c$")
# Generate xmlexports with fixed definition of LIBXML_STATIC
@ahoarau
ahoarau / FindXenomai.cmake
Last active February 13, 2020 10:04
Xenomai 2/3 support for cmake
################################################################################
# Copyright 2020 Antoine HOARAU <antoine [at] flr.io>
#
# CMake script for finding the XENOMAI 2 native or XENOMAI 3 alchemy/posix/rtdm skin.
# If the optional XENOMAI_ROOT_DIR environment variable exists, header files and
# libraries will be searched in the XENOMAI_ROOT_DIR/include and XENOMAI_ROOT_DIR/lib
# directories, respectively. Otherwise the default CMake search process will be
# used.
#
# This script creates the following variables for each skin.
@ahoarau
ahoarau / mtrack config Macbook trackpad
Last active October 3, 2021 16:08
mtrack config Macbook Air 16.04
# Example xorg.conf.d snippet that assigns the touchpad driver
# to all touchpads. See xorg.conf.d(5) for more information on
# InputClass.
# DO NOT EDIT THIS FILE, your distribution will likely overwrite
# it when updating. Copy (and rename) this file into
# /etc/X11/xorg.conf.d first.
# Additional options may be added in the form of
# Option "OptionName" "value"
#
Section "InputClass"
@ahoarau
ahoarau / install-ros-indigo.sh
Last active February 16, 2016 09:48
ROS Indigo - OSX El Capitan
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew install cmake
brew tap ros/deps
brew tap osrf/simulation
brew tap homebrew/versions
brew tap homebrew/science
@ahoarau
ahoarau / gist:dfbf2c782742de08c28a
Created February 2, 2016 12:59
Compile Kernel with distcc
MAKEFLAGS="CC=distcc" BUILD_TIME="/usr/bin/time" CONCURRENCY_LEVEL=$(distcc -j) make-kpkg --rootcmd fakeroot --initrd kernel_image kernel_headers
@ahoarau
ahoarau / runScript(?<match>\((?:\g<match>|[^()]++)*\))
Last active January 31, 2016 11:05
Regex match function with parentheses
http://rubular.com/r/EQVeNwKZKu
@ahoarau
ahoarau / wireshark_install.sh
Last active December 4, 2017 10:51
Install wireshark on Ubuntu 12.04 - 14.04 - 16.04 (fix non root users)
sudo apt-get install -y wireshark
sudo dpkg-reconfigure wireshark-common # answer yes
sudo groupadd wireshark
sudo usermod -a -G wireshark $USER
sudo chgrp wireshark /usr/bin/dumpcap
sudo chmod 750 /usr/bin/dumpcap
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/dumpcap
sudo getcap /usr/bin/dumpcap
sudo reboot
@ahoarau
ahoarau / non-root-rtnet
Created June 17, 2015 13:54
Allow non-root RTNet Users
Add the user to the xenomai group :
```bash
user -a -G xenomai student
```
Remove sudo passwd for rtnet operations :
```
sudo visudo
```
@ahoarau
ahoarau / reinstall_openni
Created June 8, 2015 13:09
reinstall openni
sudo apt-get install --reinstall libopenni-dev \
libopenni-nite-dev \
libopenni-sensor-primesense-dev \
libopenni-sensor-primesense0 \
libopenni0 \
libopenni2-0 \
libopenni2-dev \
openni-utils