Skip to content

Instantly share code, notes, and snippets.

View jbohren's full-sized avatar

Jonathan Bohren jbohren

View GitHub Profile
#!/usr/bin/env python
from __future__ import print_function
import rospy
from concurrent.futures import ThreadPoolExecutor
class AsyncServiceProxy(object):
"""Asynchronous ROS service proxy
" Vim syntax file
" Language: roslaunch XML
" Maintainer: Jonathan Bohren
" Latest Revision: 8 July 2013
"
" roslaunch xml syntax hilighting with inline yaml support
"
" Put this file in ~/.vim/syntax/roslaunch.vim
" Put the following in your .vimrc:
" autocmd BufRead,BufNewFile *.launch setfiletype roslaunch
#!/usr/bin/env python
from __future__ import print_function
import sys
import os
from multiprocessing import Pool
import rosbag
#!/usr/bin/perl
#
# On-the-fly adjusting of the font size in urxvt
#
# Copyright (c) 2008 David O'Neill
# 2012 Noah K. Tilton <noahktilton@gmail.com>
# 2012-2013 Jan Larres <jan@majutsushi.net>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
@jbohren
jbohren / ubuntu_t440p.md
Created January 9, 2014 20:49
Ubuntu on Lenovo T440p

First, uninstall everything nvidia: sudo apt-get purge nvidia-*

Second, add the precise-proposed package archive:

sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu/ precise-proposed restricted main multiverse universe" > /etc/apt/sources.list.d/ros-latest.list'

Third, install nvidia-prime>=0.5 and nvidia drivers:

alias cm='catkin_make'
alias cmi='catkin_make_isolated'
alias cmii='catkin_make_isolated --install'
alias wspwd='export ROS_WORKSPACE=$(pwd)'
alias wssave='echo -e "$(pwd)" > ~/.curws'
alias wsload='source $(cat ~/.curws)/setup.bash'
alias wscd='cd $(cat ~/.curws)/../src'
# Source a catkin workspace
@jbohren
jbohren / optimus_precise.md
Created January 7, 2014 21:20
NVidia Optimus with Ubuntu 12.04

First, uninstall everything nvidia: sudo apt-get purge nvidia-*

Second, add the precise-proposed package archive:

sudo sh -c 'echo "deb http://archive.ubuntu.com/ubuntu/ precise-proposed restricted main multiverse universe" > /etc/apt/sources.list.d/ros-latest.list'

Third, install nvidia-prime>=0.5 and nvidia drivers:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ABI compliance report for library libcamera_info_manager.so update from 1.10.4 to 1.10.5 version on x86_64
</title>
<!--Styles-->
<style type="text/css">
hr{color:Black;background-color:Black;height:1px;border: 0;}
@jbohren
jbohren / gist:6998220
Last active December 25, 2015 15:29
Bootstrap system
# Vim 7.4
sudo add-apt-repository -y ppa:fcwu-tw/ppa
# Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
# Update lists
sudo apt-get update
@jbohren
jbohren / ubuntu_fakeraid.md
Created October 9, 2013 22:27
installing Ubuntu Lucid 12.04 (12.04.3) on a system with with "fakeraid" (motherboard-based raid) RAID-1 Mirroring
  1. Configure your system's mirror setup
  2. Boot into Ubuntu livecd (or xubuntu if you hate Unity)
  3. Select Try Ubuntu
  4. Open up gparted (gnu partition editor)
  5. Select the RADIDed device (/dev/mapper/something...)
  6. Select the Device menu and select "create partition table"
  7. Under the Advanced dropdown, select gpt for the partition type, and continue
  8. Close gparted
  9. Open the Ubuntu installer program from the desktop
  10. Select "Something else" when it comes to the "Installation Type" panel, and continue