Skip to content

Instantly share code, notes, and snippets.

Alf Eaton hubgit

Block or report user

Report or block hubgit

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 person.json
"@context": "",
"title": "Paul Frazee",
"description": "Beaker guy",
"follows": [
View twitter-archive-viewer.html
<!DOCTYPE html>
<meta charset="utf-8">
<title>Twitter Archive Viewer</title>
<script>window.YTD = { tweet: {} }</script>
<script src="tweet.js"></script><!-- this is loading a file from the archive -->
.tweet { border: 1px solid #eee; margin: 8px }
.full_text { padding: 8px }
.created_at { padding: 8px; color: #777 }
brew install get_iplayer
get_iplayer --subtitles --file-prefix="<pid>" --output=$PWD --pid $PID
ffmpeg -i $PID.mp4 -ss 00:25:26 -t 00:01:59 -vf subtitles=$ $PID-clip-subtitles.mp4
View generate-xsl.php
$saxon = new Saxon\SaxonProcessor();
print "{$saxon->version()}\n";
$input = 'schematrons/1.0/jats4r-topic.sch';
$xsl = 'skeleton/iso_schematron_skeleton_for_saxon.xsl';
$output = 'jats4r-topic.xsl';
$processor = $saxon->newXsltProcessor();
hubgit / scripts-package.json
Created Feb 14, 2019
npm scripts for typescript libraries
View scripts-package.json
"scripts": {
"build": "npm-run-all --parallel build:*",
"build:cjs": "tsc --outDir dist/cjs --module commonjs",
"build:es": "tsc --outDir dist/es --declarationDir dist/types --declaration",
"dev": "npm-run-all --parallel \"build:* --watch\"",
"lint": "tslint --project .",
"prebuild": "rimraf dist",
"prettier": "prettier --write \"src/**/*.{ts,tsx}\" \"*.{js,json}\"",
"preversion": "npm-run-all --parallel typecheck lint test",
"test": "jest",
hubgit /
Last active Feb 4, 2019
Sources of variables in docker-compose.yml, Dockerfile, and the applications they start

Used in docker-compose.yml

  • environment variables in the shell where docker-compose is run
  • values set in an .env file in the folder where docker-compose is run

Used in Dockerfile

  • build args set in docker-compose.yml (build > args, object) and imported with ARG in Dockerfile
  • values set with ARG in Dockerfile
View just-keep-scrolling.js
window.setInterval(() => window.scrollTo(0, document.body.scrollHeight), 1000)
View mapbox-style-contours-only.json
"version": 8,
"name": "OS Outdoor",
"metadata": {
"mapbox:autocomposite": true,
"mapbox:type": "template",
"mapbox:print": {
"units": "in",
"width": 8.5,
"height": 11,
View index.html
<!doctype html>
<meta charset="utf-8">
<body style="margin: 0; height: 100vh; width: 100vw; overflow: hidden; display: flex">
<textarea style="height: 100%; overflow-y: auto; flex: 1; flex-shrink: 0; padding: 1em; border: none; background: #eee; font: 400 11px system-ui" autofocus spellcheck="false" placeholder="JSON input…"></textarea>
<output style="height: 100%; overflow-y: auto; flex: 1; flex-shrink: 0; padding: 1em; white-space: pre-wrap; font: 400 11px system-ui" laceholder="JSON output…"></output>
const input = document.querySelector('textarea')
const output = document.querySelector('output')
tar c data | gzip --best > data.tar.gz
You can’t perform that action at this time.