Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mandric
mandric / heartbeat-css-animation.markdown
Last active February 12, 2023 20:04
Heartbeat css animation
#!/bin/sh
#
# Do bulk edit request.
#
SELF=`basename $0`
COUCH_URL=${COUCH_URL-http://admin:secret@localhost:5988}
DOCS="$1"
if [ -z "$DOCS" ]; then
"use script";
const webdriver = require('selenium-webdriver');
const chrome = require('selenium-webdriver/chrome');
const firefox = require('selenium-webdriver/firefox');
const edge = require('selenium-webdriver/edge');
const Command = require("selenium-webdriver/lib/command").Command;
const { logging } = webdriver
#!/usr/bin/env bash
# https://github.com/microsoft/dotnet-framework-docker/blob/master/eng/common/pull-image.sh
# Stop script on NZEC
set -e
# Stop script if unbound variable found (use ${var:-} if intentional)
set -u
print_err() {
printf "%b\n" "Error: $1" >&2
@mandric
mandric / test.js
Last active May 2, 2019 19:36
start a service and test it example from heroku
const { spawn } = require('child_process');
const request = require('request');
const test = require('tape');
// Start the app
const env = Object.assign({}, process.env, {PORT: 5000});
const child = spawn('node', ['index.js'], {env});
test('responds to requests', (t) => {
t.plan(4);
Verifying my Blockstack ID is secured with the address 17VfKHLgWyeiWpRpmSBaZiSLvrdcBS2777 https://explorer.blockstack.org/address/17VfKHLgWyeiWpRpmSBaZiSLvrdcBS2777
@mandric
mandric / TestcrosswalkActivity.java
Created October 14, 2016 02:14
Trying to get chromium command line switches to work with crosswalk-21.51.546.6
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.medicmobile.testcrosswalk;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
#!/usr/bin/env bash
EXTS_PICS_RE='(\.png$|\.jpg$|\.jpeg$)'
EXTS_VIDS_RE='(\.mp4$|\.mov$|\.mpg$|\.m4v$)'
EXTS_AUDIO_RE='(\.mp3$|\.opus$|\.m4a$)'
ALBUM_SUBTITLE="${ALBUM_SUBTITLE-`date '+%B %Y'`}"
ALBUM_SORT="${ALBUM_SORT-sort}"
ALBUM_POSTER_WIDTH=${ALBUM_POSTER_WIDTH-640}
ALBUM_TITLE="${ALBUM_TITLE-`basename "$PWD"`}"
{
"_id": "29f9ea9dd74edf1d6b72f6ad7715fd2e",
"type": "market",
"name": "Local Test Market",
"url": "http://localhost:5984/market/_design/market/_rewrite/"
}
{
"type": "reminder_registration",
"form": { "code": "ANCR" },
"auto_id": {
"property_name": "patient_id",
"format": "11111"
},
"responses": {
"valid": {
"en": "Thank you {{chw_name}} for registering {{patient_name}}. Patient ID is {{patient_id}}. ANC visit is needed in {{weeks}} weeks.",