Skip to content

Instantly share code, notes, and snippets.

View raritet's full-sized avatar

Andy Oliver raritet

View GitHub Profile
@raritet
raritet / test-octo-note.md
Created March 8, 2021 02:45
Just checking

Let us see how this goes.

@raritet
raritet / batch-convert-pandoc.md
Last active March 31, 2019 03:26
Convert nested folders of files with pandoc

Convert nested folders of files with pandoc

find . -name \*.md -type f -exec pandoc -o {}.txt {} \;

Runs pandoc on all files with a .md suffix, creating a file with a .md.txt suffix. (You will need a wrapper script if you want to get a .txt suffix without the .md, or do ugly things with subshell invocations.) {} in any word from -exec to the terminating ; will be replaced by the filename.

From stackoverflow.

@raritet
raritet / macos-shortcuts.md
Last active May 7, 2020 02:40
Saving macOS keyboard shortcuts as I come across them.

Keyboard Shortcuts for macOS and macOS Software

In addition to helping me remember the shortcuts, this list helps me prevent collisions when I'm trying to think up a new shortcut for a new program. "OS" shortcuts are built-in by Apple. "Standard" shortcuts are typically the default ones by whoever made the software. "Custom" shortcuts are the ones I make for myself, modifying OS or Standard shortcuts.

Software Function Key Combination OS/Standard/Custom
Alfred Search ⌥ ␣ Standard
Chrome Go to next tab ⌃ ⇥ Standard
Chrome Go to previous tab ⇧ ⌃ ⇥ Standard
Chrome Go to tab ⌘ 1, ⌘ 2, ⌘ 3... Standard
@raritet
raritet / add-dock-space.md
Created August 7, 2017 21:56
How to add a space to your Dock to separate your apps

Run this command in a terminal to add spaces to the Dock.

defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}'; killall Dock

One space is created each time it is run. You can move the spaces around and even delete them just like an app; by clicking and draggging.

@raritet
raritet / simple-server.md
Created August 4, 2017 02:42
Quick web server on macOS

You need only one tiny command to start a web server from any directory through OS X's terminal. Just navigate to the directory you want to use and enter the following command:

python -m SimpleHTTPServer 8000

You may want to change the port if you already have something running on 8000.

@raritet
raritet / alpha-launchpad.md
Last active February 17, 2024 00:40
How to Alphabetize the macOS Launchpad

This terminal command will restart the Launchpad and it will reload everything, with the default Apple stuff on the first page and following pages filled alphabetically.

defaults write com.apple.dock ResetLaunchPad -bool true; killall Dock