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
# quick install on MacOS/Linux | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
# install Posting (will also quickly install Python 3.12 if needed) | |
uv tool install --python 3.12 posting | |
# Use to run script | |
uv tool install posting --with httpx | |
# Start |
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
$docker compose up -d | |
$docker compose ps |
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
public class SeleniumWithNetworkInterceptorTest { | |
static WebDriver driver; | |
@BeforeAll | |
public static void initial() { | |
System.setProperty("webdriver.chrome.driver", "path-to-driver"); | |
var options = new ChromeOptions(); | |
// Enable BiDi | |
options.setCapability("webSocketUrl", true); |
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
$go test ./... -cover -v | |
=== RUN TestSuccessWithGetDataByID | |
2025/01/29 22:24:37 github.com/testcontainers/testcontainers-go - Connected to docker: | |
Server Version: 27.4.0 | |
API Version: 1.46 | |
Operating System: Docker Desktop | |
Total Memory: 11948 MB | |
Testcontainers for Go Version: v0.35.0 | |
Resolved Docker Host: unix:///var/run/docker.sock |
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
$pip install browser-use | |
$playwright install |
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
*** Settings *** | |
Library SeleniumLibrary | |
*** Variables *** | |
${URL} https://seleniumbase.io/coffee/ | |
${BROWSER} chrome | |
*** Test Cases *** | |
Success case ทำการสั่งซื้อกาแฟ Americano 1 แก้ว | |
Open Browser ${URL} ${BROWSER} |
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
# Download | |
$ollama pull deepseek-r1:7b | |
pulling manifest | |
pulling f4d24e9138dd... 100% ▕████████████████████████▏ 148 B | |
pulling 40fb844194b2... 100% ▕████████████████████████▏ 487 B | |
verifying sha256 digest | |
writing manifest | |
success | |
# Run |
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
1. Navigate to website https://demo-frontend-reactjs.vercel.app | |
2. In the home page, check result in page | |
2.1 Show message "Call REST API 2024/12/25 new !!" in atrtribute "data-testid="message_text"" | |
2.2 Show message "Hello World!" in attribute "data-testid="hello_text"" |
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
// Redis | |
import KeyvRedis from '@keyv/redis'; | |
const keyv = new Keyv(new KeyvRedis('redis://user:pass@localhost:6379')); | |
// ใช้งานผ่าน namespace | |
const users = new Keyv(new KeyvRedis('redis://user:pass@localhost:6379'), { namespace: 'users' }); | |
const cache = new Keyv(new KeyvRedis('redis://user:pass@localhost:6379'), { namespace: 'cache' }); | |
// SQLite | |
import KeyvSqlite from '@keyv/sqlite'; |
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
spring: | |
application: | |
name: demo-service | |
docker: | |
compose: | |
file: | |
- "compose-for-db.yml" | |
- "compose-for-cached.yml" |