Skip to content

Instantly share code, notes, and snippets.

@iperdomo
iperdomo / npm-shrinkwrap.json
Created February 1, 2017 04:46
docker exec -ti akvo-tiler sh -c "cd /tiler; npm shrinkwrap"
{
"name": "akvomaps",
"version": "0.0.0",
"dependencies": {
"body-parser": {
"version": "1.14.2",
"from": "body-parser@>=1.14.0 <1.15.0",
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.14.2.tgz",
"dependencies": {
"bytes": {
@iperdomo
iperdomo / npm-ls-tiler.txt
Created February 1, 2017 04:41
docker exec -ti akvo-tiler sh -c "cd /tiler; npm ls" > npm-ls-tiler.txt
[email protected] /tiler
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
@iperdomo
iperdomo / changeDiscovery.xsl
Created November 24, 2016 07:45
Change discovery protocol to GOOGLE_PING - Keycloak's standalone-ha.xml
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:jg="urn:jboss:domain:jgroups:4.0">
<xsl:output method="xml" indent="yes" />
<xsl:variable name="access_key">${env.GOOGLE_ACCESS_KEY}</xsl:variable>
<xsl:variable name="secret">${env.GOOGLE_SECRET}</xsl:variable>
@iperdomo
iperdomo / pre-commit.sh
Created July 12, 2016 14:49
git pre-commit hook to discourage (comment) blocks - Inspired by - http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
#!/bin/bash
FILES_PATTERN='\.(clj|clc|cljs)(\..+)?$'
FORBIDDEN='(.*comment'
git diff --cached --name-only | \
grep -E $FILES_PATTERN | \
GREP_COLOR='4;5;37;41' xargs grep --color --with-filename -n $FORBIDDEN && \
echo "COMMIT REJECTED - Found debug code. Please remove them before commiting" && \
exit 1
@iperdomo
iperdomo / tmate-debug.c.diff
Created May 4, 2016 03:42
tmate-debug.c changes to compile using musl libc
diff --git a/tmate-debug.c b/tmate-debug.c
index f1fd971..145b19c 100644
--- a/tmate-debug.c
+++ b/tmate-debug.c
@@ -1,4 +1,3 @@
-#include <execinfo.h>
#include <stdio.h>
#include <stdlib.h>
#include <regex.h>
@@ -7,6 +6,8 @@
-- psql -U postgres -h localhost -f /path/to/tardis.sql
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
@iperdomo
iperdomo / vim
Created February 12, 2016 17:22
To vim or not to vim
#!/bin/bash
# the first vim on your $PATH
set -e
echo -n "Do you really want to vim ? [N/y] "
read answer
diff --git a/app/src/main/java/com/lnikkila/oidcsample/APIUtility.java b/app/src/main/java/com/lnikkila/oidcsample/APIUtility.java
index 37b33eb..49ebcf8 100644
--- a/app/src/main/java/com/lnikkila/oidcsample/APIUtility.java
+++ b/app/src/main/java/com/lnikkila/oidcsample/APIUtility.java
@@ -58,7 +58,7 @@ public class APIUtility {
// launch it automatically here if you wanted to by grabbing the intent from the bundle.
try {
AccountManagerFuture<Bundle> futureManager = accountManager.getAuthToken(account,
- Authenticator.TOKEN_TYPE_ID, null, true, null, null);
+ Authenticator.TOKEN_TYPE_ACCESS, null, true, null, null);
@iperdomo
iperdomo / core_test.clj
Created November 13, 2015 12:46
Testing H2 MVStore
(ns h2-test.core-test
(:require [clojure.test :refer :all]
[h2-test.core :refer :all])
(:import [org.h2.mvstore MVStore]
[java.util UUID]))
(deftest a-test
(testing "Testing H2"
(with-open [db (MVStore/open (format "/var/tmp/%s.db" (UUID/randomUUID)))]
iperdomo: Hi all, i was wondering if someone is using Onyx for "ETL" ... i know that the documentation states that the platform supports it, but I would like to know if someone has some suggestions around the topic basically I'm in a quest for an open source ETL "framework", you usually end up with tools like Talend, Pentaho Data Integration or CloverETL.
The GUI tool for specifying transformations is not a requirement for us
MichaelDrogalis: @iperdomo I know @robert-stuttaford is more or less doing this by ETL'ing his Datomic database. Admittedly Onyx is stronger at streaming, but there haven't been any hiccups as far as batch workloads from what I can tell.
MichaelDrogalis: Onyx was designed with fault tolerance in mind (distributed masterless), If my workloads are "small" and can fit in a single node, using Onyx is perhaps a "premature optimization" ? any thoughts?
@iperdomo Do you plan on scaling up to bigger workloads in the future? What's your worst case load in the next 2