Skip to content

Instantly share code, notes, and snippets.

View portableant's full-sized avatar
👹
Ducking and diving

Daniel Pett portableant

👹
Ducking and diving
View GitHub Profile
@portableant
portableant / hoardNumbers.csv
Last active January 13, 2016 13:58
Mine PAS for end date for NW hoards
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
id old_findID fromdate todate
1 751327 LVPL-4B8ED8 NA NA
2 744082 LVPL-3C9A2B 75 175
3 741185 LVPL-AD0441 75 175
4 661249 LVPL-E332C6 NA NA
5 656729 LVPL-15E376 NA NA
6 651126 LANCUM-33EBC3 335 353
7 636984 LVPL-99B13B 75 175
8 632111 LVPL-B44185 190 220
@portableant
portableant / godshillCPNew.geojson
Last active March 31, 2016 07:44
A Godshill CP conversion WGS84
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@portableant
portableant / shpSplitOGR2OGR.R
Last active March 26, 2016 22:51
An R file to split shapefiles from the OS
library(foreign)
dfblocks = read.dbf('/Users/danielpett/Documents/research/osData/england/parish_region.dbf', as.is=TRUE)
unitID = unique(dfblocks$UNIT_ID)
unitID <- as.data.frame(unitID)
for (i in 1:nrow(unitID)){
id <- unitID[i, "unitID"]
strOGR = paste(
"ogr2ogr -where 'UNIT_ID = ", id, "' /Users/danielpett/Documents/research/osData/Data/ParishRegion /Users/danielpett/Documents/research/osData/england/ parish_region -nln ", id, sep=""
)
system(strOGR)
@portableant
portableant / godshillCPOld.geojson
Created March 31, 2016 07:42
A geojson conversion of Godshill CP with incorrect projection.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@portableant
portableant / examplePAScoinCidoc.rdf
Created March 31, 2016 08:02
An example of PAS data in RDF
<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:void="http://rdfs.org/ns/void#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:crmbm="http://collection.britishmuseum.org/id/crm/bm-extensions/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:admin="http://webns.net/mvcb"
xmlns:dcterms="http://purl.org/dc/terms/"
@portableant
portableant / .htaccess
Created April 30, 2016 06:29
Htaccess example for Stacey
DirectoryIndex index.php index.html home.html
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@portableant
portableant / https-forum.conf
Created July 7, 2016 14:53
Discourse apache2.4 setup
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin info@finds.org.uk
ServerName forum.finds.org.uk
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
@portableant
portableant / msudai.geojson
Created August 15, 2016 14:59
MSUDAI geojson map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@portableant
portableant / git.txt
Created August 18, 2016 23:47
Git common commands
Clone without history
git clone --depth=1 --branch=master git://someserver/somerepo dirformynewrepo
rm -rf !$/.git