Skip to content

Instantly share code, notes, and snippets.

Avatar
😵

Andy Jackson anjackson

😵
View GitHub Profile
@anjackson
anjackson / cvs2git.options
Created Mar 11, 2014
Scripts and config for moving JHOVE from SourceForge CVS to GitHub
View cvs2git.options
# (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 Mar 17, 2014
Comparison of software generator results
View DROID application.msword generators
{
"responseHeader":{
"status":0,
"QTime":55,
"params":{
"facet":"true",
"indent":"true",
"q":"content_type_droid:application/msword*",
"facet.field":"generator",
"wt":"json",
View gist:0a37aa989011e8f2d10e
.;=-
"NNMMMMMM$A!
;BMMMMMMMMMMMMR%
;MMMMMMMMMMMMMMMMC
#MMMMMMMMMMMMMMMMM
@anjackson
anjackson / drupal-authentication.php
Created Aug 20, 2014
Script to bootstrap and authenticate against Drupal, for Apache mod_auth_external.
View drupal-authentication.php
#!/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 Aug 21, 2014
jhove2 src/test/resources/wave/sample3.wav | grep -v "TypeConverterDelegate" > sample3.wav.jhove2.log
View 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}:
View gist:e2e22bd847b14517e5b0
$ 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
View nohup.out
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
View UK-to-Trove-Backlinks-2009-2010.md
@anjackson
anjackson / terminal.log
Created Oct 3, 2014
Comparing Perl file reading methods for hash calcuation
View terminal.log
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 Oct 17, 2014
Notes from scanning PRONOM signature file.
View scan.md

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?