This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Proxy that will close any connection for a response with the partial payload "event: end" | |
// This allows us to treat server send events (SSE) as if the server would close the connection, easing integration with regular HTTP tools | |
const http = require("http"), | |
httpProxy = require("http-proxy"), | |
zlib = require("zlib"); | |
const target = process.env.TARGET_BASE_URL || "http://localhost:8000", | |
port = process.env.PORT || 3333; | |
const proxy = httpProxy.createProxyServer({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
readonly gopass_prefix="" | |
generate_empty_store() { | |
local target_file="$1" | |
local master_password="" | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Concourse CI 5 supports CC.XML | |
// This small program will allow unauthorised access to the new API, while we | |
// figure out how to get existing monitors on to OAuth and friends. | |
const concourseUrl = 'http://localhost:8080'; | |
const port = 8081; | |
const flyTarget = 'proxy'; | |
const flyExecutablePath = 'fly'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
readonly TMP_DIR="/tmp/rearrange_double_sided_scan.$$" | |
pages_rearranged() { | |
local dir="$1" | |
local count | |
count=$(( $(ls "$dir" | wc -l) / 2 )) | |
paste -d '\n' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var doc = fakeDocument( | |
aParagraph('some text'), | |
aBookmark('my-id') | |
); | |
doc.getBody().getNumChildren(); | |
// => 2 | |
doc.getBody().getChild(0).getText(); | |
// => 'some text' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import requests | |
import json | |
POST_URL = 'https://slack.com/api/chat.postMessage' | |
REPOSITORY_PR = 'https://{{ your corporate server }}/rest/api/1.0/projects/{{ your project }}/repos/{{ your repo }}/pull-requests?state=OPEN' | |
SLACK_CHANNEL = '#{{ your channel }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For test cases wrapped with <testsuites>. For a single <testsuite> adapt accordingly. | |
find . -name "*.xml" -exec cat {} \; \ | |
| sed "/<\?xml [^>]*\?>/d" | sed "/<\/*testsuites>/d" \ | |
| (echo '<?xml version="1.0" encoding="UTF-8"?>' && echo '<testsuites>' && cat && echo '</testsuites>') \ | |
> joined_xml | |
mv joined_xml joined.xml # Avoid the output being mixed up with the input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csscritic.addReporter({ | |
reportComparison: function (comparison) { | |
if (imagediff.equal(comparison.pageImage, comparison.referenceImage)) { | |
return; | |
} | |
var d = imagediff.diff(comparison.pageImage, comparison.referenceImage, {align: 'top'}).data; | |
var pixelDiff = [], i; | |
for (i=0; i < d.length; i += 4) { | |
if (d[i] !== 0 || d[i+1] !== 0 || d[i+2] !== 0 || d[i+3] !== 255) { | |
pixelDiff.push([d[i], d[i+1], d[i+2], d[i+3]]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (root, factory) { | |
if (typeof define === 'function' && define.amd) { | |
define(['ayepromise'], factory); | |
} else if (typeof exports === 'object') { | |
module.exports = factory(require('ayepromise')); | |
} else { | |
root.ayepromise = factory(root.ayepromise); | |
} | |
}(this, function (ayepromise) { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install selenium-webdriver | |
npm install selenium-server-standalone-jar | |
npm install phantomjs |
NewerOlder