Skip to content

Instantly share code, notes, and snippets.

@Timothee
Timothee / Send Clippings to Readwise.scpt
Created March 26, 2023 15:07
AppleScript to send Kindle clippings file to Readwise
on adding folder items to this_folder after receiving added_items
-- Because we run from `/Volumes` we need to check if it was the Kindle
-- that was just added
set kindle to false
repeat with added_item in added_items
tell application "Finder"
set item_name to name of added_item
if item_name is "Kindle" then
set kindle to true
end if
@Timothee
Timothee / README.md
Created May 6, 2020 23:01
CoffeeScript to JavaScript conversion stats

I wrote this to get some stats on the conversion from CoffeeScript to JavaScript. It's not interesting enough to frame on the wall, but I want to clean up my local git repo but want to have a tiny chance of finding it again if I ever need to. :) This runs through a bunch of commits and puts some stats about it in a couple of files.

I used these files with an online tool to display the evolution over time

@Timothee
Timothee / _command_runner.sh
Last active September 29, 2022 00:50
This function lets you easily create series of commands into a single call # It will print each successive command, run it and, as long as it returned # with code 0, continue to the next step. # If any step fails, it will stop and let you pick it back up after you fix the # issues.
#!/usr/bin/env bash
# This function lets you easily create series of commands into a single call
# It will print each successive command, run it and, as long as it returned
# with code 0, continue to the next step.
# If any step fails, it will stop and let you pick it back up after you fix the
# issues.
#
# Example of script using this function:
# !/usr/bin/env bash