This file contains hidden or 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
| $EXPORT_DIR = "$HOME\Desktop" | |
| $EXPORT_FILENAME = "ClipboardContent.xml" | |
| $CONTENT = [xml](Get-Clipboard) | |
| $CONTENT_BYTE_COUNT = $CONTENT.Length | |
| Write-Verbose "Writing $CONTENT_BYTE_COUNT bytes to '$EXPORT_DIR\$EXPORT_FILENAME'." | |
| Write-Output $CONTENT > "$EXPORT_DIR\$EXPORT_FILENAME" |
This file contains hidden or 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
| exports.config = { | |
| // Other options | |
| before() { | |
| browser.addCommand('displayText', function (text, duration = 3000) { | |
| const textElId = `text-el-${Math.floor(Math.random() * 10000)}` | |
| this.execute(function (id, text, duration) { | |
| var textContainer = document.createElement("div"); | |
| textContainer.id = id; |
This file contains hidden or 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 setPageUnchangedFlag(browser) { | |
| browser.execute(function () { | |
| window.__pageUnchanged = true | |
| }) | |
| } | |
| function getPageUnchangedFlag(browser) { | |
| return browser.execute(function () { | |
| return window.__pageUnchanged | |
| }).value |
This file contains hidden or 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
| // wdio.conf.js | |
| { | |
| ... | |
| before() { | |
| browser.addCommand('foo', function (callback) { | |
| callback.apply(this, []) | |
| }) | |
| } | |
| ... | |
| } |
This file contains hidden or 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 | |
| const fs = require("fs") | |
| const USAGE = "usage: anticipate [-v|--verbose] [-t|--timeout millisec] file" | |
| const OPTIONS = { | |
| "--timeout": {run: millisec => parseInt(millisec), argc: 1}, | |
| "-t": "--timeout", |
This file contains hidden or 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 | |
| LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| source "$LIB_DIR/overload" | |
| interact() | |
| { | |
| local _flag= |
This file contains hidden or 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 | |
| LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| source "$LIB_DIR/overload" | |
| interact() | |
| { | |
| local _flag= |
This file contains hidden or 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
| foo() | |
| { | |
| source="`type -f key_pressed`" | |
| echo "$source" | |
| } | |
| key_pressed(){ echo "key: $1"; } | |
| foo key_pressed |
This file contains hidden or 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 | |
| LIB_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| overload:call() | |
| { | |
| name=$1 | |
| shift |
This file contains hidden or 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 | |
| DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| LOG="$DIR/../var/log/exception.log" | |
| DATETIME_REGEX='\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[+\-]\d{2}:\d{2}' | |
| ERROR_OFFSET=0 | |
| NEXT_WORD_STORE= | |
| for WORD in "$@" |
NewerOlder