jq is useful to slice, filter, map and transform structured json data.
brew install jq
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{ | |
default: Turndown | |
}, { | |
default: Readability | |
}]) => { | |
/* Optional vault name */ | |
const vault = ""; | |
/* Optional folder name such as "Clippings/" */ |
# -*- coding: utf-8 -*- | |
""" | |
Go to Google Bookmarks: https://www.google.com/bookmarks/ | |
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en | |
After downloading the html file, run this script on it to generate a KML. | |
""" |
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
The patch described below may no longer be necessary. CloudFlare instructions here. Perl module JSON::Any
may still be required, however, see comments.
Dyn's free dynamic DNS service will be ending on Wednesday, May 7th, 2014.
CloudFlare, however, has a little known feature that will allow you to update your DNS records via API or a command line script called ddclient. This will
#!/Users/samuelkordik/.pyenv/shims/python | |
# ReadingListCatcher | |
# - A script for exporting Safari Reading List items to Markdown and Pinboard | |
# Originally by Brett Terpstra 2015, <https://brettterpstra.com/2015/01/06/reading-list-catcher/> | |
# Modifications by Zach Fine made in 2020 to use the original reading list item in the | |
# posts to pinboard. | |
# Updated 2021-06-21 by Samuel Kordik to fix errors due to deprecated API in plistlib, | |
# changes to Pinboard api and Pinboard python lib; added enhanced logging output | |
# and error handling to work as a cron job or shell script. | |
# Uses code from <https://gist.github.com/robmathers/5995026> |
<%* tpOptionsList = await tp.file.include('[[noteYamlOptions]]') || '' tpOptions = tpOptionsList.split('\n') || ''
tpOptionChosen = await tp.system.suggester(tpOptions, tpOptions, false, "Select option") || ''
tpOptionChosenArea = tpOptionChosen.toString().split(',')[0] || '' tpOptionChosenCompany = tpOptionChosen.toString().split(',')[1] || '' tpOptionChosenClient = tpOptionChosen.toString().split(',')[2] || '' tpOptionChosenProject = tpOptionChosen.toString().split(',')[3] || ''
#!/bin/sh | |
# cloudflareddns.sh - dynamic dns updater module for Synology | |
# | |
# Author: | |
# Michael Wildman (http://mwild.me) | |
# | |
# Version: | |
# 0.2 | |
# |
As it turns out, most normal humans are incapable of learning to use Twitter @ replies. And in case you don't follow me on Twitter: yes, my handle (@ryan) gets a lot of erroneous mentions. (The most amusing, random ones I've even taken to retweeting under the #wrongryan hashtag.)
Then Tweetbot -- and its ability to use regex as Twitter filters -- came along. Here's how the Tapbots guys and some regular expressions single-handedly made my Twitter replies usable again.
Notes and caveats
expression{3,}
) are buggy. So everything below should work without crashing Tweetbot for iPhone, iPad, and Mac.# Get the sharing / embed snippets from | |
# the non-mobile flickr page of an image. | |
# (if sharing is not restricted on that image). | |
# | |
# Usage: | |
# 1. Copy the flickr photo mobile url to the clipboard | |
# 2. Run this script | |
# 3. Copy the snippet you want! | |
# | |
# A couple of lines come from get_links.py |