Skip to content

Instantly share code, notes, and snippets.

import SwiftUI
struct PackageRemoveDialog: ViewModifier {
@Binding var isShowingPackageRemovalConfirmationDialog: Bool
@EnvironmentObject var brewData: BrewDataStorage
@EnvironmentObject var appState: AppState
@EnvironmentObject var outdatedPackageTracker: OutdatedPackageTracker
let shouldPurge: Bool
@mrhanlon
mrhanlon / AccessibilitySandbox-ContentView.swift
Last active March 12, 2024 02:07
Regarding [this module](https://www.hackingwithswift.com/books/ios-swiftui/hiding-and-grouping-accessibility-data) from 100 Days of Swift UI, it appears that when using `Image(decorative: "foo")` VoiceOver is disabled for the component even if accessibility label/traits are added.
struct ContentView: View {
let pictures = [
"ales-krivec-15949",
"galina-n-189483",
"kevin-horstmann-141705",
"nicolas-tissot-335096"
]
let labels = [
"Tulips",
---
project:
type: Genomic
fields:
- label: Title
type: text
required: true
entities:
- type: material
id: specimen
@mrhanlon
mrhanlon / README.rst
Last active July 25, 2016 21:50
Testing linking metadata together via embedded relationships instead of associationIds.

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

$ metadata-list -v -Q '{"value._relationships": {"$elemMatch": {"@id": "1539251546393416166-242ac11f-0001-012"}}}'
@mrhanlon
mrhanlon / OR2016_Notes.md
Created June 20, 2016 16:00
OR2016 Braindump.

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 
@mrhanlon
mrhanlon / index_meta.py
Last active February 21, 2016 02:21
Quick script to index metadata from Agave in ElasticSearch
#!/usr/bin/python
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
mrhanlon / box_testing.py
Created February 5, 2016 17:03
A script to bootstrap testing Box.com 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
mrhanlon / tomcat-pem-to-jks.sh
Last active October 29, 2015 18:36
Converts a PEM formatted TLS certificate to a PKCS12 formatted keystore, ready for import into a standard JKS formatted keystore.
#!/bin/bash
###
# tomcat-pem-to-jks.sh
# Converts a PEM formatted TLS certificate to a PKCS12 formatted keystore,
# ready for import into a standard JKS formatted keystore.
#
# Usage:
# tomcat-pem-to-jks.sh -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;