Skip to content

Commit

Permalink
2025-01-09 17:12:39.806169 new snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardocerqueira committed Jan 9, 2025
1 parent 5bfc401 commit bde9d04
Show file tree
Hide file tree
Showing 22 changed files with 1,194 additions and 784 deletions.
36 changes: 36 additions & 0 deletions seeker/report.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
--------------------------------------------------------------------------------
2025-01-09 17:12:39.806169
--------------------------------------------------------------------------------
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: snippet/HashMap.java
deleted: snippet/Square_root.py
deleted: snippet/arbitrage_monitor.py
deleted: snippet/cambio.sh
deleted: snippet/concurrent-processing.sh
modified: snippet/main.py
deleted: snippet/migrate_rancher.sh
deleted: snippet/psql-with-gzip-cheatsheet.sh
deleted: snippet/psql-with-gzip.sh
deleted: snippet/sample.py
deleted: snippet/transliterate_files.py

Untracked files:
(use "git add <file>..." to include in what will be committed)
snippet/DriverManager.java
snippet/agentic_workflow.py
snippet/base36converter.py
snippet/build-emacs.sh
snippet/buildDateLayouts.go
snippet/check_template_override.py
snippet/dag_tags_rbac.py
snippet/install-geoip.sh
snippet/minescript-chatgpt.py
snippet/network-settings-check.sh

no changes added to commit (use "git add" and/or "git commit -a")

--------------------------------------------------------------------------------
2025-01-08 17:12:32.396065
--------------------------------------------------------------------------------
Expand Down
49 changes: 49 additions & 0 deletions seeker/snippet/DriverManager.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//date: 2025-01-09T17:06:25Z
//url: https://api.github.com/gists/780c2128c6c590576e7997dbdd4cfe42
//owner: https://api.github.com/users/borodicht

package ui.drivers;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;

public class DriverManager {

private static ThreadLocal <WebDriver> driver = new ThreadLocal<>();

private DriverManager() {};

public static WebDriver getDriver() {
if (driver.get() == null) {
iniztialiazeDriver();
}
return driver.get();
}

private static void iniztialiazeDriver() {
String browser = System.getProperty("browser", "chrome");

switch (browser.toLowerCase()) {
case "chrome":
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless");
driver.set(new ChromeDriver(options));
case "firefox":
FirefoxOptions options1 = new FirefoxOptions();
options1.addArguments("--headless");
driver.set(new FirefoxDriver(options1));
default:
throw new IllegalArgumentException(browser);
}
}

public void tearDown() {
if(driver.get() != null) {
driver.get().quit();
driver.remove();
}
}
}
69 changes: 0 additions & 69 deletions seeker/snippet/HashMap.java

This file was deleted.

10 changes: 0 additions & 10 deletions seeker/snippet/Square_root.py

This file was deleted.

Loading

0 comments on commit bde9d04

Please sign in to comment.