Skip to content

Instantly share code, notes, and snippets.

View dizzzz's full-sized avatar

Dannes Wessels dizzzz

View GitHub Profile
@hamnis
hamnis / Extractor.java
Created January 11, 2013 15:00
Extract RPM Files with redline
package rpm;
import org.freecompany.redline.ReadableChannelWrapper;
import org.freecompany.redline.Scanner;
import org.freecompany.redline.header.Format;
import org.freecompany.redline.payload.CpioHeader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@wolfgangmm
wolfgangmm / gist:5880377
Last active July 16, 2020 12:59
eXist-db: reinstall dashboard and shared-resources if broken. Run the following query through eXide - or if this fails: the Java admin client.
repo:remove("http://exist-db.org/apps/shared"),
repo:remove("http://exist-db.org/apps/dashboard"),
repo:install-and-deploy("http://exist-db.org/apps/shared", "http://exist-db.org/exist/apps/public-repo/find"),
repo:install-and-deploy("http://exist-db.org/apps/dashboard", "http://exist-db.org/exist/apps/public-repo/find")
@grantmacken
grantmacken / gist:6528369
Created September 11, 2013 19:12
My ant build target for building and uploading xar from project folder.
<target name="xar-build-upload" >
<buildnumber file="build.version"/>
<property name="project.version" value="${version.major}.${build.number}"/>
<property name="xar-location" value="${dir.project}/${dir.build}/${project.abbrev}-${project.version}.xar"/>
<property name="repo.url" value="http://${host.local}:8080/exist/apps/public-repo/public/"/>
<property name="repo.update" value="http://${host.local}:8080/exist/apps/public-repo/modules/update.xql"/>
<property name="xar-file" value="${project.abbrev}-${project.version}.xar"/>
<echo>project.version: ${project.version}</echo>
<antcall target="deployment-folder"/>
@danfinlay
danfinlay / How to download streaming video.md
Last active October 22, 2024 17:01
How to download a streaming video with Google Chrome

How to download streaming video

Streaming just means a download that they don't want you to keep. But Chrome's developer tools make it easy to access what's really going on under the hood.

Open Developer Tools

From the page where you want to download some things, go into your chrome menu to open the developer tools. You can either:

1.  (On a mac): Command-option-J
2. (On a PC): Control-alt-J
@joewiz
joewiz / check-links.xq
Created April 21, 2014 13:51
Check a remote webpage for broken links, with XQuery and EXPath HTTP Client
@wsalesky
wsalesky / git-sync.xql
Last active August 19, 2019 08:58
Sync remote eXistdb with github repository automatically using github webhooks.
xquery version "3.0";
(:module namespace gitsync = "http://syriaca.org/ns/gitsync";:)
(:~
: XQuery endpoint to respond to Github webhook requests. Query responds only to push requests.

: The EXPath Crypto library supplies the HMAC-SHA1 algorithm for matching Github secret. 

:
: Secret can be stored as environmental variable.
: Will need to be run with administrative privileges, suggest creating a git user with privileges only to relevant app.
@joewiz
joewiz / json-xml.xqm
Last active June 6, 2021 00:33
An implementation of XQuery 3.1's fn:json-to-xml and fn:xml-to-json functions for eXist
xquery version "3.1";
(:~
: An implementation of XQuery 3.1's fn:json-to-xml and fn:xml-to-json functions for eXist, which does not support them natively as of 4.3.0.
:
: @author Joe Wicentowski
: @version 0.4
: @see http://www.w3.org/TR/xpath-functions-31/#json
:)
module namespace jx = "http://joewiz.org/ns/xquery/json-xml";
@joewiz
joewiz / exist-xpath-functions.xq
Last active April 1, 2020 15:18
Compare XPath functions in W3C spec vs. eXist 3.4.0
xquery version "3.1";
element modules {
util:registered-modules()[starts-with(., 'http://www.w3')] !
element module {
element namespace-uri {.},
util:registered-functions(.) !
element function {.}
}
}
@joewiz
joewiz / available-collation-locales.xq
Last active January 17, 2017 17:04
List collation locales (for sorting strings using language-specific rules) available in eXist
xquery version "3.1";
(: List all collation locales available for use in the '?lang=' parameter of a collation URI.
: @see http://exist-db.org/exist/apps/doc/xquery.xml#collations
: @see http://exist-db.org/exist/apps/fundocs/view.html?uri=http://exist-db.org/xquery/util#collations.0
:)
element collations {
for $collation in util:collations()
order by $collation
@joewiz
joewiz / README.md
Last active June 24, 2022 21:08
A report showing function signature mismatches in eXist's implementation of the XPath & XQuery functions & operators spec