Skip to content

Instantly share code, notes, and snippets.

@nathancrank
nathancrank / gist:efb761fae3062a0bb3058ec287a1490c
Created September 4, 2020 18:45
On a Mac, use qlmanage, the tool that creates quicklook previews, to convert all .svg files in the current folder to .png files.
find . | xargs qlmanage -t -s 1024 -o . $1
@nathancrank
nathancrank / purge.txt
Created December 1, 2018 17:09
Purge Time Machine Snapshots
tmutil listlocalsnapshotdates / |grep 20|while read f; do tmutil deletelocalsnapshots $f; done
@nathancrank
nathancrank / crashreporter.txt
Created December 1, 2018 17:08
Disable/Enable Crash Reporter
// Disable
launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist
// Enable
launchctl load -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.ReportCrash.Root.plist
@nathancrank
nathancrank / cleariconcache.sh
Last active January 10, 2025 23:20
Clear macOS icon cache
sudo find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \;
sudo rm -rf /Library/Caches/com.apple.iconservices.store
killall Dock
killall Finder
@nathancrank
nathancrank / install.md
Last active January 10, 2025 23:20
New Mac
@nathancrank
nathancrank / .zshrc
Last active January 10, 2025 23:21
.zshrc
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/opt/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/nathan/.oh-my-zsh
# Set default editor
export EDITOR="/Applications/TextEdit.app/Contents/MacOS/TextEdit"
# Set name of the theme to load. Optionally, if you set this to "random"
@nathancrank
nathancrank / .muttrrc
Last active January 10, 2025 23:21
.muttrc
set [email protected]
set imap_pass=password
set folder=imap://mail.server.com
set spoolfile=+INBOX
set imap_check_subscribed
set mail_check=60
set sort=reverse-threads
set sort_aux=date-received
set realname="Name"
set editor=vim
@nathancrank
nathancrank / .zshrc
Last active January 10, 2025 23:22
Sending iMessage via Terminal
function message() {
osascript - "$2" "$1" << EOF
on run {messageText, buddyName}
tell application "Messages" to send messageText to buddy buddyName
end run
EOF
}
alias replyto="message"
@nathancrank
nathancrank / .vimrc
Last active January 10, 2025 23:22
dot files
syntax on
set tabstop=2
set number
set ruler
set ignorecase
set smartcase
set laststatus=2
set autoread
set mouse=a
execute pathogen#infect()
@nathancrank
nathancrank / SassMeister-input.scss
Created November 19, 2013 02:16 — forked from jamiebuilds/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
$E: 2.718281828459045;
$PI: 3.141592653589793;
$LN2: 0.6931471805599453;
$SQRT2: 1.4142135623730951;