Skip to content

Instantly share code, notes, and snippets.

@Gubaer
Gubaer / properties-local.xml
Created September 17, 2015 15:31
properties-local.xml in /home/me/software/orbeon/config
<!--
This file is an empty template for your own properties-local.xml file. Pleas
e follow the instructions here:
http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties
-->
<properties xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:oxf="http://www.orbeon.com/oxf/processors">
<!-- use PostgreSQL -->
@Gubaer
Gubaer / orbeon.xml
Last active September 21, 2015 16:20
orbeon.xml in /etc/tomcat7/Catalina/localhost
<!--
orbeon.xml - Tomcat context for orbeon
-->
<Context
docBase="/home/karl/software/orbeon/orbeon.war"
reloadable="false"
override="true"
allowLinking="true"
>
@Gubaer
Gubaer / build.dart
Last active December 14, 2015 14:18
Utility script to physically copy the packages a web app depends to a deployment directory.
/*
* Deployes dart packages.
*
* Takes the dart packages in directory
* /source/dir/packages/...
* which is configured in the configuration files build.json,
* i.e.
* {"packages-dir": "/source/dir(packages"}
*
* and copies them to the directory
import "dart:async";
import "dart:html";
import "package:dartkart/dartkart.dart";
main() {
var map = new MapViewport("#demo-map");
map
..zoom = 8
..center = new LatLon(46.8, 8);
var source =
"http://a.tile.openstreetmap.org/"
import "dart:html";
main() {
var canvas = query("#evt-source");
var out = query("#dy");
canvas.on.mouseWheel.add((event) {
// deltaY has different sign in Dartium and in Firefox running JS generated
// by dart2js
// deltaY from Dartium == - (deltaY in Firefox)
//
@Gubaer
Gubaer / gist:2394816
Created April 15, 2012 21:07
undefined in JavaScript
// Alternative 1 - unsafe
function isUndefined(val) {
// undefined is a global variable, not a language keyword or a constant
// somebody could have reassigned it to, say, "foobar"!
//
return val === undefined;
}
// Alternative 2 - safe
function isUndefined(val) {