Friday, January 27, 2012

start and stop crashplan on a schedule

I love crashplan, but lately my computer is seeming really slow and maybe it's just me, but crashplan seems to be using more memory than I remember. I tried changing the settings to have it only backup at night, but that didn't lower the memory usage. So, instead, I decided to turn it off most of the time, and only turn on when I want it to backup a few nights a week.

It turned out to be fairly easy since the crashplan website has instructions on how to start and stop the service from the command line.

The start batch file is:
net start CrashPlanService
start "" "C:\Program Files\CrashPlan\CrashPlanTray.exe"
The stop batch file is:
net stop CrashPlanService
I already followed the instructions here to automatically mount network drives, so I put the batch files in the same folder. Then I made two tasks in task scheduler, one to start at night and one to stop in the morning. I saw some people online had problems getting task scheduler to work with batch files, so I made sure the folder and batch files had administrators and system set to full control. I tested it and it seems to work great!

Oh, and to save energy, I'm using the software smartpower to automatically hibernate and wake up my computer. I set it to wake up 2 nights a week for the crashplan backup.

Saturday, January 21, 2012

checking latex related settings with IEEE testflow

I'm trying to submit an abstract to an IEEE joural and I just learned about testflow. It's a pretty sweet idea, use a standard .tex file to generate a .pdf file on your machine, then compare the generated pdf to a standard pdf. On my machine, Win7 64bit, I found the files here:

  • standard pdf and instructions: C:\Program Files\MiKTeX 2.9\doc\latex\testflow
  • test .tex file: C:\Program Files\MiKTeX 2.9\tex\latex\testflow
The instructions are really good. My generated pdf looked great, except that the margins on the right and bottom were weird. The  testflow_doc.txt instructions said the problem was most likely that some program (pdftex, DVIPS, or ghostscript) was set to default A4 instead of letter paper. In the end, I couldn't figure out why the margins are off, but below are all the steps I followed, even though it didn't seem to change anything.

I followed the changes for the dvips config file, which I found here:

  • C:\Program Files\MiKTeX 2.9\dvips\config\
I found the files here:

  • C:\Program Files (x86)\gs\gs9.02\lib\
    • ps2pdf.bat
      • my compatibility level was 1.4, so I didn't change it
    • ps2pdfxx.bat
      • I replaced the 2nd line with:
      • echo -q -dSAFER -dNOPAUSE -dBATCH -sPAPERSIZE=letter -dPDFSETTINGS=/printer -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sDEVICE#pdfwrite >"%TEMP%\"2
I found the file here
  • C:\Program Files\MiKTeX 2.9\pdftex\config\pdftex.cfg
  • the file says to run initexmf --edit-config-file pdftex, so I made the suggested changes to both files.
I couldn't find the config file.