Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Fooling around in elixir…

Evan Travers evantravers

💭
Fooling around in elixir…
View GitHub Profile
@evantravers
evantravers / things-to-org.md
Last active Apr 7, 2021
Playing around with exporting Things 3 data -> emacs orgmode.
@evantravers
evantravers / weekly_reviews.js
Last active Mar 21, 2021
Pulling my weekly reviews out of completed Projects in Things.app for use in Obisidian notes
View weekly_reviews.js
(function() {
let Things = Application("Things");
app = Application.currentApplication()
app.includeStandardAdditions = true
Things.launch();
for (proj of Things.projects().filter(p => p.tagNames().match(/Rituals/) && p.name().match(/Weekly/) && p.status() == 'completed')) {
let d = proj.completionDate()
let formatted_date = `${d.getFullYear()}-${((d.getMonth()+1).toString()).padStart(2, '0')}-${d.getDate().toString().padStart(2, '0')}`;
let content = `## ${proj.name()}\n\n${proj.notes()}`
View test.txt
things:///json?data=%5B%7B%22type%22%3A%22project%22%2C%22operation%22%3A%22create%22%2C%22attributes%22%3A%7B%22title%22%3A%22Weekly%20Review%3A%202%2F16%2F2021%22%2C%22notes%22%3A%22%22%2C%22tags%22%3A%5B%22Rituals%22%5D%2C%22when%22%3A%22today%22%2C%22items%22%3A%5B%7B%22type%22%3A%22heading%22%2C%22attributes%22%3A%7B%22title%22%3A%22Prep%22%7D%7D%2C%7B%22type%22%3A%22to-do%22%2C%22attributes%22%3A%7B%22title%22%3A%22%F0%9F%93%93%3A%20Review%20journal.%22%7D%7D%2C%7B%22type%22%3A%22to-do%22%2C%22attributes%22%3A%7B%22title%22%3A%22%E2%9C%85%3A%20What%20did%20you%20accomplish%3F%22%2C%22notes%22%3A%22things%3A%2F%2F%2Fshow%3Fid%3Dlogbook%22%7D%7D%2C%7B%22type%22%3A%22to-do%22%2C%22attributes%22%3A%7B%22title%22%3A%22%F0%9F%92%AD%3A%20What%20can%20you%20learn%20from%20last%20week%3F%22%7D%7D%2C%7B%22type%22%3A%22to-do%22%2C%22attributes%22%3A%7B%22title%22%3A%22Do%20a%20brain%20dump.%20Add%20any%20tasks%20or%20projects%20you%20come%20up%20with%20to%20the%20Things%20inbox.%22%7D%7D%2C%7B%22type%22%3A%22to-do
View things_tag_shortcuts.md

Things Quick Tip: Keyboard Shortcuts for Tags

Things allows you to assign keyboard shortcuts to Tags.

  1. Bring up the tag manager with ⌘⌃T
  2. Notice the little boxes to the right? Click in one and press a key. Tada!

This adds two bindings: if you have a task highlighted and press ⌃+<key>, it'll toggle that tag on and off.

If you are looking at any view, you can press ⌃⌥+<key> and it'll filter that view to that tag.

View instapaper
#!/bin/bash
#basic newsboat bookmark plugin for instapaper
username=$(op get item "instapaper" | jq '.details.fields[] | select(.designation=="username").value' | tr -d '"')
password=$(op get item "instapaper" | jq '.details.fields[] | select(.designation=="password").value' | tr -d '"')
url="$1"
title="$2"
curl --data-urlencode "title=$title" \
View snip.applescript
-- stolen from: https://gist.github.com/gabeanzelini/1931128eb233b0da8f51a8d165b418fa
if (count of theSelectionFromBrave()) is greater than 0 then
set str to "tags: #link
" & theTitleFromBrave() & "
> " & theSelectionFromBrave() & "
[" & theTitleFromBrave() & "](" & theCurrentUrlInBrave() & ")"
View config
# general settings
auto-reload yes
max-items 500
show-read-feeds no
text-width 50
reload-threads 11
# set browser for osx
browser /usr/bin/open -a "/Applications/Brave Browser.app" '%u'
View config
# general settings
auto-reload yes
max-items 500
show-read-feeds no
text-width 50
reload-threads 11
# set browser for osx
browser /usr/bin/open -a "/Applications/Brave Browser.app" '%u'
View migrate_booknotes.rb
require 'date'
require 'uri'
require 'net/http'
require 'json'
require 'rubygems/text'
include Gem::Text
SRC = "./"
DST = "./migrated"
View migrate_links.rb