Skip to content

Instantly share code, notes, and snippets.

View jbohren's full-sized avatar

Jonathan Bohren jbohren

View GitHub Profile
@amerberg
amerberg / strip_comments.py
Last active June 6, 2021 20:04
A script to remove comments from LaTeX source
import ply.lex, argparse, io
#Usage
# python stripcomments.py input.tex > output.tex
# python stripcomments.py input.tex -e encoding > output.tex
#This utility is released under the WTFPL license: http://www.wtfpl.net/about/
def strip_comments(source):
tokens = (
@xqms
xqms / System configuration
Created October 2, 2014 10:27
Linux configuration for Intel Graphics and NVIDIA CUDA on Lenovo T440p
This is my current system configuration. I use the intel graphics for graphics, and just keep the NVidia card running for CUDA applications. Note that this setup does not give you 3D acceleration on the NVidia card!
Sometimes (only after suspend) I have to use the attached reload_nvidia.sh script because my CUDA applications complain about a "invalid device ordinal".
BIOS version: 1.17
Linux: Ubuntu 14.04 with kernel 3.17.0-031700rc4-generic
kernel cmdline: "acpi_osi=!Windows 2012"
nvidia driver 340 manually installed from the xorg-edgers PPA:
https://launchpad.net/~xorg-edgers/+archive/ubuntu/ppa
@XVilka
XVilka / TrueColour.md
Last active October 29, 2024 09:43
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@jbohren
jbohren / wstool_aliases.bash
Last active December 13, 2015 22:49
Useful bash aliases for wstool/rosws
#!/usr/bin/env bash
# Set the workspace to the current directory
alias wspwd='export ROS_WORKSPACE=$(pwd)'
# Save the workspace used in this shell as the current workspace
alias wssave='echo -e "$ROS_WORKSPACE" > ~/.curws'
# Load the saved workspace into this shell
alias wsload='source $(cat ~/.curws)/setup.bash'
@scrooloose
scrooloose / git_menu.vim
Created October 9, 2009 06:21
An example git menu for nerdtree... very raw
" Put this in ~/.vim/nerdtree_plugin/git_menu.vim
"
" Adds a "g" submenu to the NERD tree menu.
"
" Note: this plugin assumes that the current tree root has a .git dir under
" it, and that the working tree and the .git repo are in the same place
"
if exists("g:loaded_nerdtree_git_menu")
finish
endif