Skip to content

Instantly share code, notes, and snippets.

View acdvorak's full-sized avatar

Andrew C. Dvorak acdvorak

View GitHub Profile
@acdvorak
acdvorak / test.js
Last active July 9, 2018 23:36
Firefox Windows Selenium Bug - CrossBrowserTesting.com
const Base64 = require('base64-js');
const fs = require('fs');
const {Builder, Capabilities} = require('selenium-webdriver'); // version 4.0.0-alpha.1
const CBT_USERNAME = process.env.CBT_USERNAME;
const CBT_AUTHKEY = process.env.CBT_AUTHKEY;
const SELENIUM_SERVER_URL = `http://${CBT_USERNAME}:${CBT_AUTHKEY}@hub.crossbrowsertesting.com:80/wd/hub`;
async function runAsync() {
const builder = new Builder()
@acdvorak
acdvorak / test.js
Last active July 9, 2018 23:36
Safari iOS Selenium Screenshot PNG Bug - CrossBrowserTesting.com
const Base64 = require('base64-js');
const fs = require('fs');
const {Builder, Capabilities} = require('selenium-webdriver'); // version 4.0.0-alpha.1
const CBT_USERNAME = process.env.CBT_USERNAME;
const CBT_AUTHKEY = process.env.CBT_AUTHKEY;
const SELENIUM_SERVER_URL = `http://${CBT_USERNAME}:${CBT_AUTHKEY}@hub.crossbrowsertesting.com:80/wd/hub`;
async function runAsync() {
const builder = new Builder()
diff --git a/package.json b/package.json
index 34d1f3ecc..1f700e74a 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,7 @@
"lint": "npm-run-all --parallel lint:*",
"postinstall": "lerna bootstrap",
"pretest": "npm run lint",
- "test": "npm run test:unit && npm run test:closure && npm run test:dependency && npm run build && npm run clean",
+ "test": "echo TEST",
@acdvorak
acdvorak / golden.json
Last active April 10, 2018 18:28
MDC Web Screenshot Module API
{
"mdc-button/classes/baseline.html": {
"idle state": {
"desktop_chrome_ltr": "https://.../<USERNAME>/<TIMESTAMP>/<COMMIT>/<HTML_FILE_PATH>/desktop_chrome_ltr.png",
"desktop_chrome_rtl": "https://.../<USERNAME>/<TIMESTAMP>/<COMMIT>/<HTML_FILE_PATH>/desktop_chrome_rtl.png",
"desktop_firefox_ltr": "https://.../<USERNAME>/<TIMESTAMP>/<COMMIT>/<HTML_FILE_PATH>/desktop_firefox_ltr.png",
"desktop_firefox_rtl": "https://.../<USERNAME>/<TIMESTAMP>/<COMMIT>/<HTML_FILE_PATH>/desktop_firefox_rtl.png",
"desktop_edge_ltr": "https://.../<USERNAME>/<TIMESTAMP>/<COMMIT>/<HTML_FILE_PATH>/desktop_edge_ltr.png",
"desktop_edge_rtl": "https://.../<USERNAME>/<TIMESTAMP>/<COMMIT>/<HTML_FILE_PATH>/desktop_edge_rtl.png",
"desktop_ie11_ltr": "https://.../<USERNAME>/<TIMESTAMP>/<COMMIT>/<HTML_FILE_PATH>/desktop_ie11_ltr.png",
@acdvorak
acdvorak / 1-source-code-locations.md
Last active October 21, 2017 11:35
MDC-Web: CrossBrowserTesting Selenium Sample Output
@acdvorak
acdvorak / tmux-all-panes.sh
Last active August 6, 2021 17:09 — forked from yubink/inall.sh
tmux: run a command in all panes
#!/bin/bash
# Runs the specified command (provided by the first argument) in all tmux panes
# in every window. If an application is currently running in a given pane
# (e.g., vim), it is suspended and then resumed so the command can be run.
all-panes()
{
all-panes-bg_ "$1" &
}

Keybase proof

I hereby claim:

  • I am acdvorak on github.
  • I am acdvorak (https://keybase.io/acdvorak) on keybase.
  • I have a public key whose fingerprint is 734D DB15 1505 57BF 7D38 A8D4 26FF 3A9D C497 DD69

To claim this, I am signing this object:

@acdvorak
acdvorak / log4net-boilerplate.cs
Created January 13, 2014 17:44
log4net instantiation boilerplate
private static readonly log4net.ILog Log = log4net.LogManager.GetLogger(
System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@acdvorak
acdvorak / document-outline.js
Last active December 30, 2015 22:29
Generate document outline from heading tags (h1, h2, etc.)
/** Full version */
(function() {
var tab = ' ';
var lines = [];
$('h1, h2, h3, h4, h5, h6').each(function() {
var level = (this.tagName.replace(/^H/, '') - 1);
var indent = '';
while (level--) {
indent += tab;
@acdvorak
acdvorak / ie-memory-fix.js
Created October 16, 2012 18:30
Fix jQuery and DOM-related Memory Leaks in IE < 9
/**
* Fix JS/DOM memory leaks in IE < 9.
* Tested w/ jQuery 1.8.2, but should be compatible w/ jQuery 1.7.x
*/
(function( $, undefined ) {
/**
* <code>true</code> if the browser is IE &lt; 9; otherwise <code>false</code>
* @type {Boolean}
*/
var oldIE = $('<span/>').html('<!--[if lt IE 9 ]><div></div><![endif]-->').find('div').length > 0;