Skip to content

Instantly share code, notes, and snippets.

View jumarko's full-sized avatar

Juraj Martinka jumarko

View GitHub Profile
@jumarko
jumarko / build.boot
Created June 22, 2017 07:52 — forked from adstage-david/build.boot
Example of Visual Regression test
(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
jumarko / DefaultKeyBinding.dict
Created May 3, 2017 08:55 — forked from trusktr/DefaultKeyBinding.dict
My DefaultKeyBinding.dict for Mac OS X
/* ~/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
jumarko / service-checklist.md
Created September 12, 2016 11:24 — forked from acolyer/service-checklist.md
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
jumarko / introrx.md
Created August 5, 2016 08:20 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
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
jumarko / docker_etc_hosts.sh
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:10.0.2.2'"
localhostCount=`grep localhost /etc/hosts | wc -l`
if [[ $localhostCount -gt 2 ]];then
cat /etc/hosts | sed '/127.0.0.1.*/d' > hosts.tmp
cat hosts.tmp > /etc/hosts
rm hosts.tmp
fi
@jumarko
jumarko / Dialog with ComboViewer
Created October 23, 2012 12:33
JFace ComboViewer databinding
protected Control createDialogArea(Composite parent) {
...
createEntityCombo();
...
initBindings();
}
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
jumarko / gatling-maven-project.pom.xml
Created February 24, 2014 07:36
Gatling maven project
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gooddata</groupId>
<artifactId>performance-tests</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>${project.artifactId}</name>
<properties>