Skip to content

Instantly share code, notes, and snippets.

@iperdomo
iperdomo / docker-compose.local.diff
Created June 20, 2023 16:18
LiteFarm local setup
diff --git a/docker-compose.override.yml b/docker-compose.override.yml
new file mode 100644
index 000000000..af804c70e
--- /dev/null
+++ b/docker-compose.override.yml
@@ -0,0 +1,41 @@
+version: "3.7"
+
+services:
+ api:
@iperdomo
iperdomo / klab.engine.diff
Created March 31, 2022 11:23
Java 11 compatibility
diff --git a/klab.engine/src/main/java/org/integratedmodelling/klab/cli/commands/Who.java b/klab.engine/src/main/java/org/integratedmodelling/klab/cli/commands/Who.java
index fb5d33ede..242f56343 100644
--- a/klab.engine/src/main/java/org/integratedmodelling/klab/cli/commands/Who.java
+++ b/klab.engine/src/main/java/org/integratedmodelling/klab/cli/commands/Who.java
@@ -1,6 +1,7 @@
package org.integratedmodelling.klab.cli.commands;
import java.util.Map;
+import java.util.stream.Collectors;
diff --git a/.circleci/deploy.sh b/.circleci/deploy.sh
index eb371e6..021918e 100755
--- a/.circleci/deploy.sh
+++ b/.circleci/deploy.sh
@@ -3,26 +3,26 @@
# Force-push the built HTML to the `gh-pages` branch.
#
-set -e
+set -eu
@iperdomo
iperdomo / .dir-locals.el
Last active February 25, 2021 12:54
Akvo's CIDER project configuration
((nil . ((cider-ns-refresh-before-fn . "integrant.repl/suspend")
(cider-ns-refresh-after-fn . "integrant.repl/resume")
(eval . (customize-set-variable 'cider-path-translations
(let ((m2 (concat (getenv "HOME") "/.m2")))
(list
(cons "/app" (clojure-project-dir))
(cons "/home/akvo/.m2" m2)
(cons "/root/.m2" m2))))))))
#!/usr/bin/env bash
# Note: It only supports GitHub, no caching nor fancy error handling
set -euo pipefail
repo="${1}"
directory="${repo/*\//}"
mkdir -p "${directory}"
#!/usr/bin/env bash
# Usage: co-authored-by <name> <name-2> <name-3> ...
# Example: co-authored-by dan juan valeria
set -eu
declare -a authors
for a in "$@"; do
@iperdomo
iperdomo / ds-in.org
Last active June 16, 2020 06:06
Problems with multiple IN clauses in GAE datastore queries

Problems with multiple IN queries

The IN operator also performs multiple queries: one for each item in the specified list, with all other filters unchanged and the IN filter replaced with an EQUAL filter. The results are merged in order of the items in the list. If a query has more than one IN filter, it is performed as multiple queries, one for each possible combination of values in the IN lists.

#+PROPERTY: header-args:sql :exports both
#+PROPERTY: header-args:sql+ :engine postgresql
#+PROPERTY: header-args:sql+ :dbhost localhost
#+PROPERTY: header-args:sql+ :dbuser lumen
#+PROPERTY: header-args:sql+ :dbpassword password
#+PROPERTY: header-args:sql+ :database lumen_tenant_1
#+PROPERTY: header-args:bash :output results
#+STARTUP: showall
diff --git a/GAE/src/com/gallatinsystems/survey/domain/WebForm.java b/GAE/src/com/gallatinsystems/survey/domain/WebForm.java
index 048d779fa..4db033575 100644
--- a/GAE/src/com/gallatinsystems/survey/domain/WebForm.java
+++ b/GAE/src/com/gallatinsystems/survey/domain/WebForm.java
@@ -23,7 +23,7 @@ import java.util.stream.Collectors;
public class WebForm {
- public static Set<String> unsupportedQuestionTypes(){
+ public static Set<String> unsupportedQuestionTypes() {
#+PROPERTY: header-args:sql :cache no
#+PROPERTY: header-args:sql+ :exports both
#+PROPERTY: header-args:sql+ :engine postgresql
#+PROPERTY: header-args:sql+ :dbhost localhost
#+PROPERTY: header-args:sql+ :dbuser lumen
#+PROPERTY: header-args:sql+ :dbpassword password
#+PROPERTY: header-args:sql+ :database lumen_tenant_1
#+PROPERTY: header-args:bash :results output
#+PROPERTY: header-args:bash+ :exports both
#+PROPERTY: header-args:bash+ :cache no