Skip to content

Instantly share code, notes, and snippets.

View joewiz's full-sized avatar

Joe Wicentowski joewiz

  • Arlington, Virginia
View GitHub Profile
@ubermichael
ubermichael / build.xml
Last active May 13, 2022 16:34
Example of an ant build.xml file for uploading files to eXistDb with credentials stored in a properties file
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="wilde" xmlns:xdb="http://exist-db.org/ant">
<description>Wilde Trials International News Archive</description>
<property name="host" value="localhost"/>
<property file="${host}.properties"/>
<path id="classpath.core">
<fileset dir="${local.dir}/lib">
<include name="*.jar"/>
@aschweer
aschweer / pre-commit
Created February 14, 2016 20:14
git pre-commit hook to check XML files for well-formedness, using 'file' and 'xmllint' commands
#!/bin/bash
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
if git rev-parse --verify HEAD >/dev/null 2>&1
@wsalesky
wsalesky / xformsRepeats.xhtml
Created February 1, 2022 01:17
XForms repeats following XML document order.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<title>Insert with Origin</title>
<style type="text/css">
@namespace xf url("http://www.w3.org/2002/xforms");
body {font-family:Helvetica, sans-serif}
</style>
<xf:model>
<xf:instance id="i-rec">
<TEI xmlns="http://www.tei-c.org/ns/1.0">
//
// Phoneme.swift
import Foundation
class Phoneme {
private var isAVowelPhoneme = false;
private var phoneme = "";
@loretoparisi
loretoparisi / ipa2say.rb
Created October 26, 2016 21:32
IPA (Internationl Phonetic Alphabet) to macOS say Text To Speech (TTS) conversion
#!/usr/bin/ruby -w
map = { 'æ' => 'AE',
'eɪ' => 'EY',
'ɑ' => 'AO',
'əˈ' => 'AX',
'i' => 'IY',
'ɛ' => 'EH',
'ɪ' => 'IH',
'aɪ' => 'AY',
@line-o
line-o / dicey.xq
Last active May 5, 2021 06:28
dicey - use randomness with comfort
xquery version "3.1";
declare namespace dicey="http://line-o.de/ns/dicey";
declare function dicey:sequence ($n as xs:integer,
$generator as map(xs:string, item())) as item()* {
fold-left(
1 to $n,
map { "sequence": (), "generator": $generator},
dicey:reducer#2
xquery version "3.1";
map {
"date" : current-dateTime(),
"packages" : array {
for $get-package-event in collection("/db/apps/public-repo-data/logs")//type[.="get-package"]/..
group by $name := $get-package-event/package-name/string()
let $event-count := count($get-package-event)
order by $event-count descending
return
@line-o
line-o / discussion.md
Last active February 19, 2021 19:47
Questions and wishes for RestXQ implementation in existdb

Tests:

url test status
/resources pass 200
/resources/ fail 405
/resources?query=a pass 200
/resources/?query=a fail 405
/resources/a pass 200
@ciceronianus
ciceronianus / eXide-customCSS.css
Created January 25, 2021 13:02
eXide - custom CSS
#toolbar-current-app {
color:red !important;
background-color:yellow;
border-radius: 5px;
padding-left: 5px;
padding-right: 5px;
border: 1px solid #f1c871;
}
@dizzzz
dizzzz / functionSignatureTests.xquery
Last active October 23, 2020 19:39
A script to generate function-signature-tests for xquery functions in eXist-db
xquery version "3.1";
module namespace xqfunctions="http://exist-db.org/xquery/test/xqfunctions";
import module namespace inspect="http://exist-db.org/xquery/inspection" at "java:org.exist.xquery.functions.inspect.InspectionModule";
declare namespace test="http://exist-db.org/xquery/xqsuite";
declare function xqfunctions:cardinality($cardinality as xs:string) as xs:string {