Skip to content

Instantly share code, notes, and snippets.

@cmod
cmod / hugofastsearch.md
Last active March 22, 2024 07:02 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

Super fast, keyboard-optimized, client side Hugo search

This is a fork of and builds upon the work of Eddie Webb's search and Matthew Daly's search explorations.

It's built for the Hugo static site generator, but could be adopted to function with any json index compatible with Fuse fuzzy search library.

To see it in action, go to craigmod.com and press CMD-/ and start typing.

Fast Search

@cmod
cmod / process_names.txt
Created February 25, 2020 06:21 — forked from miguelmota/process_names.txt
macOS process whitelist
# not an exhaustive list
nsurlsessiond "icloud sync"
fseventsd "macos file system events"
WindowServer "macos windows"
DisplayLinkManager "macos driver"
configd "macos dynamic configuration"
displaypolicyd "macos process"
CommCenter "macos keychain"
kernel_task "macos kernel"
@cmod
cmod / maillink.alfredworkflow
Last active March 4, 2024 22:20
Alfred workflow — type '!ml' to produce unique link to current message in Mail.app
{
"BTTWidgetName" : "Airpods",
"BTTTriggerType" : 639,
"BTTTriggerTypeDescription" : "Apple Script Widget",
"BTTTriggerClass" : "BTTTriggerTypeTouchBar",
"BTTPredefinedActionType" : -1,
"BTTPredefinedActionName" : "No Action",
"BTTEnabled2" : 1,
"BTTUUID" : "9E161F92-3C7B-44CA-B18A-0DB292717A51",
"BTTEnabled" : 1,
@cmod
cmod / langoliers.rb
Created August 5, 2018 17:18 — forked from robinsloan/langoliers.rb
Tweet delete script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"
@cmod
cmod / things-top-todo.json
Created July 25, 2018 08:23
Touch Bar addition: Latest todo in Things
This file has been truncated, but you can view the full file.
{
"BTTWidgetName" : "Things To Do Today",
"BTTTriggerType" : 639,
"BTTTriggerTypeDescription" : "Apple Script Widget",
"BTTTriggerClass" : "BTTTriggerTypeTouchBar",
"BTTPredefinedActionType" : 195,
"BTTPredefinedActionName" : "Run Apple Script (async in background)",
"BTTInlineAppleScript" : "tell application \"Things3\"\r\tset firstItem to item 1 of every to do of list \"Today\"\r\tset firstName to name of firstItem\r\tdisplay notification \"COMPLETED: \" & firstName\r\tset status of firstItem to completed\rend tell",
"BTTScriptType" : "AppleScript",
"BTTEnabled2" : 1,
/*
Minimal Twitter List
==========================
1. Make a Fluid (http://fluidapp.com/) instance of https://twitter.com/{username}/lists/{listname}
1. a. (You need to buy the paid version of Fluid to modify UserStyles)
2. Apply the below CSS as a Userstyles stylesheet
3. Like magic, you can enjoy just the list, in a nice minimal interface
# =======================================
# OS X — ONE CLICK — EJECT ALL DISKS
# =======================================
# Open Script Editor on OS X
# Copy and paste this file in
# Pre-High Sierra: Save As > Application
# High Sierra: Export > File Format > Application
# Name it "Eject All Disks"
# Drag created application to Dock
# Now you can eject all external disks with one click from Dock
@cmod
cmod / twitter_notifications_only.css
Created September 16, 2014 14:38
Twitter Notifications
/*
Just the Notifications, please
==============================
1. Make a Fluid (http://fluidapp.com/) instance of https://twitter.com/i/notifications
2. Apply the below CSS as a Userstyles stylesheet
3. Enjoy just the conversation, not the timeline
Why?
@cmod
cmod / minimal_fb_messenger.css
Last active February 15, 2022 19:11
Minimal Facebook Messenger for Fluid
/*
Minimal Facebook Messenger
==========================
1. Make a Fluid (http://fluidapp.com/) instance of https://facebook.com/messages/
1. a. (You need to buy the paid version of Fluid to modify UserStyles)
2. Apply the below CSS as a Userstyles stylesheet
3. Like magic, you can now message without all the cruft of Full Facebook