Skip to content

Instantly share code, notes, and snippets.

View christian-bromann's full-sized avatar
🕵️‍♂️
Testing All The Things™

Christian Bromann christian-bromann

🕵️‍♂️
Testing All The Things™
View GitHub Profile
@alexglow
alexglow / error-messages
Last active January 31, 2018 22:57
This is a list of errors you may encounter when testing in Sauce Labs, as well as the usual causes and how to fix them. The list is under construction and will soon be made available on the Sauce Labs website, but it's here for now so that you can find it when Googling!
Search for the error message you're seeing. Then read what we have to say about it. Then fix it! If you still have problems, write in to help@saucelabs.com .
==== AUTOMATED JOB ERRORS: ====
-- Invalid credentials --
Some combination of the following error messages will be thrown:
OpenQA.Selenium.WebDriverException : Unexpected error. Unknown username.
You sent username 'None' in your browser string, which is not a valid Sauce Labs account.
OpenQA.Selenium.WebDriverException : Unexpected error. Invalid Credentials.
org.openqa.selenium.UnsupportedCommandException: Invalid Credentials.
@mrflix
mrflix / soundfinder.js
Created September 12, 2013 14:25
Soundfinder Bookmarklet
// MIT License
// by @mrflix
(function(){
// Template Matching algorithm using correlation coeffizient
// http://en.wikipedia.org/wiki/Template_matching
// learned at HTW Berlin tought by Prof. Dr. Kai Uwe Barthel
function getCorrelationCoeffizient(data1, data2){
var sumI = 0, sumI2 = 0, sumIR = 0, sumR = 0, sumR2 = 0;
@wavded
wavded / promise.js
Last active May 6, 2021 13:25
Promise A+ Implementation
"use strict"
var Promise = function () {
this.state = 'pending'
this.thenables = []
}
Promise.prototype.resolve = function (value) {
if (this.state != 'pending') return
this.state = 'fulfilled'
@TooTallNate
TooTallNate / bbs.js
Created March 16, 2012 22:42
Running a node.js REPL over `curl`
/**
* Requires node v0.7.7 or greater.
*
* To connect: $ curl -sSNT. localhost:8000
*/
var http = require('http')
, repl = require('repl')
, buf0 = new Buffer([0])
@sr75
sr75 / run-ie-7-8-9-virtualbox-on-osx.txt
Created March 15, 2012 13:52
Run IE 7, 8, and 9 in Mac OS X
# the admin password for all of the IE VMs is “Password1″ without the quotes, it's also used for the password hints
1) Install VirtuaBox on your mac
http://download.virtualbox.org/virtualbox/4.1.10/VirtualBox-4.1.10-76795-OSX.dmg
2) Decide which versions of Internet Explorer you want to download and install – each version of Internet Explorer is contained within a separate virtual machine that runs within VirtualBox. In other words, if you want to run Internet Explorer 7, 8, and 9, you will need to download three separate VM’s, which may take a while so keep that in mind. Select the text below and copy it:
# Install ALL versions of Internet Explorer: IE 7, IE 8, and IE 9 (for now this script will also pull down a IE 6 vm with windows xp)
@logicalparadox
logicalparadox / About.md
Created January 8, 2012 07:01
Designing `loggable` custom error constructors for Node.js.

Custom Errors

I am working on a custom error constructor for my seed project. I had a few objectives in mind when I started.

  • When in production, these errors need to be able to be serialized for logging.
  • When in development, I can easily throw these errors should I need additional feedback on to what is going on.
  • Any addon plugins made can use or extend the custom error type and still satisfy the first two objective with ease.

Screenshot

// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}