Skip to content

Instantly share code, notes, and snippets.

@johnybradshaw
johnybradshaw / delete_all_object_versions.sh
Last active March 4, 2022 09:23 — forked from weavenet/delete_all_object_versions.sh
Delete all versions of all files in s3 versioned bucket using AWS CLI and jq.
#!/bin/bash
#delete versions from a bucket, this will work with Scaleway
bucket=$1
location=$2
endpoint=".scw.cloud"
set -e
set -x
@johnybradshaw
johnybradshaw / exportsafarireadinglist.sh
Last active December 15, 2015 10:03 — forked from erineland/exportsafarireadinglist.sh
Export Safari's Reading List to Pocket/Evernote (or any service with an "email content in" feature)
#!/bin/bash
# Script to export Safari's reading list into a text file and email the individual links
# First take all of Safari's Reading List items and place them in a text file.
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' > readinglistlinksfromsafari.txt
# Now loop over each of those URls within that text file and add them to pocket.
while IFS= read -r line
do
/usr/sbin/sendmail -i -f myaddress@link.com add@getpocket.com <<END