Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Fooling around in elixir…

Evan Travers evantravers

💭
Fooling around in elixir…
View GitHub Profile
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 magic.js
// Safe defaults
var path_fragment = "";
var filename = draft.processTemplate("[[safe_title]]");
var content = draft.content;
var diaryFormat = {};
if (/dbox:(.+)$/m.test(draft.content))
{
app.queueAction(Action.find("Save to Dropbox Path"), draft);
View init.vim
" #############################################################################
" Here is my vim configuration with lots of comments to try and explain
" everything that I have done.
" #############################################################################
" Load plug.vim, put all plugins in the right folder
call plug#begin('~/.config/nvim/bundle')
" Language file for elm
Plug 'ElmCast/elm-vim', { 'for': 'elm' }
View drafts_zettelkasten.js
var zk_get_metadata = function(d, pattern) {
let match = zk_metadata(d)
.match(RegExp("^" + pattern + ": (.*)", 'm'));
if (match !== null) {
return match[1];
} else {
return null;
}
};
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"