Skip to content

Instantly share code, notes, and snippets.

@simpleprogrammer-shared
simpleprogrammer-shared / parallel-testing-with-selenium-webdriver-4
Created July 17, 2016 18:35
Parallel Testing With Selenium Webdriver - Automation on Steroids 4
using System;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
namespace SauceLabsParallelTests
{
[TestFixture("chrome", "39", "Windows 7", "", "")]
[Parallelizable]
public class SauceNUnitTest2
@simpleprogrammer-shared
simpleprogrammer-shared / parallel-testing-with-selenium-webdriver-3
Created July 17, 2016 18:34
Parallel Testing With Selenium Webdriver - Automation on Steroids 3
using System;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Remote;
namespace ParallelTestingBrowserStack
{
[TestFixture]
[Parallelizable]
public class BrowserstackTest1
@simpleprogrammer-shared
simpleprogrammer-shared / parallel-testing-with-selenium-webdriver-2
Created July 17, 2016 18:33
Parallel Testing With Selenium Webdriver - Automation on Steroids 2
using NUnit.Framework;
using OpenQA.Selenium.Firefox;
namespace ParallelLocal
{
[TestFixture]
[Parallelizable]
public class ParallelLocal
{
[Test]
@simpleprogrammer-shared
simpleprogrammer-shared / parallel-testing-with-selenium-webdriver-1
Created July 17, 2016 18:32
Parallel Testing With Selenium Webdriver - Automation on Steroids
using NUnit.Framework;
using OpenQA.Selenium.Firefox;
namespace ParallelLocal
{
[TestFixture]
public class ParallelLocal
{
[Test]
public void Test1()
@simpleprogrammer-shared
simpleprogrammer-shared / webassembly-finally-freed-from-javascript-3
Created July 17, 2016 18:21
WebAssembly: Finally Freed from JavaScript? 3
;; Example from https://github.com/WebAssembly/spec/blob/05688003a4d5abf31781141f9b3fde588e454414/ml-proto/test/fac.wast
(module
;; Recursive factorial
(func (param i64) (result i64)
(if (i64.eq (get_local 0) (i64.const 0))
(i64.const 1)
(i64.mul (get_local 0) (call 0 (i64.sub (get_local 0) (i64.const 1))))
)
)
@simpleprogrammer-shared
simpleprogrammer-shared / webassembly-finally-freed-from-javascript-2.js
Created July 17, 2016 18:20
WebAssembly: Finally Freed from JavaScript? 2
function DiagModule(stdlib, foreign, heap) {
"use asm";
// Variable Declarations
var sqrt = stdlib.Math.sqrt;
// Function Declarations
function square(x) {
x = +x;
return +(x*x);
@simpleprogrammer-shared
simpleprogrammer-shared / webassembly-finally-freed-from-javascript-1.js
Created July 17, 2016 18:19
WebAssembly: Finally Freed from JavaScript?
// A simple "class" in JavaScript with fields "a", and "b"
function SimpleClass(a, b) {
this.a = a;
this.b = b;
}
// A function on the class called "addNumbers"
SimpleClass.prototype.addNumbers = function() {
return this.a + this.b;
}
@simpleprogrammer-shared
simpleprogrammer-shared / webassembly-finally-freed-from-javascript-1.js
Created July 17, 2016 18:19
WebAssembly: Finally Freed from JavaScript?
// A simple "class" in JavaScript with fields "a", and "b"
function SimpleClass(a, b) {
this.a = a;
this.b = b;
}
// A function on the class called "addNumbers"
SimpleClass.prototype.addNumbers = function() {
return this.a + this.b;
}
@simpleprogrammer-shared
simpleprogrammer-shared / javascript-execution-stack-5.js
Created July 17, 2016 18:13
The JavaScript Execution Stack: The Key to Learning the Language 5
function a( ) {
var myvar = 2
function b() {
console.log(myvar);
}
b( );
}
var myVar = 1;
@simpleprogrammer-shared
simpleprogrammer-shared / javascript-execution-stack-4.js
Created July 17, 2016 18:12
The JavaScript Execution Stack: The Key to Learning the Language 4
function b() {
console.log(myvar);
}
function a( ) {
var myvar = 2
b( );
}
var myvar = 1;