Skip to content

Instantly share code, notes, and snippets.

View DovieW's full-sized avatar

Dovie Weinstock DovieW

View GitHub Profile
@rain-1
rain-1 / base model trends.md
Last active July 18, 2025 19:03
base model trends.md
@Dowwie
Dowwie / socratic_fp_learning.md
Created June 7, 2025 09:23
Following is a prompt for effective learning with an LLM. It uses the Socratic method to help the student build up their understanding from first principles. Replace the topic in the prompt and then in your follow-up prompt , specify the subject.

You are a teacher of algorithms and data-structures who specializes in the use of the socratic method of teaching concepts. You build up a foundation of understanding with your student as they advance using first principles thinking. Explain the subject that the student provides to you using this approach. By default, do not explain using source code nor artifacts until the student asks for you to do so. Furthermore, do not use analysis tools. Instead, explain concepts in natural language. You are to assume the role of teacher where the teacher asks a leading question to the student. The student thinks and responds. Engage misunderstanding until the student has sufficiently demonstrated that they've corrected their thinking. Continue until the core material of a subject is completely covered. I would benefit most from an explanation style in which you frequently pause to confirm, via asking me test questions, that I've understood your explanations so far. Particularly helpful are test questions related to sim

@sahajamit
sahajamit / AutomationFrameworkMigrationPrompt.md
Last active July 8, 2025 14:30
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.
@DovieW
DovieW / issues-gitea-to-github.sh
Created November 16, 2023 23:47
Transfer issues from Gitea to Github
#!/bin/bash
# Configuration
GITEA_REPO="username/repository"
GITEA_API_TOKEN="your_gitea_api_token"
GITHUB_REPO="username/repository"
GITHUB_API_TOKEN="your_github_api_token"
GITEA_API_URL="https://your_gitea_instance/api/v1"
GITHUB_API_URL="https://api.github.com"
ISSUE_FILE="gitea_issues.json"
@DovieW
DovieW / send_email.ps1
Created May 11, 2023 02:26
Send Email via PowerShell
$to = "[email protected],[email protected]" # comma separate multiple recipients
$from = "[email protected]"
$subject = "subject goes here"
$body = "message body goes here"
$smtpServer = "smtp.gmail.com"
$smtpClient = New-Object Net.Mail.SmtpClient($smtpServer, 587) # port 25 for non SSL, port 587 for SSL
$smtpClient.EnableSsl = $true # set to $true for SSL
""""""""""""""""""""""
" Leader
""""""""""""""""""""""
" let mapleader=,
" can't set leaders in Obsidian vim, so the key just has to be used consistently.
" However, it needs to be unmapped, to not trigger default behavior: https://github.com/esm7/obsidian-vimrc-support#some-help-with-binding-space-chords-doom-and-spacemacs-fans
unmap ,
" map ; to : in normal mode, so that I don’t rely on the shift key
" nmap ; :
@volkbay
volkbay / fix_git_security_check_termux.md
Last active July 21, 2025 21:29
Disable Git security check on Termux

👾 Error

fatal: detected dubious ownership in repository at '/storage/emulated/0/<some_folder>'
To add an exception for this directory, call:

        git config --global --add safe.directory /storage/emulated/0/<some_folder>

🤔 Why do I see this error ?

This is a simple check (by Git) comparing current user ID and the ID of the owner of the current folder. If they do not match (in case of rootless Termux, root owns them all.), Git will not permit any action (even git status).

@simonv3
simonv3 / podsync.md
Last active February 10, 2025 13:59
Podsync & Pocket Casts

Say you want to listen to youtube videos as a podcast but you're too stubborn to use the AWS instant install thing on the podsync home page.

Before you start: if you're using Pocket Casts you'll want to make sure this all works before adding the podcast. Pocket Casts will cache your podcasts and then if you goofed it will always be referencing the non-working podcast. You can fix that by changing the subdomain you use. But it's just easier if you get it right from the start. You can test that it works by using something like Apple Podcasts, which will not cache and will just work if it works.

I'm kind of expecting that you're comfortable (though not necessarily experienced in) logging into your router, accessing the terminal and doing git commands, managing domain names, and that docker works on your system.

  1. Use a Dynamic DNS service to set up
@raveenb
raveenb / ssh_into_android.md
Last active May 5, 2025 11:07
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@robin-a-meade
robin-a-meade / unofficial-bash-strict-mode.md
Last active June 6, 2025 20:24
Unofficial bash strict mode

Unofficial Bash Strict Mode

Sometimes a programming language has a "strict mode" to restrict unsafe constructs. E.g., Perl has use strict, Javascript has "use strict", and Visual Basic has Option Strict. But what about bash? Well, bash doesn't have a strict mode as such, but it does have an unofficial strict mode:

set -euo pipefail

set -e