Skip to content

Instantly share code, notes, and snippets.

View cazepeda's full-sized avatar
:octocat:
Practicing.

Carlos Alberto Zepeda cazepeda

:octocat:
Practicing.
View GitHub Profile
@cazepeda
cazepeda / description.txt
Last active July 3, 2022 08:00
Overcast Web UI Sort Episodes Bookmarklet
For some reason Marco doesn't have any settings to sort the Overcast web interface episodes. I got help
from the beautiful and incredibly helpful folks at stackoverflow.com: https://stackoverflow.com/a/72844538/1449531 .
The assembly of the bookmarklet created via: https://mrcoles.com/bookmarklet/ .
The web is beautiful!
Oh yea, this bookmarklet will sort the Overcast web interface episodes from oldest to latest. Unless you wanted vice versa,
change a,b to b,a in the .sort().
Instructions to add the bookmarklet onto your browser is:
1. CTRL/CMD + D and name it.
2. Afterwards once its on your booksmarks bar, Edit it and add the JavaScript bookmarklet script.
@cazepeda
cazepeda / applescript-capitalize-first-letter-of-selected-text.txt
Created May 7, 2022 05:26
Applescript Capitalize First Letter of Selected Text
on run {input, parameters}
set capitalize to ¬
(do shell script "/bin/echo " & input & " | /usr/bin/awk '{for(i=1;i<=NF;i++)sub(/./,toupper(substr($i,1,1)),$i)}1'")
end run
@cazepeda
cazepeda / space2hyphens.scpt
Last active January 9, 2024 05:46
Applescript to convert spaces, @, ?, ', to hyphens and uppercase to lowercase.
on run {input}
set input to replaceText(" ", "-", input as string)
set input to replaceText(".", "", input as string)
set input to replaceText(":", "", input as string)
set input to replaceText(",", "", input as string)
set input to replaceText("@", "at", input as string)
set input to replaceText("'", "", input as string)
set input to replaceText("&", "and", input as string)
set input to replaceText("?", "", input as string)
set input to do shell script "echo " & quoted form of input & " | tr '[:upper:]' '[:lower:]'"