Skip to content

Instantly share code, notes, and snippets.

View pqrth's full-sized avatar

Parth P Panchal pqrth

View GitHub Profile
@pqrth
pqrth / unfollowAllPodcasts.js
Created March 8, 2023 08:35
Scrapy browser console script to unfollow all the podcasts on Overcast website (https://overcast.fm/podcasts)
function getPodcastIds() {
var feeds = document.querySelectorAll(".feedcell .art"),
i, ids = [];
for (i = 0; i < feeds.length; ++i) {
let anchorElement = document.createElement('a');
anchorElement.href = feeds[i].src;
ids.push(anchorElement.pathname.split('/').pop().split('_')[0]);
}
return ids;
}
@pqrth
pqrth / net.activitywatch.aw-qt.plist
Created June 27, 2019 15:13
Launchd Property List File for ActivityWatch
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.activitywatch.aw-qt</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/aw-qt</string>
</array>
@pqrth
pqrth / download-podcast-feed.sh
Created June 27, 2019 10:18
Bash script to download all the episodes in a podcast XML feed
#!/bin/bash
SAVE_DIR=$1
# Check the availiable podcasts and download them to local storage
# TODO: Split up at some point since files could potentially be too big
for url in "${@:2}"
do
str=$(wget -P $SAVE_DIR -q -O- $url | grep -o '<enclosure [^>]*url="[^"]*' | grep -o '[^"]*$' | head -n 1)
@pqrth
pqrth / NotesToMarkdownDirectory.scpt
Created April 15, 2018 00:03
Exports macOS Notes' notes to a Markdown Directory which can be imported by Joplin
tell application "Notes"
set theMessages to every note
repeat with thisMessage in theMessages
# added identification of folder to create notebooks based on existing folder hierarchy
set myFolder to the container of thisMessage
set myFolder to the name of myFolder
set myTitle to the name of thisMessage

Keybase proof

I hereby claim:

  • I am pqrth on github.
  • I am parth (https://keybase.io/parth) on keybase.
  • I have a public key whose fingerprint is 88D7 A746 140F F055 45B2 A8BD 92B1 BE16 54E7 1C30

To claim this, I am signing this object:

@pqrth
pqrth / bleed_heart.bat
Last active August 29, 2015 13:58
Quick and dirty batch script to dump Heartbleed memory leak at regular interval
@echo off
@color 0a
if "%1"=="" (
:help
echo.
echo Usage: bleed_heart target_name [--every time] [--from count]
echo.
echo Options:
echo --every time Delay between consecutive tests in ms