I hereby claim:
- I am masonmark on github.
- I am masonmark (https://keybase.io/masonmark) on keybase.
- I have a public key ASAwAUdfwTc-kIw-jIMOA2XxzrXxqRPPvylGFYFCrIkxsAo
To claim this, I am signing this object:
| // WastingTimeOnStackOverflowTests.swift Created by mason on 2016-09-18. | |
| import XCTest | |
| /// Measures performance of two different ways of checking whether an index is valid | |
| /// for a given array (the variable "a" is an array of 1,000,000 unique strings, and | |
| /// "val" is the index to be checked): | |
| /// | |
| /// a.indices.contains(val) | |
| /// vs: |
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| # This script is for when you are tweaking the .circleci/config.yml file itself, and don't | |
| # want to have to actually push a bunch of changes to the project master repo each | |
| # time you want to test a change to the config. (Using this will also reduce spam from any | |
| # bots that might be watching for git spam, and so on...) | |
| # | |
| # Adapted from: https://discuss.circleci.com/t/efficiently-testing-configuration-file-migrating-to-2-0/11620/2 | |
| # | |
| # Assuming a project using GitHub, running this file will trigger CircleCI (2.0 platform) without |
| function clickElementById(id, timesTriedAlready) { | |
| // var elem = element(by.id(id)); | |
| // elem.click(); | |
| // TRY: https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/2766#issuecomment-191963206 | |
| // Mason 2017-04-08 | |
| var elem = element(by.id(id)); |
| function takeScreenShot(optionalFileNameFragment) { | |
| return browser.takeScreenshot().then(function (pngData) { | |
| var fragment = '' + (optionalFileNameFragment || "screenshot"); | |
| var now = new Date(); | |
| var fullName = fragment + "-" + now.toISOString() + ".png"; | |
| var fullPath = (process.env.CIRCLE_ARTIFACTS || "/tmp") + "/" + fullName; | |
| var stream = fs.createWriteStream(fullPath); | |
| stream.write(new Buffer(pngData, 'base64')); | |
| stream.end(); |
| // NOTE: this first attempt has been superseded by a slightly better one: | |
| // https://gist.github.com/masonmark/967ec16161d6e0b26e146f32c2f35898 | |
| // Mason 2019-09-28: This is one way to allow subclasses to inherit a | |
| // method with a parameter whose type refers to the actual subclass type | |
| // (and not the parent class's type). | |
| // | |
| // One purpose here is to define a base class, that can have various | |
| // subclasses, and enable all of the subclasses to inherit a class method | |
| // named configure(), which creates an instance of the subclass and then |
| // Mason 2019-09-29: This is one way to allow subclasses to inherit a | |
| // method with a parameter whose type refers to the actual subclass type | |
| // (and not the parent class's type). | |
| // | |
| // One purpose here is to define a base class, that can have various | |
| // subclasses, and enable all of the subclasses to inherit a class method | |
| // named configure(), which creates an instance of the subclass and then | |
| // configures the instance and its various subclass-specific properties. | |
| // | |
| // The improvements are based on feedback in this thread on the Swift forum: |
| /** | |
| * Mason 2019-09-29: This is one way to allow subclasses to inherit a | |
| * method with a parameter whose type refers to the actual subclass type | |
| * (and not the parent class's type). | |
| * | |
| * One purpose here is to define a base class, that can have various | |
| * subclasses, and enable all of the subclasses to inherit a class method | |
| * named configure(), which creates an instance of the subclass and then | |
| * configures the instance and its various subclass-specific properties. |
| [ | |
| "https://twitter.com/masonmark/status/714070652", | |
| "https://twitter.com/masonmark/status/1316546416", | |
| "https://twitter.com/masonmark/status/22150795488", | |
| "https://twitter.com/masonmark/status/22151113217", | |
| "https://twitter.com/masonmark/status/41495917286658048", | |
| "https://twitter.com/masonmark/status/42146325457944576", | |
| "https://twitter.com/masonmark/status/42394383559045121", | |
| "https://twitter.com/masonmark/status/46095265169539073", | |
| "https://twitter.com/masonmark/status/46955542752673792", |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="generator" content="Screenotate 3.0.0"> | |
| <title>Honoring Boris Nemtsov on the Seventh Anniversary of his Murder - United States Department of State, 2022-02-28 at 3.40.25 PM</title> | |
| </head> | |
| <body> | |
| <div> | |
| <img height="293.0" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABX4AAAJKCAYAAACbAF1YAAABRGlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8bAxCDDwM5gwiCVmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsgshSo3vkfPFBaL5Ats0jistQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEODxcVcICVMIDnYOMiLgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYER0EpQmENUfxYDhyWj2CmEWL4VA4PFCQYG5qkIsSSg37bfZGCQ5EaIqQDDmj+egWFbb0FiUSLcAYzfWIrTjCEeY+QpYmBg/fH//2dZBgb2XQwMf4v+//899///v0uA5gPNO1AIAF+IXqFPFjSiAAAAbGVYSWZNTQAqAAAACAAEARoABQAAAAEAAAA+ARsABQAAAAEAAABGASgAAwAAAAEAAgAAh2kABAAAAAEAAABOAAAAAAAAAJAAAAABAAAAkAAAAAEAAqACAAQAAAABAAAFfqADAAQAAAABAAACSgAAAAC3LyDqAAAACXBIWXMAABYlAAAWJQFJUiTwAABAAElEQVR4Aey9CaBlRXUuvM45d556HphpUAQFFBU1zk |