View example.clj
(require '[ :as j])
;; file
(j/execute! { :subprotocol "hsqldb" :subname "file:./db/testdb"} ["CREATE TABLE changes(id INT)"])
;; in memory
(j/execute! { :subprotocol "hsqldb" :subname "file:./db/testdb"} ["CREATE TABLE changes(id INT)"])
if(document.queryCommandSupported('copy')) {
        if(text=='') { text = ' '; } // empty inputs do not get selected

        // copy text to off-screen input

        // 1.) does copy empty inputs, but adds newline before content
        var range = document.createRange();
class MyCommand
  include Wisper::Publisher

  def initialize(dependencies = {})
    @token_generator = depdendencies.fetch(:token_generator) do
       require 'generate_token'

Usecase: email notifications need storing for audit/regulatory purposes.

SendNotification will send and record a notification.

SendNotification = '', template_root: '') [], subject: '', data: {}, template: '', sender_id: '')

Copy paste each page (just the table) of transactions from Freeagent in to a text file. Ensure it is a plain text file. Save the text file in to the same directory as main.rb. Run the script ruby main.rb.


Keybase proof

I hereby claim:

  • I am krisleech on github.
  • I am krisleech ( on keybase.
  • I have a public key ASAZreLYPIXpsQV6gtgNV7aficJb7qfNPIbSoHvOVrvWqQo

To claim this, I am signing this object:


We can set the URL using a string (event dispatch). This will end up calling a function with the same name as the string (an event handler). The function handler can then update the state.

;; state
(def state (atom { :content "" }))
(def session (atom { :page "home" }))

;; handlers
(defn about [] (clojure.core/swap! state assoc :content "About us"))
View sequel.rb
bq=db[:studies___s].select{[:s__id, :s__name, `"boolean" as type`, :bd__key___key, :b__value]}.left_join(:booleans___b, { :b__study_id => :s__id }).left_join(:boolean_definitions___bd, { :b__boolean_definition_id => :bd__id}).where(:bd__key => 'is_nihr').or(:bd__key => 'is_commercial')
tfq=db[:studies___s].select{[:s__id, :s__name, `"text" as type`, :tfd__key___key, :tf__value]}.left_join(:text_fields___tf, { :tf__study_id => :tf__id }).left_join(:text_field_definitions___tfd, { :tf__text_field_definition_id => :tfd__id}).where(:tfd__key => 'eudract_number').or(:tfd__key => 'portfolio_number')
eq=db[:studies___s].select{[:s__id, :s__name, `"enum" as type`, :e__key___key, :es__name___value]}.left_join(:enumeration_values___ev, { :ev__study_id => :s__id }).left_join(:enumerations___e, { :ev__enumeration_id => :e__id}).join(:enumeration_states___es, { :es__enumeration_id => :e__id }).where(:e__key => 'iras').or(:e__key => 'phase')
dq=db[:studies___s].select{[:s__id, :s__name, `"date" as type`, :sdd__key___key


The aim of this gem is to standardise reporting. It also allow registration of reports and have them appear in the UI.

It will be used for reports which can not otherwise be produced with the data grid.

To register a report:

Reporting.register(name:   'BRU Recruitment Report', 
View configuration.rb
require 'dry/container'
require 'logger'
module Oxygen
class Configuration
extend Dry::Container::Mixin
# default configuration
register('reports', [])