Skip to content

Instantly share code, notes, and snippets.

View mcast's full-sized avatar
👻
Working mostly on things not in Github

Matthew Astley mcast

👻
Working mostly on things not in Github
View GitHub Profile
@mcast
mcast / .gitignore
Last active September 8, 2020 19:14
*~
p5-dbd-oracle-*/
@mcast
mcast / ilsresc-up-the-tree
Created November 26, 2018 16:54
quick hack on `ilsresc --tree` to show status for all resources
#!/bin/sh
### Copying: under GPLv3, or other by arrangement with my employer
### Local source: https://gitlab.internal.sanger.ac.uk/CancerIT/cgpDataOut/blob/master/bin/ilsresc-up-the-tree
# This is an ugly bodge,
# it just does what I need
# (iRODS 4.1.12.beta)
#
# i-cgpdev bin/ilsresc-up-the-tree

Instructions

  1. Add the hook-chain script to the repository hooks

  2. Create a link symbolic to hook-chain with the name of the hook which will be chained

  • Eg: post-receive -> hook-chain
  1. Add scripts prefixed with the [hookname].
date time pid cmd vsize vgrow
RESET
2016/04/13 06:26:14 18401 (irodsReServer) 11748836 11748836
2016/04/13 06:36:14 18401 (irodsReServer) 11748836 0
2016/04/13 06:46:14 18401 (irodsReServer) 11748836 0
2016/04/13 06:56:14 18401 (irodsReServer) 11748836 0
2016/04/13 07:06:14 18401 (irodsReServer) 11748836 0
2016/04/13 07:16:14 18401 (irodsReServer) 11748836 0
2016/04/13 07:26:14 18401 (irodsReServer) 11748836 0
2016/04/13 07:36:14 18401 (irodsReServer) 11748836 0
@mcast
mcast / README.md
Last active March 29, 2016 15:02
Try::Tiny + qx forks the unit test

Report

I was surprised to find my unit test had forked, and so was producing multiple copies of ok messages. I managed to reduce this to, I think, the combination of

  • Try::Tiny
  • use warnings FATAL => 'all'
  • Running a command which doesn't exist

I suspect that the warning of "command not found" is promoted to an error, which is then rescued by try, and this cuts out some tidying up. This is affecting Perl's fork in system and qx.

@mcast
mcast / .gitignore
Last active August 29, 2015 14:20
Attempt to provoke hang in irodsFs (FUSE)
sendMany
*~
# emacs
*~
# logs
parrot.log
#! /usr/bin/perl
use strict;
use warnings;
my ($fn, $sleep) = @ARGV;
my $top = do { local $/ = \"65536"; my $fh = o($fn); <$fh> };
printf "Read %d bytes from %s\n", length($top), $fn;
sleep $sleep;
my @s = stat( o($fn) );
print "Stat $fn = (@s)\n";
@mcast
mcast / .gitignore
Created November 25, 2011 18:05
EU-I-relpath
Makefile
blib
pm_to_blib