Skip to content

Instantly share code, notes, and snippets.

View tingletech's full-sized avatar

Brian Tingle tingletech

View GitHub Profile
@tingletech
tingletech / COPYING.md
Created January 9, 2012 09:02
Create a list of fonts that are available on the browser.
@tingletech
tingletech / README
Last active November 16, 2021 23:37
curl https://glossapsycholinguistics.journalpub-dev.escholarship.org/article/id/19/ --silent | xmllint --html --xmlout - 2>/dev/null | xsltproc ./glosstract.xsl - > 19.html
files:
# Let's Encrypt's expired root
"/etc/pki/ca-trust/source/blacklist/x3.pem" :
mode: "000775"
owner: root
group: users
content: |
DST Root CA X3
==============
-----BEGIN CERTIFICATE-----
@tingletech
tingletech / signs.md
Created September 11, 2012 05:07
signs of the zodiac ♈ ♉ ♊ ♋ ♌ ♍ ♎ ♏ ♐ ♑ ♒ ♓
@tingletech
tingletech / README.md
Last active October 21, 2020 23:17
move_preprints manage command for janeway
usage: manage.py move_preprints [-h] [--version] [-v {0,1,2,3}] [--settings SETTINGS] [--pythonpath PYTHONPATH] [--traceback] [--no-color] active_user proxy_user

move preprints from a proxy account to a new account

positional arguments:
  active_user           `email` of new active account
  proxy_user            `email` of old proxy account

optional arguments:
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<responseDate>2020-07-27T22:54:52.731437+00:00</responseDate>
<request/>
<ListRecords>
<record>
<header>
<identifier>oai:calipshere:https://registry.cdlib.org/api/v1/collection/5376/:ark:/13030/k6xp75mg</identifier>
<datestamp>2018-01-22T12:53:11.041Z</datestamp>
</header>
<metadata>
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import os
import sys
import json
from urllib.parse import urlparse
import boto3
# https://stackoverflow.com/q/48914324/1763984
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nxs="http://www.nuxeo.org/ecm/project/schemas/tingle-california-digita/ucldc_schema" xmlns:nxsv="http://www.nuxeo.org/ecm/schemas/core/validation/" xmlns:ref="http://www.nuxeo.org/ecm/schemas/core/external-references/" targetNamespace="http://www.nuxeo.org/ecm/project/schemas/tingle-california-digita/ucldc_schema">
<!-- helper XSD definitions for list types -->
<xs:complexType name="content">
<xs:sequence>
<xs:element name="encoding" type="xs:string"/>
<xs:element name="mime-type" type="xs:string"/>
<xs:element name="data" type="xs:base64Binary"/>
<xs:element name="name" type="xs:string"/>
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import os
import sys
import json
from urllib.parse import urlparse
import boto3
from pyspark.sql import SparkSession
from icecream import ic