Skip to content

Instantly share code, notes, and snippets.

Avatar
👹
Ducking and diving

Daniel Pett portableant

👹
Ducking and diving
View GitHub Profile
@portableant
portableant / hoardNumbers.csv
Last active Jan 13, 2016
Mine PAS for end date for NW hoards
View hoardNumbers.csv
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 Mar 31, 2016
A Godshill CP conversion WGS84
View godshillCPNew.geojson
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 Mar 26, 2016
An R file to split shapefiles from the OS
View shpSplitOGR2OGR.R
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 Mar 31, 2016
A geojson conversion of Godshill CP with incorrect projection.
View godshillCPOld.geojson
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 Mar 31, 2016
An example of PAS data in RDF
View examplePAScoinCidoc.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 Apr 30, 2016
Htaccess example for Stacey
View .htaccess
DirectoryIndex index.php index.html home.html
View bm-01.json
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 Jul 7, 2016
Discourse apache2.4 setup
View https-forum.conf
<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/
View msudai.geojson
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 Aug 18, 2016
Git common commands
View git.txt
Clone without history
git clone --depth=1 --branch=master git://someserver/somerepo dirformynewrepo
rm -rf !$/.git