Skip to content

Instantly share code, notes, and snippets.

@JohnMarkT
JohnMarkT / loadenv.sh
Created October 11, 2016 14:11
Shell script to convert environment variables list file to single line to use on the command line
#!/bin/sh
if [ $# -lt 1 ]; then
echo "usage: loadenv filename"
exit 2
fi
HASH="#"
for ENV_FILE in "$@"; do
@JohnMarkT
JohnMarkT / dublincore.js
Last active April 2, 2023 20:39
JSON array of Dublin Core terms retrieved from http://dublincore.org/documents/dcmi-terms/
/*
// retrieved from http://dublincore.org/documents/dcmi-terms/
// with the following Chrome console code:
(function() {
Element.prototype.getAxis = function(axis) {
var td = this.querySelector('td[axis=' + axis + ']');
return td ? td.innerText : "";
}
var tbodies = $$('#H2 tbody'),
@JohnMarkT
JohnMarkT / timezones.js
Last active December 23, 2021 20:34
JSON array of timezones retrieved from http://www.timeanddate.com/time/zones/
/*
//retrieved from http://www.timeanddate.com/time/zones/
//with the following console code:
(function(){
var trs = $$('#tz-abb tbody tr'),
timeZones = trs.map(tr => {
var tds = $$('td', tr),
keys = ['abbreviation', 'name', 'location', 'offset'],
tz = {};