Skip to content

Instantly share code, notes, and snippets.

@retrozoid
retrozoid / json2teamcity.go
Created September 10, 2019 08:30
golang test json converter to teamcity test format
package main
import (
"bufio"
"encoding/json"
"fmt"
"io"
"os"
"strings"
"time"
public static void main(String[] args) throws Exception {
opencv_core.IplImage src = cvLoadImage("src.jpg", 0);
opencv_core.IplImage tmp = cvLoadImage("tmp.png", 0);
opencv_core.IplImage result = cvCreateImage(cvSize(src.width() - tmp.width() + 1, src.height() - tmp.height() + 1), IPL_DEPTH_32F, src.nChannels());
cvZero(result);
// Match Template Function from OpenCV
@retrozoid
retrozoid / phantomjs-waitfor
Last active August 29, 2015 14:27
Just a way to work with pages synchronously based on waitFor events
var page = require('webpage').create();
page.viewportSize = {
width: 1366,
height: 768
};
var waitFor = function(testFx, onReady, onTimeout, timeOutMillis) {
var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 5000,
start = new Date().getTime(),