Skip to content

Instantly share code, notes, and snippets.

View Ramona2020's full-sized avatar

Ramona Ramona2020

View GitHub Profile
<body>
<div type="book" n="John">
<div type="chapter" n="20">
<div type="verse" n="1">
<p>Early on the first day of the week, while it was still dark, <persName>Mary Magdalene</persName>
came to the tomb and saw that the stone had been removed from the tomb.</p>
</div>
<div type="verse" n="2">
<p> So she ran and went to Simon Peter and the other disciple, the one whom Jesus
loved, and said to them, “They have taken the Lord out of the tomb, and we do
@Ramona2020
Ramona2020 / 01-lookup-words
Created January 20, 2017 21:43 — forked from AdamSteffanick/01-lookup-words.xquery
Looking up words in the OED with XQuery
xquery version "3.1";
let $word := "person"
let $request :=
<http:request href="https://od-api.oxforddictionaries.com/api/v1/entries/en/{$word}" method="get">
<http:header name="app_key" value="###"/>
<http:header name="app_id" value="###"/>
</http:request>
return http:send-request($request)
@Ramona2020
Ramona2020 / Multipoint.xq
Last active February 12, 2016 22:21
FeatureCollection - Collection points from api and output geojson
xquery version "3.1";
declare option output:method 'json';
map { "type": "FeatureCollection",
"features": array {
(let $doc := fetch:text("http://api.gbif.org/v1/occurrence/search?limit=300&amp;offset=0scientificName=Quercus%20macrocarpa&amp;decimalLatitude=35.81,36.45&amp;decimalLongitude=-87.21,-86.27") => json:parse()
for $record in $doc//results/_
let $lat := xs:decimal($record/decimalLatitude/text())
let $long := xs:decimal($record/decimalLongitude/text())
@Ramona2020
Ramona2020 / Single-Feature.xq
Last active February 12, 2016 18:44
Single Feature
let $uri := fn:encode-for-uri( "http://bioimages.vanderbilt.edu/vanderbilt/7-314#2002-06-14")
let $json := fetch:text("http://api.gbif.org/v1/occurrence/search?occurrenceID=" || $uri)
let $json := fn:parse-json($json)
let $latitude := $json?results?1?decimalLatitude
let $longitude := $json?results?1?decimalLongitude
let $identifier := $json?results?1?identifier
return map {
"type": "Feature",
"geometry": map {
"type": "Point",
@Ramona2020
Ramona2020 / test.md
Created January 21, 2016 16:15
Markdown Test

Hello

This is a test of the emergency broadcasting system

Converting files in Windows folder
[http://www.windows-commandline.com/rename-file-extensions-bulk/](http://www.windows-commandline.com/rename-file-extensions-bulk/)
rename *.log *.txt
Convert batch of files in Pandoc
for /r "startfolder" %i in (*.htm *.html) do pandoc -f html -t markdown "%~fi" -o "%~dpni.txt"
Batch delete files from Windows folder
1. Navigate to folder and use command line:
del /S *.html
@Ramona2020
Ramona2020 / Abel et Cain TEI
Created April 10, 2015 22:44
Abel et Cain TEI
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml"
schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<!--In the line below, insert the title of the poem. If the poem begins with an article, remove leading article from the title in the element value - and include the complete title in a rend attribute.-->
<title>Abel et Caïn</title>
@Ramona2020
Ramona2020 / Code Block 12
Created April 3, 2015 14:43
Code for rss feed
---
layout: feed
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>GitHub Pages Blog</title>
<link href="http://ramona2020.github.io/blog/atom.xml" rel="self"/>
<link href="http://ramona2020.github.io/blog"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
@Ramona2020
Ramona2020 / Code block 11
Created April 3, 2015 14:40
Code to customize blog URL
permalink: /blog/:year/:month/:day/:title