Skip to content

Instantly share code, notes, and snippets.

View danuw's full-sized avatar

Dan Benitah danuw

View GitHub Profile
@danuw
danuw / export-prime-video-history-from-browser.js
Created August 30, 2024 18:36
Export prime video history to CSV (TSV actually) - mostly gpt generated
// Function to extract data from the list of nodes
function extractData() {
// Select all top-level <li> elements containing each date section
const dateNodes = document.querySelectorAll('li > div[data-automation-id^="wh-date-"]');
const data = [];
Array.from(dateNodes).forEach((dateNode) => {
// Extract the date from the 'data-automation-id' attribute and the inner text
const date = dateNode.getAttribute('data-automation-id').replace('wh-date-', '');
@danuw
danuw / partial-clone.md
Created September 8, 2024 18:36
Cloning a subfolder from git to the local machine

Partial cloning of a repository with Git

To efficiently clone only a specific subset of a large Git repository, you can use sparse checkout. This approach is useful when you don't need the entire repository content, saving both time and storage. Below is a step-by-step guide to achieving this.

I have been trying to make sparse checkout work for a while and the following solution has finally worked. https://askubuntu.com/a/1464994/1928663

@danuw
danuw / gitclonesinglebranch.txt
Created January 14, 2025 16:08
clone single branch from remote url
git clone --single-branch --branch feature/update-for-v1 https://github.com/danuw/aio-quickstart-bash-scripts.git aio