This file contains 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
# Bookmark this to open the tree in Version One (aka. Digital.ai Agility) | |
javascript:function expand(){ var els = $('a.show'); els.map((_, el) => el.click()); if (els.length > 0){ setTimeout(expand, 1500); } }; setTimeout(expand, 0) |
This file contains 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
''' | |
$ git diff --unified=0 path/to/robot | python differ.py | |
''' | |
import re | |
import sys | |
from collections import defaultdict | |
from pathlib import Path | |
from robot.api import SuiteVisitor, TestSuiteBuilder |
This file contains 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
'''Simple example script below is quite straightforward. | |
Although Slack recommends integrating to it by writing Apps[1], | |
the old-school webhook integration still works as well | |
[1] https://api.slack.com/start/overview | |
''' | |
import json | |
import os |
This file contains 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
// Add this as a bookmark in the bookmark bar | |
javascript:function expand(){ var els = $('a.show'); els.map((_, el) => el.click()); if (els.length > 0){ setTimeout(expand, 1500); } }; setTimeout(expand, 0) |
This file contains 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
from itertools import chain | |
from robot.api import TestSuiteBuilder | |
from robot.libraries.BuiltIn import BuiltIn | |
from robot.libraries import Dialogs | |
class MabotLibrary(object): | |
'''MabotLibrary facilitates running manual testing with Robot Framework. |
This file contains 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
# Example from https://robot-framework.readthedocs.io/en/latest/autodoc/robot.running.html#examples | |
from robot.api import TestSuite | |
suite = TestSuite('Activate Skynet') | |
suite.resource.imports.library('OperatingSystem') | |
test = suite.tests.create('Should Activate Skynet') | |
test.keywords.create('Set Environment Variable', args=['SKYNET', 'activated']) | |
test.keywords.create('Environment Variable Should Be Set', args=['SKYNET']) | |
result = suite.run(output='skynet.xml') |
This file contains 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
from decimal import Decimal | |
from pprint import pprint | |
from random import choice, choices, randint | |
def random_digits(n): | |
"""Returns int with length `n`""" | |
start = 10**(n-1) | |
end = (10**n)-1 | |
return randint(start, end) |
This file contains 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
sleep 5400 && osascript -e 'tell application "Spotify" to pause' | |
# 5400 seconds == 90 minutes |
This file contains 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
<snippet> | |
<content><![CDATA[\${${SELECTION}}]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<!-- <tabTrigger>hello</tabTrigger> --> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> | |
<!-- keymap: | |
{ "keys": ["ctrl+r"], "command": "insert_snippet", "args":{"name": "Packages/User/wrap_rf_variables.sublime-snippet"}} |
This file contains 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
-- https://stackoverflow.com/a/754570 | |
SELECT CONCAT( | |
'Sufficient and sufficiently varied month_value test data: ', | |
CASE WHEN ( | |
SELECT COUNT(DISTINCT y, m) FROM month_value | |
) > 10 | |
AND ( | |
SELECT COUNT(DISTINCT y) FROM month_value | |
) > 3 |
NewerOlder