- Quit Papers 2.0. Make a backup of your Papers library.
- Go to the "Library.papers2" folder inside your Papers library.
- Copy the folders "Thumbnails" and "Spotlight" somewhere (e.g. your Desktop). The other folders don't need much space in my case.
- Click the Dropbox icon in the menu bar, navigate to Preferences, Advanced, Selective Sync and de-select the "Thumbnails" and "Spotlight" folders. (Dropbox will now delete the folders.)
- Move the folders you copied before back into the "Library.papers2" folder.
- Via Dropbox's web interface, delete the online version of the two folders.
- Voila: more space (200 MB, in my case).
Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts
Tuesday, June 21, 2011
Mekentosj Papers and Dropbox: get a bit more space
I use Dropbox to keep an automatic backup of my Papers library. However, I was scraping close to my space allowance, and discovered that Papers adds some temporary files to the "Library.papers2" folder that eat up precious cloud space. Here is how to remove them from Dropbox:
Saturday, December 6, 2008
Want: Auto-adjust laptop fan speed with motion sensor
Someone should really integrate Fan Control with the MacBook's motion sensor. If the computer didn't move for a long time: It's sitting on a desk, so it can run hotter, but be silent. If the computer is being moved around: I have it on my lap, so turn the fan up and keep the case cool.
Wednesday, May 21, 2008
Invoking TextMate from a remote machine
I edit all my script files via TextMate, but they live on remote drives (mounted via sshfs). I'm always logged in to the remote machines to run scripts etc. Usually I'll open remote files via Quicksilver, but when I create a new file this isn't an option yet and so it's tedious. Anyway, I've cooked up a quick script (with some help) to open TextMate from a remote machine.
Try it, YMMV:
/Volumes/emil = sshfs mount point
Update: I removed the "-w" option (I didn't want TextMate to wait for the file to be closed) and redirected all the garbage to /dev/null.
Update 2: Support arbitrary (i.e. also absolute) paths.
Update 3: this is broken on Snow Leopard :(
Update 4: Here's a workaround, although it's a bit ugly as you need to invoke sudo.
Try it, YMMV:
#!/bin/bashpasadena = name of my Mac OS X machine
cd $(dirname $1)
PWD=`/bin/pwd`
BASENAME=$(basename $1)
ssh pasadena "osascript -e \
'tell app \"Terminal\" to do \
shell script \"/usr/local/bin/mate /Volumes/emil$PWD/$BASENAME\"'" >& /dev/null &
/Volumes/emil = sshfs mount point
Update: I removed the "-w" option (I didn't want TextMate to wait for the file to be closed) and redirected all the garbage to /dev/null.
Update 2: Support arbitrary (i.e. also absolute) paths.
Update 3: this is broken on Snow Leopard :(
Update 4: Here's a workaround, although it's a bit ugly as you need to invoke sudo.
Thursday, April 24, 2008
Unison is great for syncing files
I've already tagged Unison, but I find it so very useful that I just have to write this short blog post to praise it. If you work on two computers and want to keep a set of files in sync, you should try Unison. It's open-source, cross-platform, and the newest version works great on Mac OS X (fink's version was broken when I tried it).
In contrast to other syncing or backup programs, Unison is bidirectional. For example, I just edited some slides for a talk I'm giving tomorrow on my laptop, while I made some changes in the report on my main computer. Then I ran Unison, and it sent the files in the appropriate direction.
Minor gripe: I've tried to sync a huge folder with it and it failed (20 GB / 8600 files+folders), but it works fine and is fast for my normal syncing (350 MB / 1200 files+folders). However, in the first case I really wanted to make a backup, so I just used SuperDuper for this one folder.
In contrast to other syncing or backup programs, Unison is bidirectional. For example, I just edited some slides for a talk I'm giving tomorrow on my laptop, while I made some changes in the report on my main computer. Then I ran Unison, and it sent the files in the appropriate direction.
Minor gripe: I've tried to sync a huge folder with it and it failed (20 GB / 8600 files+folders), but it works fine and is fast for my normal syncing (350 MB / 1200 files+folders). However, in the first case I really wanted to make a backup, so I just used SuperDuper for this one folder.
Thursday, October 11, 2007
Sending Growl notifications from Python scripts
Working in bioinformatics can be seen as an infinite loop of: think, write a script, run script, analyze data. While I work on a Mac, most of the scripts run on a Linux server, and it would be nice to know when a script is done so that I can look at the data. In order to be notified when a script finishes, I now use Growl (see picture).
#!/usr/bin/env python
from netgrowl import *
import sys
def growlNotify(title = "Script Finished", message = ""):
addr = ("10.1.104.26", GROWL_UDP_PORT)
s = socket(AF_INET,SOCK_DGRAM)
#
# p = GrowlRegistrationPacket(application="Network Demo", password="?")
# p.addNotification("Script Finished", enabled=True)
#
# s.sendto(p.payload(), addr)
if not message:
message = sys.argv[0]
p = GrowlNotificationPacket(application="Network Demo",
notification="Script Finished", title=title,
description=message, priority=1,
sticky=True, password="?")
s.sendto(p.payload(),addr)
s.close()
if __name__ == '__main__':
growlNotify()
The registration is hidden in a comment, you only need to do that the very first time. So, in my scripts, I just insert the following right before the end of the script (using a Textmate snippet to save typing).
import growlnotify
growlnotify.growlNotify()
Subscribe to:
Posts (Atom)