- This sample is based on "Tutorial: Deploy a Dapr application to Azure Container Apps with an Azure Resource Manager or Bicep template"
- In addition to the tutorial, added virtual network integration and private endpoints
graph TB
subgraph VNet
import sqlite3 | |
def store_data(device, version, results_url, ticket_key, timestamp, test_name, test_config): | |
conn = sqlite3.connect('tests.db') | |
c = conn.cursor() | |
c.execute('CREATE TABLE IF NOT EXISTS tests (device text, version text, results_url text, ticket_key text, timestamp text, test_name text, test_config text)') | |
c.execute('INSERT INTO tests (device, version, results_url, ticket_key, timestamp, test_name, test_config) VALUES (?, ?, ?, ?, ?, ?, ?)', (device, version, results_url, ticket_key, timestamp, test_name, test_config)) | |
conn.commit() |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
# Start a new webdriver instance | |
driver = webdriver.Firefox() | |
# Navigate to the page with the text field | |
driver.get('http://www.example.com/chatgpt') | |
# Find the text field element on the page |
import os | |
import subprocess | |
def subscribe_to_mqtt_topic( | |
topic: str, path: str, awsip: str=os.getenv("AWSIP"), | |
awsport: str=os.getenv("AWSPORT")) -> str: | |
""" | |
Subscribes to the MQTT topic with the specified name and writes the received messages to a file with the same name. | |
Returns the file path of the created file. | |
""" |
@echo off | |
echo Installing Apache Maven... | |
rem Set the Maven version to install | |
set MAVEN_VERSION=3.6.3 | |
rem Set the installation directory for Maven | |
set MAVEN_INSTALL_DIR=C:\Program Files\Apache\maven |
#!/bin/sh | |
# Exit immediately if any command returns a non-zero exit code | |
set -e | |
# Check if the current directory is a git repository | |
if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
printf "Error: current directory is not a git repository\n" | |
exit 1 |
--------------------------------------------------------------------------------------------- | |
-- LGS_script_template.lua | |
--------------------------------------------------------------------------------------------- | |
-- Version: 2019-04-19 | |
-- Author: Egor Skriptunoff | |
-- | |
-- | |
-- This is a template for "Logitech Gaming Software" script file. | |
-- Four useful features are implemented here: | |
-- |
graph TB
subgraph VNet
var x = document.querySelectorAll("a"); | |
var myarray = [] | |
for (var i=0; i<x.length; i++){ | |
var nametext = x[i].textContent; | |
var cleantext = nametext.replace(/\s+/g, ' ').trim(); | |
var cleanlink = x[i].href; | |
myarray.push([cleantext,cleanlink]); | |
}; | |
function make_table() { | |
var table = '<table><thead><th>Name</th><th>Links</th></thead><tbody>'; |
if grep -qEi "(Microsoft|WSL)" /proc/version &> /dev/null ; then | |
echo WSL2 detected. Using Local \$DISPLAY. $DISPLAY | |
export DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0 | |
else | |
echo Using Ghost\'s \$DISPLAY: $DISPLAY | |
export DISPLAY=$(mosquitto_sub -h $AWSIP -p $AWSPORT -t status/ghost/IP -C 1):0.0 | |
fi |
adb kill-server && adb tcpip 5555 && sleep 5 && adb shell ip route | awk '{print $9}' | xargs adb connect |