Monday, November 23, 2009

Using rsync (ssh) on a nonstandard port

Use the --rsh option


$ rsync <options> --rsh='ssh -p<port>' "joe@coolhost:/Users/joe/foo\ bar/..." "/local/path/..."

Sunday, November 22, 2009

Using Pacifist to uninstall a program (MacOS/Tiger)

New versions of Safari crash immediately for me, so I stick with 3.2.1 (Tiger). I can't update iTunes, either, because newer versions of iTunes require a newer version of Safari (for the iTunes store).

If I want to install an old version of Safari, Mac won't let me because there's already a newer version, but how to get rid of that?

Solution: Remove with Pacifist (e.g. Pacifist_2.6.dmg)

Directions:
Mount Safari 3.2.1 dmg package,
Run Pacifist.app,
Open Safari 3.2.1 package,
Select the lot,
Click install,
(Choose "Replace" when asked about the other version)

Embedding fonts in a PDF

For papers that require a PDF with all fonts embedded, often the fonts in PDF figures (imported via pdflatex) are not embedded (I have this problem with my figures created from gnuplot that use Helvetica). This trick worked nicely to convert the figure to one with Helvetica embedded (and pdflatex takes care of the rest)

gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=fig/figure1-embeddedfonts.pdf -f fig/figure1.pdf

Source: http://colinm.org/tips/latex

Followers