Skip to content

Instantly share code, notes, and snippets.

MatthewHannigan

Block or report user

Report or block MatthewHannigan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MatthewHannigan
MatthewHannigan / gist:fca0ca0f80b91234f17a
Last active Aug 29, 2015
bash expands {c,h} before the command sees it
View gist:fca0ca0f80b91234f17a
$ echo fish >a.c
$ grep -r --include=\*.{c,h} fish .
./a.c:fish
$ grep -r --include=\*.{c,h} fish .
./a.c:fish
grep doesn't like {c,h}
$ grep -r --include="*.{c,h}" fish .
$ grep -r --include="*.[ch]" fish .
@MatthewHannigan
MatthewHannigan / gist:5210474
Created Mar 21, 2013
atlassian gdb dump core script with modifications to use mktemp and trap to clean up untested :-)
View gist:5210474
#!/bin/bash
# atlassian-heap-dump.sh - dump a heap using GDB for a crashed application
# Accepts a single argument: the PID of the JVM
# Author: James Gray (jgray@atlassian.com)
# Copyright Atlassian P/L
# License: MIT
# Are we root?
if [ $UID -ne 0 ]; then
You can’t perform that action at this time.