From Dorothea Salo at the Digital Humanities Winter Institute Data Curation Seminar ... shamelessly quoted by a student (Ed Summers).
- Pick Software Last
- Don't Chase the Shiny
- Know Where the Exits Are (especially in the Cloud)
- Keep Your Options Open
"""creates individual MARCXML files for archivists toolkit from a MARC21 file""" | |
import pymarc | |
import os | |
import sys | |
header = u"""<?xml version="1.0" encoding="UTF-8" ?> | |
<?xml-stylesheet type="text/xsl" href="MARC21slim2HTML.xsl" ?> | |
<collection xmlns="http://www.loc.gov/MARC21/slim" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
#!/bin/bash | |
. heritrix.conf | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo usage: $0 jobname seedsfile | |
exit | |
fi | |
JOB=$1 |
/** | |
* To run this fill in the config, and `npm install ntwitter` | |
*/ | |
var twitter = require('ntwitter'); | |
var config = { | |
"access_token_key": "", | |
"access_token_secret": "", | |
"consumer_secret": "", |
<xsl:choose> | |
<xsl:when test="@type='uri' or substring(normalize-space(text()), 0, 5) = 'http'"> | |
<a href="{text()}"> | |
<xsl:value-of select="text()"/> | |
</a> | |
</xsl:when> | |
<xsl:otherwise> | |
<xsl:value-of select="text()"/> | |
</xsl:otherwise> | |
</xsl:choose> |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
<?xml version='1.0' encoding='utf-8'?> | |
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'> | |
<!-- | |
Author: Rod Page | |
Source: http://iphylo.blogspot.com/2011/07/correcting-ocr-using-hocr-firefox.html#comment-400434491 | |
--> | |
<xsl:output method='html' version='1.0' encoding='utf-8' indent='yes'/> | |
<xsl:variable name="scale" select="800 div //page/@width" /> |
convert image.png -resize 40 txt:-|sed -E 's/://;s/\( ? ?//;s/, ? ?/,/g;s/\)//;s/([0-9]+,[0-9]+,[0-9]+),[0-9]+/\1/g;s/255/254/g;/mage/d'|awk '{print $1,$2}'|sed -E 's/^0,[0-9]+ /print "echo;tput setaf "\;/;s/^[0-9]+,[0-9]+ /print "tput setaf ";/;s/(.+),(.+),(.+)/\1\/42.5*36+\2\/42.5*6+\3\/42.5+16/'|bc|sed 's/$/;echo -n " ";/'|tr '\n' ' '|sed 's/^/tput rev;/;s/; /;/g;s/$/tput sgr0;echo/'|bash
put the function in your .zshrc or .bashrc and then
~ ia-save http://twitter.com/atomotic
https://web.archive.org/web/20140702123925/http://twitter.com/atomotic
"ranges": { | |
"Government of Canada": [ | |
["192.139.201.0", "192.139.201.255"], | |
["192.139.202.0", "192.139.202.255"], | |
["192.139.203.0", "192.139.203.255"], | |
["192.139.204.0", "192.139.204.255"], | |
["192.197.77.0", "192.197.77.255"], | |
["192.197.78.0", "192.197.78.255"], | |
["192.197.80.0", "192.197.80.255"], | |
["192.197.84.0", "192.197.84.255"], |