Skip to content

Instantly share code, notes, and snippets.

View jumarko's full-sized avatar

Juraj Martinka jumarko

View GitHub Profile
@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>
@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 / 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
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 / introrx.md
Created August 5, 2016 08:20 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@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 / 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 / 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 / rich-already-answered-that.md
Created September 14, 2017 07:16 — forked from reborg/rich-already-answered-that.md
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.

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
jumarko / spacemacs-cheshe.md
Created November 23, 2017 07:21 — forked from robphoenix/spacemacs-cheshe.md
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