Skip to content

Instantly share code, notes, and snippets.

/**
* A simple time chooser widget based on the combobox
*/
qx.Class.define("TimeChooser",
{
extend : qx.ui.form.ComboBox,
/*
*****************************************************************************
@cboulanger
cboulanger / unapi.php
Created December 11, 2011 15:06
Bookends unAPI gateway
<?php
/**
* unAPI gateway for Bookends server
* =================================
*
* requires an output format which adds the following code to all of the format's
* types:
* `<abbr class='unapi-id' title='`@`'> </abbr>
*
* @author Christian Boulanger (c.boulanger@qxtransformer.org)
@cboulanger
cboulanger / default.html
Last active April 28, 2016 20:53
HTML file for Bookends server unAPI support
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="Christian Boulanger" />
<title>Bookends Database Access with unAPI support</title>
<link rel="unapi-server" type="application/xml" title="unAPI" href="http://localhost/~cboulanger/unapi.php" />
</head>
<body>
#!/bin/bash
#
# Script to build all qooxdoo contrib demos in the contrib catalog that are
# compliant with the contribution skeleton, i.e. they are located in demo/default
# and have a config.json there. The demos are built in all published versions
# with all indicated qooxdoo versions. The aim is to be able to easily test
# which contrib version works with which qooxdoo version.
#
# requires subversion and the jq binary (http://stedolan.github.io/jq/) in the
<?php
return [
'components' => [
'urlManager' => [
'showScriptName' => false,
'enablePrettyUrl' => true,
],
]
];
DB="dbname"; ( echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_general_ci;'; mysql "$DB" -e "SHOW TABLES" --batch --skip-column-names | xargs -I{} echo 'ALTER TABLE `'{}'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' ) | mysql "$DB"
@cboulanger
cboulanger / default.html
Created April 28, 2016 21:01
Bookends search page, using an iframe to load the results and some eye candy
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="author" content="Christian Boulanger" />
<title>Bookends Database Access with unAPI support</title>
<style type="text/css">
<!--
body { margin:2%; line-height:1.1em }
hr { margin:1em 0em }
@cboulanger
cboulanger / qx-contrib-api.md
Last active May 3, 2017 06:51
Some first ideas for an API for qx-contrib support in the new javascript-based generator

using a pseudo-syntax here

please note: this are all ideas from the top of my head, I don't know the new generator at all, so please correct me where these ideas are redundant, unwise or infeasable

for contribution consumers

  • qx contrib list lists all available contributions on github with the topic 'qx-contrib' that are compatible with the current library, --all for all
  • qx contrib install <contrib name>: downloads the given contrib and adds its manifest to config.json. If is omitted, all contribs in config.json/jobs/libraries that have a github URL are downloaded.
  • qx contrib remove <contrib name>: removes the given contrib from the filesystem and from config.json
  • qx contrib update : updates the given contrib, --all to update all contribs to the latest compatible version
@cboulanger
cboulanger / qx-contrib-discovery.md
Created April 28, 2017 07:32
Process of discovery and target identification used by the `qx contrib(-dev) list` API method

Ideas on how qooxdoo-contrib libraries are discovered on github and how the compile target is determined

This describes the algorithm used by the qx contrib list commands (or its final syntax)

  1. Use github web API to get JSON data on all repositories with the github topic 'qooxdoo-contrib' and cache it. ALTERNATIVE: additional command qx contrib update does that, qx contrib list implicitly calls update if no cache exists. (Probably better). Applies to all of the following.
  2. Use github web api to get JSON data on the releases of these repositories and store commit hashes
  3. Use github web api to retrieve Manifest.json of the released version.
  4. Filter all releases that are compatible with the qooxdoo version of the current project. This requires a flexible syntax of the
@cboulanger
cboulanger / pdfocr.sh
Last active April 1, 2021 08:45
OCR of a scanned PDF, using imagemagick, ghostscript, poppler and tesseract
#!/bin/bash
# builds on:
# https://ubuntuforums.org/showthread.php?t=1370827
# Prerequisites:
# On Mac OS:
# brew install --with-libtiff --with-ghostscript imagemagick
# brew install --all-languages tesseract
# brew install poppler