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
| import telebot | |
| import gspread | |
| from google.oauth2.service_account import Credentials | |
| # Google Sheets credentials and setup | |
| scopes = ["https://www.googleapis.com/auth/spreadsheets"] | |
| creds = Credentials.from_service_account_file("credentials.json", scopes=scopes) | |
| client = gspread.authorize(creds) | |
| sheet_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
| modules: | |
| jmeter: | |
| path: ~/.bzt/jmeter-taurus/bin/jmeter | |
| download-link: https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.4.2.zip | |
| version: 5.4.2 | |
| fix-jars: true | |
| execution: | |
| - concurrency: 1 | |
| hold-for: 1m |
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
| modules: | |
| jmeter: | |
| path: ~/.bzt/jmeter-taurus/bin/jmeter | |
| download-link: https://archive.apache.org/dist/jmeter/binaries/apache-jmeter-5.4.2.zip | |
| version: 5.4.2 | |
| fix-jars: true | |
| execution: | |
| - concurrency: 1 | |
| hold-for: 1m |
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
| // Initialize variables to hold peer connections and data channels | |
| let pc1, pc2, dc1, dc2; | |
| // Function to start the connection process for peer 1 (Offerer) | |
| async function startPeer1() { | |
| pc1 = new RTCPeerConnection(); | |
| // Create data channel for peer 1 | |
| dc1 = pc1.createDataChannel('channel'); |
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
| // Initialize variables to hold peer connections and data channels | |
| let pc1, pc2, dc1, dc2; | |
| // Function to start the connection process for peer 1 (Offerer) | |
| async function startPeer1() { | |
| pc1 = new RTCPeerConnection(); | |
| // Create data channel for peer 1 | |
| dc1 = pc1.createDataChannel('channel'); |
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
| // Select all elements matching the XPath expression | |
| const xpathExpression = '//*[@fill="var(--markmap-circle-open-bg)"]'; | |
| const matchingElements = document.evaluate(xpathExpression, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
| // Iterate through each matching element and simulate a click | |
| for (let i = 0; i < matchingElements.snapshotLength; i++) { | |
| const element = matchingElements.snapshotItem(i); | |
| // Check if the element is an interactive element or has a click event handler | |
| if (element.tagName.toLowerCase() === 'a' || element.tagName.toLowerCase() === 'button' || typeof element.click === 'function') { |
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
| alert('HEY ONE BUBA') |
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
| sudo launchctl load -w /Library/LaunchDaemons/org.openvpn.client.plist |
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
| docker run --rm -it -p 8080:8080 theasp/novnc | |
| Simpliest way to open VNC to selenoid: | |
| localhost:4444 - selenoid server | |
| 2a398b1d73ca57e2559ad4ca785abae3 - your session id | |
| https://novnc.com/noVNC/vnc.html?host=localhost&port=4444&path=vnc/2a398b1d73ca57e2559ad4ca785abae3&password=selenoid |
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
| import base64 | |
| def before_all(context): | |
| def embed_data(mime_type, data, caption): | |
| # If data is empty we want to finish html tag with at least one character | |
| non_empty_data = " " if not data else data | |
| for formatter in context._runner.formatters: | |
| if "html" in formatter.name: | |
| formatter.embedding(mime_type=mime_type, data=non_empty_data, caption=caption) | |
| return |
NewerOlder