Skip to content

Instantly share code, notes, and snippets.

View merlinmann's full-sized avatar

Merlin Mann merlinmann

View GitHub Profile
#!/usr/bin/env bash
PLIST=~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist
CURRENT_DATE=$(date +%s)
ONE_YEAR_FROM_NOW=$(date -v+1y +%s)
if [ -f "$PLIST" ]; then
# Contents of the plist file look like this:
# Dict { /Applications/1Password.app/Contents/MacOS/1Password = Sat Sep 21 11:59:57 PST 2024 /Applications/Microsoft Teams.app/Contents/MacOS/MSTeams = Tue Sep 21 05:40:36 PST 3024 /Applications/CleanShot X.app/Contents/MacOS/CleanShot X = Tue Sep 21 05:40:36 PST 3024 /Applications/Ice.app/Contents/MacOS/Ice = Sat Sep 21 05:40:36 PST 2024 /Applications/Shottr.app/Contents/MacOS/CleanShot X = Tue Sep 21 05:40:36 PST 3024 }
@jasonsnell
jasonsnell / podcast-noter.scpt
Last active October 27, 2022 15:33
Podcast Noter AppleScript
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
# Sample Keyboard Maestro macros at
# <https://sixcolors.com/wp-content/uploads/2022/01/Podcast-Noter-Macros.kmmacros.zip>
on run argv
try
set theNote to (item 1 of argv)
on error
@kepano
kepano / obsidian-web-clipper.js
Last active December 6, 2024 13:34
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@alexpaul
alexpaul / Bash.md
Last active September 23, 2024 13:29
Creating a Bash Profile

Bash

What is a bash_profile

There is a hidden file in your Mac’s user directory named .bash_profile. This file is loaded before Terminal loads your shell environment and contains all the startup configuration and preferences for your command line interface. Within it you can change your terminal prompt, change the colors of text, add aliases to functions you use all the time, and so much more.

Creating a .bash_profile

If you run the open ~/.bash_profile command and do not have a current .bash_profile, follow these steps to create one:

  1. Open Terminal
@ttscoff
ttscoff / template.html
Created August 25, 2013 17:42
Barebones nvALT template with [[linking]] built-in
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>{%title%}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">