I recently discovered that OpenSSH has a built in SOCKS proxy. This is really handy for browsing the net from another computer. In my situation I need access to sites like MathSciNet and JSTOR. My university has a subscription so I need to appear to be browsing the net from a certain IP address.
From my home computer I can do:
$ ssh -ND 9999 carlo@my-uni-computer
(after logging in no shell is given due to the -N option)
Then in Firefox I set the proxy to use SOCKS host localhost at port 9999. That’s it. Firefox plugins like FoxyProxy or SwitchProxy make switching the proxy setting quick and easy.
You can also use this to browse securely from a public wifi access point, avoid stupid web proxies, etc.
PyX is a Python package for the creation of PostScript and PDF files. It seems like a more modern alternative to MetaPost so I was keen to try it out. I found that the experimental pyx-0.8.1 package in Sage 2.10 did not work (errors about a DVI file not finishing) so I created a Sage source package of the latest version: pyx-0.10.spkg.
Download that package and then do sage -i pyx-0.10.skpg to install it.
Here is the standard Hello World example (look for hello.pdf in your working directory):
x = y = int(0)
c = pyx.canvas.canvas()
c.text(x, y, “Hello, world!”)
c.stroke(pyx.path.line(x, y, x+5, y+0))
The previous pyx spkg tried to put the pyxrc file into /etc but I prefer to run Sage as a normal user, and sudo-ing to install a package isn’t completely straightforward (you have to set some environment variables, so it’s not newbie-friendly). I made my spkg-install file put pyxrc into $SAGE_LOCAL/etc but I’m not sure if this is a suitable location. Any suggestions?
edit: On the sage-devel mailing list I was told to use ~/.sage so I have ammended the pyx-0.10 package to do this.