Skip to content

Instantly share code, notes, and snippets.

View anjackson's full-sized avatar
🧐

Andy Jackson anjackson

🧐
View GitHub Profile
@anjackson
anjackson / cvs2git.options
Created March 11, 2014 11:34
Scripts and config for moving JHOVE from SourceForge CVS to GitHub
# (Be in -*- mode: python; coding: utf-8 -*- mode.)
#
# ====================================================================
# Copyright (c) 2006-2010 CollabNet. All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://subversion.tigris.org/license-1.html.
# If newer versions of this license are posted there, you may use a
# newer version instead, at your option.
@anjackson
anjackson / DROID application.msword generators
Created March 17, 2014 15:38
Comparison of software generator results
{
"responseHeader":{
"status":0,
"QTime":55,
"params":{
"facet":"true",
"indent":"true",
"q":"content_type_droid:application/msword*",
"facet.field":"generator",
"wt":"json",
.;=-
"NNMMMMMM$A!
;BMMMMMMMMMMMMR%
;MMMMMMMMMMMMMMMMC
#MMMMMMMMMMMMMMMMM
@anjackson
anjackson / drupal-authentication.php
Created August 20, 2014 10:00
Script to bootstrap and authenticate against Drupal, for Apache mod_auth_external.
#!/usr/bin/php
<?php
# Globals to hold status:
$drupal_bootstrapped = FALSE;
$authenticated = FALSE;
# Use a shutdown function to ensure that authentication does not go through
# if bootstrapping Drupal fails (because PHP's die() returns exit(0)):
function shutdown() {
@anjackson
anjackson / sample3.wav.jhove2.log
Created August 21, 2014 11:05
jhove2 src/test/resources/wave/sample3.wav | grep -v "TypeConverterDelegate" > sample3.wav.jhove2.log
FileSource:
StartingOffset (byte): 0
EndingOffset (byte): 95
Size (byte): 96
FileSystemProperties:
Path: /Users/andy/Documents/workspace/jhove/src/test/resources/wave/sample3.wav
LastModified: 2014-08-21T10:20:13+01:00
PresumptiveFormats:
PresumptiveFormat {FormatIdentification}:
NativeIdentifier {I8R}:
@anjackson
anjackson / gist:e2e22bd847b14517e5b0
Created September 8, 2014 10:26
Tika 1.6 version support
$ tika -m ~/Downloads/Sample\ 10.x.pdf
Content-Length: 5994
Content-Type: application/pdf
Creation-Date: 2014-03-04T20:56:45Z
Last-Modified: 2014-03-04T21:14:56Z
Last-Save-Date: 2014-03-04T21:14:56Z
X-Parsed-By: org.apache.tika.parser.DefaultParser
X-Parsed-By: org.apache.tika.parser.pdf.PDFParser
created: Tue Mar 04 20:56:45 GMT 2014
date: 2014-03-04T21:14:56Z
@anjackson
anjackson / nohup.out
Created September 16, 2014 15:15
twarc.py 0.0.7
Traceback (most recent call last):
File "/usr/local/bin/twarc.py", line 283, in <module>
archive(args.query, tweets)
File "/usr/local/bin/twarc.py", line 197, in archive
for status in statuses:
File "/usr/local/bin/twarc.py", line 139, in stream
yield json.loads(line)
File "/usr/local/lib/python2.7/json/__init__.py", line 310, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python2.7/json/decoder.py", line 346, in decode
@anjackson
anjackson / UK-to-Trove-Backlinks-2009-2010.md
Last active August 29, 2015 14:06
UK-to-Trove Backlinks
@anjackson
anjackson / terminal.log
Created October 3, 2014 09:06
Comparing Perl file reading methods for hash calcuation
opf:perl andy$ time perl sha256-asfile.pl ~/Downloads/ubuntu-12.10-desktop-amd64.iso
256a2cc652ec86ff366907fd7b878e577b631cc6c6533368c615913296069d80 /Users/andy/Downloads/ubuntu-12.10-desktop-amd64.iso
real 0m8.825s
user 0m8.102s
sys 0m0.479s
opf:perl andy$ time perl sha256-slurp.pl ~/Downloads/ubuntu-12.10-desktop-amd64.iso
256a2cc652ec86ff366907fd7b878e577b631cc6c6533368c615913296069d80 /Users/andy/Downloads/ubuntu-12.10-desktop-amd64.iso
@anjackson
anjackson / scan.md
Created October 17, 2014 09:13
Notes from scanning PRONOM signature file.

While processing this data source, 6 issues were found.

  • Could not parse MIME type 'com.adobe.photoshop-image' for entry x-fmt/92
  • Could not parse MIME type 'com.microsoft.word.doc' for entry x-fmt/64
  • Could not parse MIME type 'vnd.lotus-approach' for entry x-fmt/333
  • File extension '.jls' for entry fmt/150 does not appear to be a valid file extension.
  • File extension 'qxp report' for entry fmt/650 does not appear to be a valid file extension.
  • File extension 'qxp%20report' for entry fmt/650 does not appear to be a valid file extension.

Although, perhaps the %20 is allowed in file extensions?