Skip to content

Instantly share code, notes, and snippets.

View evantravers's full-sized avatar
Fooling around in elixir…

Evan Travers evantravers

Fooling around in elixir…
View GitHub Profile
Dir.glob("./**/*.md").each do |file|
filename = File.basename(file, '.md')
content =
lines = content.lines
matching_title = lines.find_index { |l| l.match /^# #{filename}\s*$/ }
if matching_title then
# find block of empty lines
blank_lines = matching_title + 1
evantravers /
Created September 3, 2023 20:54
Gist from Drafts

Nintendo Switch Party Games

We are optimizing for fun with other people, co-op or competitive. I'm ignoring some incredible games that are purely single player, or have a barrier to fun that requires some skill or experience with a particular game-type. Some of the games are very hard, but are fun to fail together.

Ranked roughly in order of chill experiences to stressful shenanigans…

Stardew Valley

🎮: 1-2, 🤝

The smash hit farming sim plays very well on switch. Lots of things to do and explore, and very little stress unless the fishing mini-game stresses you out.

❯ ping
PING ( 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
Request timeout for icmp_seq 4
Request timeout for icmp_seq 5
Request timeout for icmp_seq 6
Request timeout for icmp_seq 7
hs.hotkey.bind({"cmd", "alt"}, "s", function() spoon.Split.split() end)
var Booknotes = {};
Booknotes.__mlaAuthors = function(authors) {
if (authors) {
switch (authors.length) {
case 1: return authors[0]; break;
case 2: return authors.join(", "); break;
case 3: return authors[0] + " et al."; break;
} else {
evantravers /
Last active April 7, 2021 15:10
Playing around with exporting Things 3 data -> emacs orgmode.
evantravers / weekly_reviews.js
Last active October 13, 2023 12:28
Pulling my weekly reviews out of completed Projects in for use in Obisidian notes
(function() {
let Things = Application("Things");
app = Application.currentApplication()
app.includeStandardAdditions = true
for (proj of Things.projects().filter(p => p.tagNames().match(/Rituals/) && && 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 = `## ${}\n\n${proj.notes()}`

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 ⌃⌥+ and it'll filter that view to that tag.

#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 '"')
curl --data-urlencode "title=$title" \