Skip to content

Instantly share code, notes, and snippets.

Matthew Hanlon mrhanlon

Block or report user

Report or block mrhanlon

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
View project.yml
type: Genomic
- label: Title
type: text
required: true
- type: material
id: specimen
mrhanlon / README.rst
Last active Jul 25, 2016
Testing linking metadata together via embedded relationships instead of associationIds.
View README.rst

You can query against relationships using mongodb's $elemMatch syntax. E.g.,

$ metadata-list -v -Q '{"value._relationships": {"$elemMatch": {"@id": "1539251546393416166-242ac11f-0001-012"}}}'

OR2016 Notes

Fedora 4 Workshop - 13 June

Welcome Keynote - 14 June - 9a


Mount the remote volume through whatever means. Example, sshfs:

sshfs -o allow_other,defer_permissions,IdentityFile=~/.ssh/id_rsa <remote_user>@host:/path/to/mount /path/to/mount

Stop the machine and add the new shared folder to the VirtualBox config.

docker-machine stop <machine name>
mrhanlon /
Last active Feb 21, 2016
Quick script to index metadata from Agave in ElasticSearch
import sys
import requests
import json
from agavepy.agave import Agave
from django.contrib.auth import get_user_model
def index_metadata(username):
me = get_user_model().objects.get(username='')
mrhanlon /
Created Feb 5, 2016
A script to bootstrap testing interactions for DesignSafe-CI
from boxsdk import OAuth2, Client
from django.contrib.auth import get_user_model
from django.conf import settings
from designsafe.apps.box_integration.models import BoxUserToken
from designsafe.apps.box_integration.tasks import *
username = '<username>'
user = get_user_model().objects.get(username=username)
token = BoxUserToken.objects.get(user=user)
mrhanlon /
Last active Oct 29, 2015
Converts a PEM formatted TLS certificate to a PKCS12 formatted keystore, ready for import into a standard JKS formatted keystore.
# Converts a PEM formatted TLS certificate to a PKCS12 formatted keystore,
# ready for import into a standard JKS formatted keystore.
# Usage:
# -k /path/to/server.key -c /path/to/cert.crt -i /path/to/intermediate.crt
package edu.utexas.tacc.helpers;
import com.github.jknack.handlebars.Helper;
import com.github.jknack.handlebars.Options;
import com.liferay.portal.kernel.language.LanguageUtil;
import com.liferay.portal.kernel.servlet.SessionErrors;
import com.liferay.portal.kernel.servlet.SessionMessages;
import com.liferay.portal.kernel.util.JavaConstants;
import javax.portlet.PortletConfig;
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Thanks to and @artemyk and @gkuenning for their nice tweaks.

Keybase proof

I hereby claim:

  • I am mrhanlon on github.
  • I am mrhanlon ( on keybase.
  • I have a public key whose fingerprint is B167 04D8 20F3 7853 0C22 E0E1 BA60 555E 2A65 CCAA

To claim this, I am signing this object:

You can’t perform that action at this time.