Skip to content

Instantly share code, notes, and snippets.

View globalworming's full-sized avatar

Andreas Worm globalworming

  • headissue GmbH
  • Munich, Germany
View GitHub Profile
@globalworming
globalworming / abstract.md
Created May 8, 2023 07:48
Abstract: Refactoring JS Playwright POM To The Screenplay Pattern

When using JS playwright, you can use the test.step method to create readable nested step descriptions. With POM this might look like

class LoginForm {

  async login(email, password) {
    return test.step(`user logs in with email ${email} and password ******`, () -> {
      // ... implementation    
    })
 }
@globalworming
globalworming / README.md
Last active January 13, 2023 22:54
Firestore API key self destruct

disable Firestore API key when budget exceeded

what?

there are "kill all" solutions https://cloud.google.com/billing/docs/how-to/notify#cap_disable_billing_to_stop_usage and selective killing https://cloud.google.com/billing/docs/how-to/notify#selectively_control_usage

this is specifically for disabling firestore access

why?

given you have a firebase project and created an application to use firestore, you can not really prevent clients from DOSing you. Suddenly you get thousand dollar bill at the end of the month.

how?

@globalworming
globalworming / results.json
Created September 21, 2022 19:37
on cache2k-core dependent projects that have stars
[{
"name": "Evolveum/midpoint",
"stars": "276",
"description": "Evolveum MidPoint: Identity Management (IDM) and Identity Governance (IGA)",
"homepage": "http://midpoint.evolveum.com/",
"topics": ["identity-governance", "identity-management", "idm", "iga", "java"]
}, {
"name": "dhis2/dhis2-core",
"stars": "231",
"description": "DHIS 2 Core. Written in Java. Contains the service layer and Web API.",
@globalworming
globalworming / custom driver serenity bdd.java
Last active September 25, 2021 18:57
print console logs serenity bdd
import net.thucydides.core.webdriver.DriverSource;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.logging.LogType;
import org.openqa.selenium.logging.LoggingPreferences;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
@globalworming
globalworming / README.md
Last active October 13, 2020 11:13
minimalistic tracking pixel with AWS Lamda

Note: requires api gateway -> integrations -> get with payload format version v1.0 otherwise the gateway will return the wrong content type

@globalworming
globalworming / 00_inital_idea.md
Last active June 27, 2019 12:25
Dev Diary: Fate Accelerated Edition Online

I was playing around with spring boot and serenity bdd and thought I could put that to use. It basically started with testing a multi user application so I searched for a chat example. In the end I created an example serenity integration into spring boot.

Now I needed more features to test and somehow was inspired to create a platform to play FAE.. beacuse I like pen&paper and always wanted to try FAE, so now instead of trying it out I build a application to try it out... strange, but it's a fun exercise so far. FAE has a minimalistic and abtract ruleset which should be easy to model and implement.

@globalworming
globalworming / 1_reminder.md
Last active February 5, 2018 08:20
Infuriating Reminder To Adhere The Definition Of Done For JIRA

About The Infuriating Reminder To Adhere The Definition Of Done For JIRA

Instantly increase quality by reminding your developers of what's important prior to closing an issue. This method is fun for all and scientifically proven to work. Unfortunately this feature isn't included in Jira from the get-go and usual plugin hooks can't easily achieve what is needed. Therefor some Javascript is put to work.

Special thanks to @cruftex for coming up with the idea, thenewcode where I shamelessly copied the animation code and Jiras REST API and the ability to inject custom JS in field descriptions

Could I get some specifics?

Sure: This combination of custom field configuration and JQuery displays a helpful reminder for an