- From a current line:
:s/\s\+$//
- From entire file:
# replace `main` with name of default branch of repo @ pwd and output | |
for f in $(git ls-tree -r main --name-only); do git blame $f --line-porcelain | grep -I "^author " | cut -d" " -f2- >> authorship_by_line.txt; done |
from setuptools import setup, find_packages, Extension | |
ext_modules=[Extension("spam", ["spam.c"])] | |
if __name__ == "__main__": | |
setup( | |
name="spam", | |
packages=find_packages(), | |
ext_modules=ext_modules, | |
) |
""" | |
pointgrey_camera_driver (at least the version installed with apt-get) doesn't | |
properly handle camera info in indigo. | |
This node is a work-around that will read in a camera calibration .yaml | |
file (as created by the cameracalibrator.py in the camera_calibration pkg), | |
convert it to a valid sensor_msgs/CameraInfo message, and publish it on a | |
topic. | |
The yaml parsing is courtesy ROS-user Stephan: | |
http://answers.ros.org/question/33929/camera-calibration-parser-in-python/ |
:bn # Next file in buffer
:bp # previous file in buffer
Can map to in .vimrc like so:
nnoremap <C-Tab> :bn<CR>
nnoremap <C-S-Tab> :bp<CR>
# /rel/path/to/subproject/folder should not be created yet | |
# <branch> is the branch of the subproject you want to include in the current project | |
# Source: http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/ | |
git subtree add --prefix /rel/path/to/subproject/folder git@github.com:<user>/<subproject>.git <branch> |
# http://stackoverflow.com/questions/379081/track-all-remote-git-branches-as-local-branches | |
for remote in `git branch -r | grep -v /HEAD`; do git checkout --track $remote ; done | |