Skip to content

Instantly share code, notes, and snippets.

@timj
timj / catstack.py
Created February 17, 2015 21:49
Simple demo for matching more than 2 catalogs at once
#!/usr/bin/env python
"""
Purpose: Take a collection of catalogues and match sources
For each matched source we need to know:
1. The catalogue rows that were deemed to be the same source
2. The catalogues that did not contain a specific source despite
@timj
timj / gist:92bd4523f8e4db4b0b4f
Last active August 29, 2015 14:01
Feature branches primer for Starlink

For very simple patches that are known to be distinct from patches worked on by other people, git-pull --rebase may be sufficient to overcome the problem with diamond commits messing with the history. For any type of meaningful development the recommendation for Starlink is to always use a feature branch and handle merging/rebasing in the branch before fixing up master. Git is designed to make branching trivial so we should make use of the facility. It's almost no additional work to work on a development/feature branch (it's known as a "feature" branch because the concept is that each feature you add is kept conceptually distinct in the history).

% git branch dev
% git checkout dev
< edits and commits>

Meanwhile origin/master has had some changes so bring them into your repository

% git checkout master
% git pull
@timj
timj / cleanstarpath
Created November 22, 2013 19:10
Remove Starlink components from path-like variable
#!/usr/bin/perl
=head1 NAME
cleanstarpath - Remove Starlink components from path-like variable
=head1 SYNOPSIS
setenv PATH `perl cleanstarpath PATH`
setenv LD_LIBRARY_PATH `perl cleanstarpath LD_LIBRARY_PATH`