Skip to content

Instantly share code, notes, and snippets.

View batkinson's full-sized avatar

Brent Atkinson batkinson

  • Garmin International
  • Portland, Maine, USA
View GitHub Profile
<?xml version="1.0"?>
<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:orx="http://openrosa.org/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<h:head>
<h:title>Malaria Indicator Survey</h:title>
<model>
<itext>
<translation lang="Español">
<text id="/data/WhatHappenedToNet/2:label">
<value>La tela fue destrozada accident</value>
</text>

Remi created this for me to aid in creating a form with many images to test with pdf performance issues. I had manually created a form since the problem initially seemed linked to images, but when I went to purchase an iPad and test it performed better than what Joachim had reported (~20 mins vs my <1 min).

To use this, you just need to:

  • Enable the device to download the form definition from a zegeba endpoint
  • Open the form on the device and provide an answer for the media question
  • Use the supplied function in the js file to repeat the answer via console
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM="auto"
export GIT_PS1_SHOWCOLORHINTS=1
export PS1="\[\e]0;\w\a\]\[\e[32m\]\u@\h \[\e[33m\]\w \[\e[32m\]\$(__git_ps1)\[\e[0m\]\n\$ "
export PROMPT_COMMAND='__git_ps1 "\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]" "\\\$ "'
# Run the colbertix program, detach from it
screen
xvfb-run ./colbertix.py
<ctrl-a><ctrl-d>
# Close your SSH connection to the instance
exit
# You can later reconnect to the running program session by issuing
screen -r
[user-info]
first_name: John
last_name: Doe
zip: 10003
state: NY
country: US
daytime_phone: 6165551212
evening_phone: 6165551212
mobile_phone: 6165551212
# Copy the example configuration so we can edit it
cp config.ini-example config.ini
# Edit the configuration, changing the example values to your personal information
vi config.ini
# Clone the project from github
git clone https://github.com/batkinson/colbertix.git
# Change directory to the project and change to the chromium branch
cd colbertix/
git checkout chromium
# Install the python package requirements
sudo pip install -r requirements.txt
# Create an ld.so.conf config file (/etc/ld.so.conf.d/chromium-libs.conf)
# Use the editor to include just the line '/usr/lib/chromium-browser/libs'
sudo vi /etc/ld.so.conf.d/chromium-libs.conf
# Run ldconfig to cache the shared libraries, including chromium's now
sudo ldconfig
# Finally, check that you can run chromedriver without errors
/usr/lib/chromium-browser/chromedriver
<Ctrl-c>
# fixes missing package errors
sudo apt-get update
# installs the requisite packages
sudo apt-get install python-pip git chromium-browser chromium-chromedriver xvfb
@batkinson
batkinson / tour.golang.com#73.go
Last active August 29, 2015 14:08
Go language tour #73 solution
package main
import (
"fmt"
)
type Fetcher interface {
Fetch(url string) (body string, urls []string, err error)
}