Skip to content

Instantly share code, notes, and snippets.

yig / latexmk-ding
Created Jan 15, 2016
Runs latexmk in continuous mode. Runs quickly (draft mode followed by batch mode). Plays a ding sound when finished. Also copies the PDF aside, so that PDF viewers don't get confused by the partially-written PDF files.
View latexmk-ding
## I used cfxr to create a coin sound. afplay is an OS X command line sound playback tool.
DING='afplay -v .01 /mixed\ media/music/cfxr\ coin.wav'
## Silence the ding.
# DING=''
## Simple continuous ding with draft mode followed by a batch mode run which actually generates the PDF.
## Copies the PDF with the suffix -copy.pdf, so that live-updating PDF viewers don't choke trying to load the PDF while it is still being written.
### We can't distinguish between the first time latexmk launches the viewer regardless of changes and later launches of the viewer with changes.
View git-new-workdir.ps1
param (
[string]$NewWorkDir = $( Read-Host 'New work dir' ),
[string]$Branch = $( Read-Host 'Branch' )
$gitDir = git rev-parse --git-dir
if (!$gitDir) {
exit 128
douglas /
Created Oct 14, 2011
Update all git repositories under a base directory
# store the current dir
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
You can’t perform that action at this time.