Skip to content

Instantly share code, notes, and snippets.

@mks-d
mks-d / LiquibaseMigrationTest.java
Created July 13, 2018 21:58
Context sensitive test for OpenMRS Liquibase migrations
public class LiquibaseMigrationTest extends BaseModuleContextSensitiveTest {
public LiquibaseMigrationTest() {
super();
Properties props = getRuntimeProperties();
if (useInMemoryDatabase()) {
String url = "jdbc:h2:mem:openmrs;DB_CLOSE_DELAY=30;LOCK_TIMEOUT=10000;LOCK_MODE=0";
props.setProperty(Environment.URL, url);
}
@mks-d
mks-d / ubuntu-install-eclipse.txt
Created September 26, 2017 16:01
Install Ecliipse on Ubuntu
1. Download the Eclipse *installer*, usually named:
eclipse-inst-linux64.tar.gz
2. Unpack it and run eclipse-inst that is inside, just in Nautilus.
3. When done Eclipse should simply be installed in /home/<username>/eclipse
4. The installer might add a desktop file at /usr/share/applications/eclipse.desktop
Edit that file and ensure that the Exec and Icon paths are correct, eg;
Icon=/home/<username>/eclipse/jee-oxygen/eclipse/icon.xpm
@mks-d
mks-d / openmrs_sdk.sh
Last active May 5, 2020 11:31
OpenMRS SDK quick setup
#
# Install the SDK
#
mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk
#
# Ref App
#
# Setup Ref App distro
mvn openmrs-sdk:setup -DserverId=refapp-2-11 -Ddistro=referenceapplication:2.11.0-SNAPSHOT -DdbUri=jdbc:mysql://localhost:3306/openmrs_refapp-2-11 -DdbUser=root -DdbPassword=root
@alexpeattie
alexpeattie / disable-autolinking.md
Created February 7, 2013 07:32
Disable Github-flavored Markdown autolinking

http://example.com

http://example.com

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@robnyman
robnyman / arraybuffer-blob-filereader-localStorage.js
Last active January 30, 2024 09:22
Get file as an arraybuffer, create blob, read through FileReader and save in localStorage
// Getting a file through XMLHttpRequest as an arraybuffer and creating a Blob
var rhinoStorage = localStorage.getItem("rhino"),
rhino = document.getElementById("rhino");
if (rhinoStorage) {
// Reuse existing Data URL from localStorage
rhino.setAttribute("src", rhinoStorage);
}
else {
// Create XHR, Blob and FileReader objects
var xhr = new XMLHttpRequest(),