Skip to content

Instantly share code, notes, and snippets.

@mchogan
mchogan / Manual PDF heading breaks in PrinceXML
Created July 2, 2013 12:36
Manually control line breaks inside of PressBooks headings when exporting to PDF.
/*
The following CSS works with PressBooks
PDF Export
http://www.pressbooks.com
Let's say that the Chapter 1 heading is
"The Need for Creative Solutions That Work"
By default, PressBooks outputs this to PDF as...
@mchogan
mchogan / Toggle Hidden File Visibility
Last active December 13, 2015 22:18
Toggle visibility of hidden files and folders in Mac OS X
# Toggle Hidden File Visibility Automator Service
# 1. Create a new Automator service
# 2. Service receives no input in Finder
# 3. Add an Automator Ask For Confirmation action
# 4. Automator Run Shell Script action with below shell script
# Set the Shell to bin/sh/
is_shown=$(defaults read com.apple.finder AppleShowAllFiles)
if [ $is_shown = "FALSE" ]
then