Skip to content

Instantly share code, notes, and snippets.

View sahajamit's full-sized avatar

Amit Rawat sahajamit

View GitHub Profile
@bartoszmajsak
bartoszmajsak / prepare-commit-msg.sh
Last active January 22, 2025 09:31
How to automatically prepend git commit with a branch name
#!/bin/bash
# This way you can customize which branches should be skipped when
# prepending commit message.
if [ -z "$BRANCHES_TO_SKIP" ]; then
BRANCHES_TO_SKIP=(master develop test)
fi
BRANCH_NAME=$(git symbolic-ref --short HEAD)
BRANCH_NAME="${BRANCH_NAME##*/}"
@2sbsbsb
2sbsbsb / HTMLTableBuilder.java
Created June 18, 2012 23:43
Simple HTML Table Builder
/**
* Uses:
* HTMLTableBuilder htmlBuilder = new HTMLTableBuilder(null, true, 2, 3);
* htmlBuilder.addTableHeader("1H", "2H", "3H");
* htmlBuilder.addRowValues("1", "2", "3");
* htmlBuilder.addRowValues("4", "5", "6");
* htmlBuilder.addRowValues("9", "8", "7");
* String table = htmlBuilder.build();
* System.out.println(table.toString());
*/
@lucataco
lucataco / ollama_fast_speech_text_speech.py
Last active February 19, 2025 12:29
speech to text to speech using Ollama
""" To use: install Ollama, clone OpenVoice, run this script in the OpenVoice directory
brew install portaudio
brew install git-lfs
git lfs install
git clone https://github.com/myshell-ai/OpenVoice
cd OpenVoice
git clone https://huggingface.co/myshell-ai/OpenVoice
cp -r OpenVoice/* .
@sahajamit
sahajamit / AutomationFrameworkMigrationPrompt.md
Last active March 24, 2025 16:26
AutomationFrameworkMigrationPrompt.md

Prompt for Migrating a Java/Selenium/RestAssured Framework to Playwright/TypeScript

I have a Java-based automation framework using Selenium for UI testing and RestAssured for API testing. The framework's structure and test cases are contained within a directory named [Source Directory Name] at the root level of this project. Please migrate this entire framework to use Playwright with TypeScript for both UI and API testing. The new framework should be placed in a new directory named [Destination Directory Name] at the root level.

The current framework includes:

  • UI Tests: Implemented using Selenium, likely with a Page Object Model (POM) or similar design pattern. These tests cover various user interactions with the web application.
  • API Tests: Implemented using RestAssured, covering the testing of RESTful APIs. These tests verify API functionality, data integrity, and response codes.
  • Test Framework: Likely using JUnit or TestNG for test execution, reporting, and assertion.