Skip to content

Instantly share code, notes, and snippets.

View zopyx's full-sized avatar

Andreas Jung zopyx

View GitHub Profile
from fs.contrib.davfs import DAVFS
handle = DAVFS('http://host:6080/exist/webdav/db', credentials=dict(username='admin', password='admin'))
for i in range(100000):
print i
fp = handle.open('d1/{}.xml'.format(i), 'wb')
fp.write('<xml>hello world</xml>')
fp.close()
@zopyx
zopyx / Dockerfile
Last active August 29, 2015 14:12 — forked from rlouapre/Dockerfile
FROM centos:centos6
MAINTAINER Richard Louapre <[email protected]>
#update yum repository and install openssh server
RUN yum update -y
RUN yum install -y openssh-server
#generate ssh key
RUN ssh-keygen -q -N "" -t dsa -f /etc/ssh/ssh_host_dsa_key
RUN ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key
ajung@demo:~/src/docker-basex$ docker push zopyx/basex-80
511136ea3c5a: Image push failed
FATA[0018] Error pushing to registry: Put ?digest=tarsum.v1%2Bsha256%3Ae3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855: unsupported protocol scheme ""
@zopyx
zopyx / gist:eee05f7a421a6c0b6b80
Created February 16, 2015 18:30
RestXQ script
xquery version "3.0";
module namespace services = "http://my/services";
import module namespace transform = "http://exist-db.org/xquery/transform";
declare namespace request="http://exist-db.org/xquery/request";
declare namespace rest = "http://exquery.org/ns/restxq";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace json="http://www.json.org";
xquery version "3.0";
module namespace services = 'http://basex.org/modules/web-page';
declare namespace request="http://exist-db.org/xquery/request";
declare namespace rest = "http://exquery.org/ns/restxq";
declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization";
declare namespace json="http://www.json.org";
<tal:block tal:define="medialiste view/medialist">
<span omit-tag="" tal:condition="medialiste">
<div class="portlet-header" i18n:domain="dasgehirn.portlet.mediathekright">
<div class="portlet-title"><span tal:content="view/data/titel">Mediathek: Videos und mehr</span></div>
</div>
<div class="portlet-item-list media">
<tal:media tal:repeat="obj medialiste">
<div class="portlet-item" tal:define="item_has_leadimage python:view.itemHasLeadImage(obj)">
<a href="#" tal:attributes="href string:${obj/getURL}/"><div class="slide-hide"><div class="text" tal:content="python:view.trimDescription(obj.getObject().getTeaser(),100)"></div></div><img src="content-image3.jpg" tal:condition="item_has_leadimage" tal:attributes="src python:obj.getURL() + '/leadImage_portlet_mediathekright'; title obj/pretty_title_or_id; alt obj/pretty_title_or_id"/><img src="empty.png" width="302" height="176" tal:condition="not:item_has_leadimage"/></a>
FROM java:8
MAINTAINER Andreas Jung <[email protected]>
RUN apt-get update
RUN apt-get install -y curl expect
RUN useradd --uid 5000 -ms /bin/bash exist
RUN mkdir /tmp/install
RUN chown exist /tmp/install
3066/atct_edit
Traceback (innermost last):
Module ZPublisher.Publish, line 146, in publish
Module Zope2.App.startup, line 301, in commit
Module transaction._manager, line 89, in commit
Module transaction._transaction, line 329, in commit
Module transaction._transaction, line 443, in _commitResources
Module ZODB.Connection, line 567, in commit
Module ZODB.Connection, line 623, in _commit
Module ZODB.Connection, line 658, in _store_objects
{
"fields": [ "_id" ],
"query" : {
"match": {
"content": {
"query": "foo bar"
}
}
},
"rescore": {
# Read member authentication data from DGHO member backend
# python read-member.py <username> <password> <fachgesellschaft>
# <fachgesellschaft> 0...N
import sys
import pprint
import xmlrpclib