Skip to content

Instantly share code, notes, and snippets.

@peterfpeterson
peterfpeterson / README.md
Last active February 26, 2016 21:06
Creating the mantid 3.5.1 patch release

The problem

This example explains how to merge 4f894cb54 into the release-v3.5.0 branch.

Normally patch releases are done via either merging the feature branch in to the release branch, or by cherry-picking the individual commits into the release branch. In this case the source files were moved by (in general terms) removing the Code/Mantid levels of the repository to be more consistent with other CMake based projects. The effect is that changes made based off of master cannot be simply cherry-picked into the release branch.

The hard way

@peterfpeterson
peterfpeterson / PULL_REQUEST_TEMPLATE.md
Last active February 22, 2016 14:44
Pull request template

Description of work.

To test: Instructions for testing.

Fixes #xxxx.

Either link to Release notes change-set or state "Does not need to be in the release notes."


@peterfpeterson
peterfpeterson / replacescript.py
Last active February 11, 2016 13:36
regexp golf
#!/usr/bin/env python
import os
import re
withargs_matchline = re.compile(r'.*boost::shared_ptr<(.+)>\(new\s+(\w+)\(.+\)\)')
withargs_expression = re.compile(r'(boost::shared_ptr<).+>.*\((.*new\s+\w+\().+(\)\))')
withoutargs_matchline = re.compile(r'.*boost::shared_ptr<(.+)>\(new (.+)\s*\)')
withoutargs_expression = re.compile(r'.*(boost::shared_ptr<).+>\((new .+)(\s*\)).*')
@peterfpeterson
peterfpeterson / today
Last active January 1, 2016 05:19
Convenience thing to help out with my todo.txt and due dates
#!/usr/bin/env python
import datetime
date = datetime.date.today()
import sys
if len(sys.argv) > 1:
delta = datetime.timedelta(int(sys.argv[1]))
date += delta
print "%4d-%02d-%02d" % (date.year, date.month, date.day)
@peterfpeterson
peterfpeterson / ctest
Last active December 31, 2015 03:49
ctest bash completionThis is merged from a couple of online sources that I no longer recall the source of.
# bash completion for ctest(1) -*- shell-script -*-
_ctest()
{
local cur prev words cword
_gst_init_completion -n = || return
case "$prev" in
-C|--build-config)
COMPREPLY=( $( compgen -W 'Debug Release RelWithDebInfo
#
# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license.
#
import ctypes
import logging
import os
class ColorizingStreamHandler(logging.StreamHandler):
# color names to indices
color_map = {
@peterfpeterson
peterfpeterson / Release_3.4.1_Checklist.md
Last active September 2, 2015 17:34
Mantid v3.4.1 release checklist
@peterfpeterson
peterfpeterson / README.md
Created June 26, 2015 17:57
MoleQueue simple test
@peterfpeterson
peterfpeterson / README.md
Last active August 29, 2015 14:16
abrt instructions

This is information gleaned from various places (some are even linked) for using abrt. I assume you have installed abrt-cli and have the abrtd daemon running.

For things that aren't in /usr/ you will need to enable handling of unpackaged software. In short

# sed -i 's/ProcessUnpackaged = no/ProcessUnpackaged = yes/' \
    /etc/abrt/abrt-action-save-package-data.conf

If, for some reason, you want to turn it off just flip the sed script

# sed -i 's/ProcessUnpackaged = yes/ProcessUnpackaged = no/' \
@peterfpeterson
peterfpeterson / README.md
Last active August 29, 2015 14:13
Paraview 3.98.1 opengl patch