Skip to content

Instantly share code, notes, and snippets.

@drewkerr
drewkerr / get-focus-mode.js
Last active May 29, 2024 16:16
Read the current Focus mode on macOS Monterey (12.0+) using JavaScript for Automation (JXA)
const app = Application.currentApplication()
app.includeStandardAdditions = true
function getJSON(path) {
const fullPath = path.replace(/^~/, app.pathTo('home folder'))
const contents = app.read(fullPath)
return JSON.parse(contents)
}
function run() {
@neilio
neilio / switch-apps.applescript
Created May 4, 2022 13:30
Set up laptop for work
#!/usr/bin/osascript
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Switch to FreshBooks
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🤖
@SgtBatten
SgtBatten / frigate_0.11_notification.yaml
Last active December 7, 2023 20:09 — forked from hunterjm/frigate_0.10_notification.yaml
Frigate Notifications have moved
blueprint:
name: Frigate Notifications by SgtB have moved
description: |
## ANNOUNCEMENT
I have moved from this gist to a github repositry.
Please checkout https://github.com/SgtBatten/HA_blueprints for the latest versions
domain: automation
@dannberg
dannberg / obsidian-meeting-moc.txt
Last active May 18, 2024 17:03
Dann Berg's Meeting MOC document for Obsidian. Full instructions for implementation here: https://dannb.org/blog/2023/obsidian-meeting-note-template/. See the YouTube tutorial here: https://youtu.be/Ud16HOQoS5Q
[[+Home]] %% tags:: #MOC %%
# Meetings MOC
Meetings are timestamped events with other people, where information is exchanged and collected. Meeting notes are intrinsically ephemeral. They're stored in a separate Space than other Umami notes (`Timestamps/Meetings`) and rarely reviewed. If there's information in a meeting that needs to be accessed later, it should be moved into a more evergreen note in the Umami folder.
**Template:** [[Template, Meeting]]
```meta-bind-button
label: New Meeting
hidden: false
Support Codes
import {
FaCamera,
FaFire,
FaHome,
FaPaintBrush,
FaVideo,
} from "react-icons/fa";
import { v4 as uuidv4 } from "uuid";
@dhh
dhh / linux-setup.sh
Last active June 5, 2024 20:22
linux-setup.sh
# Libraries and infrastructure
sudo apt update -y
sudo apt install -y \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils