Skip to content

Instantly share code, notes, and snippets.

View jumarko's full-sized avatar

Juraj Martinka jumarko

View GitHub Profile
jumarko / Dialog with ComboViewer
Created October 23, 2012 12:33
JFace ComboViewer databinding
View Dialog with ComboViewer
protected Control createDialogArea(Composite parent) {
private void createEntityCombo(Composite parent) {
final ComboViewer entityCombo = new ComboViewer(parent, SWT.VERTICAL | SWT.DROP_DOWN | SWT.BORDER | SWT.READ_ONLY);
final GridData entityComboLayoutData = new GridData(SWT.END, SWT.CENTER, false, false);
jumarko / gatling-maven-project.pom.xml
Created February 24, 2014 07:36
Gatling maven project
View gatling-maven-project.pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""
jumarko /
Created December 14, 2015 07:16
Custom script for modification to /etc/hosts. Providing custom /etc/hosts when building the image doesn't work because docker overwrites /etc/hosts when starting the container. Running simple "sed -i" inside entrypoint run script doesn't work because sed is not able to just overwrite /etc/hosts (sed: cannot rename /etc/sedl8ySxL: Device or resou…
#!/usr/bin/env bash
# clean-up /etc/hosts if multiple hostname points to localhost - required for Mac OS using "--add-host 'localhost:'"
localhostCount=`grep localhost /etc/hosts | wc -l`
if [[ $localhostCount -gt 2 ]];then
cat /etc/hosts | sed '/*/d' > hosts.tmp
cat hosts.tmp > /etc/hosts
rm hosts.tmp
package travel.snapshot.dp.ota.configuration;
import org.apache.commons.dbcp2.ConnectionFactory;
import org.apache.commons.dbcp2.DriverManagerConnectionFactory;
import org.apache.commons.dbcp2.PoolableConnection;
import org.apache.commons.dbcp2.PoolableConnectionFactory;
import org.apache.commons.dbcp2.PoolingDataSource;
import org.apache.commons.pool2.ObjectPool;
import org.apache.commons.pool2.impl.GenericObjectPool;
import org.apache.commons.pool2.impl.GenericObjectPoolConfig;
jumarko /
Created August 5, 2016 08:20 — forked from staltz/
The introduction to Reactive Programming you've been missing
jumarko /
Created September 12, 2016 11:24 — forked from acolyer/
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
jumarko / DefaultKeyBinding.dict
Created May 3, 2017 08:55 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
View DefaultKeyBinding.dict
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more
closely match default behavior on Windows systems. This makes the Command key
behave like Windows Control key. To use Control instead of Command, either swap
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or replace @ with ^ in this file.
Here is a rough cheatsheet for syntax.
Key Modifiers
jumarko / build.boot
Created June 22, 2017 07:52 — forked from adstage-david/build.boot
Example of Visual Regression test
View build.boot
(require '[visual-regression :as vr])
(deftask compare-screenshots
"Run visual regression specs over the devcards."
(let [tmp (core/tmp-dir!)]
(fn [next-task]
(fn [file-set]
(vr/compare-cards "vr")
(next-task file-set)))))
jumarko /
Created September 14, 2017 07:16 — forked from reborg/
Clojure Design Decisions

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats. The link points back at them.

Why no pattern matching?

If you are talking about the aspect of pattern matching that acts as a conditional based upon structure, I'm not a big fan. I feel about them the way I do about switch statements - they're brittle and

jumarko /
Created November 23, 2017 07:21 — forked from robphoenix/
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers