- -0222-01-28
1
: https://papyri.info/ddbdp/p.enteux;;981
: https://papyri.info/ddbdp/p.enteux;;951
: https://papyri.info/ddbdp/p.enteux;;891
: https://papyri.info/ddbdp/p.enteux;;871
: https://papyri.info/ddbdp/p.enteux;;751
: https://papyri.info/ddbdp/p.enteux;;731
: https://papyri.info/ddbdp/p.enteux;;711
: https://papyri.info/ddbdp/p.enteux;;6
1
:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget -O - "$1" | fgrep 'id="PageList"' | sed -e 's/^.*value="//' -e 's/" \/>.*//' -e "s/||/\n/g" | grep -v '^##$' | sort | uniq | while read i; do echo "$i"; dezoomify-rs -l "http://www.bl.uk/manuscripts/Proxy.ashx?view=${i}.xml" "${i}.jpg"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
require 'shellwords' | |
unless ARGV.length == 1 | |
$stderr.puts "Usage: wait_for_deploy.rb https://example.com/status.json" | |
exit 1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'json' | |
require 'open-uri' | |
require 'fileutils' | |
def clone_repo(repo) | |
puts repo['full_name'] | |
owner, path = repo['full_name'].split('/') | |
FileUtils.mkdir_p(owner) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for i in *.mp3; do | |
duration=`echo "$(( $(sox "$i" -n stat 2>&1|fgrep 'Length'|cut -d':' -f2|xargs) * 1000 ))"| awk '{printf("%d\n",$0+=$0<0?0:0.9)}'` | |
echo "$i: $duration" | |
id3v2 --TLEN "$duration" "$i" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PREFIX=$(basename "$1" .pdf) | |
if [ ! -z "$TESSERACT_FLAGS" ]; then | |
echo "Picked up TESSERACT_FLAGS: $TESSERACT_FLAGS" | |
fi | |
echo "Prefix is: $PREFIX" | |
echo "Converting to TIFF..." | |
if command -v parallel >/dev/null 2>&1; then | |
LAST_PAGE=$(($(pdfinfo "$1"|grep '^Pages:'|awk '{print $2}') - 1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setModifiedDate() { | |
if (document.getElementById('last-modified')) { | |
fetch("https://api.github.com/repos/{{ site.github.owner_name }}/{{ site.github.repository_name }}/commits?path={{ page.path }}") | |
.then((response) => { | |
return response.json(); | |
}) | |
.then((commits) => { | |
var modified = commits[0]['commit']['committer']['date'].slice(0,10); | |
if(modified != "{{ page.date | date: "%Y-%m-%d" }}") { | |
document.getElementById('last-modified').textContent = "Last Modified: " + modified; |
- Datasette on Heroku
- Heroku Postgres
- Google Bigtable - $.65/hr
- Google BigQuery -
$5/TB of queried data, $ .02/GB/mo stored - Google Cloud Datastore - 1GB free, .18GB/month above
- Google Cloud Firestore - similar to Datastore
- Google Sheets
- Google Cloud SQL (MySQL/PostgreSQL)
- AWS DynamoDB - NoSQL, 25GB free, $0.25/1M read request units
- AWS Athena - costs per TB scanned, reads data from S3 buckets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
Encoding.default_external = Encoding::UTF_8 | |
Encoding.default_internal = Encoding::UTF_8 | |
require 'nokogiri' | |
pdf_filename = ARGV[0] | |
xml_filename = File.basename(pdf_filename,'.pdf') + '.xml' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'i18n' | |
Encoding.default_external = Encoding::UTF_8 | |
# Usage: Takes Unicode Polytonic Greek on STDIN or as arguments, outputs | |
# phonetic pronunciation on STDOUT designed to be piped into the Mac `say` command. | |
# e.g.: | |
# echo 'ἄγω ἄξω ἤγαγον ἦχα ἤγμαι ἤχθην' | ./ancientgreekspeak.rb | say |