Archive | How-to RSS for this section

Disappearing Spaces in Lion

I just realized that if you have your Dock on the left edge of the screen you cannot create a Space in Mission Control, the option disappears. Move it to the botton or right and you will be fine.

Weird.

May 2, 2012: update, the Space tab appears on the opposite side from the dock, so don’t go looking for it on the left side if your dock is on the left. :)

Overcoming an IMDbPY installation issue on Ubuntu 11.04

IMDbPY is a Python module to enable backend search and retrieval of information from the IMDB. To install IMDby on Ubuntu you’ll need to download the module here. Then you’ll need to extract the module and run (as root):

$ sudo python setup.py install

You may get an error complaining about a ‘gcc’ compiler, I did, even though a quick:

$ which gcc

returns a live ‘gcc’ compiler on my box. The trick I found here is to install ‘python-dev’ through your Ubuntu package manager.

$ sudo apt-get install python-dev

Then you should be able to run the earlier module installation without errors. Fire up python and check it out to make sure.

$ python
>>> import imdb

Things should be fine!

NLTK on Mac OSX

I’ve found myself being drawn into Python recently. First, with what seems to be an experimental software dream, IBEX (Webspr), and now I’ve returned to take a look at the Natural Language ToolKit (NLTK). Both are Python-based and both underline the wide support that Python is getting in language research.

I’ve just completed the NLTK install, including some of the optional packages. It took a little poking around on the net to find the right process to get things up and running on my system: OSX 10.7.2 MacBook Air.

If you are an academic it’s much easier, here’s what I did:

1. Get a worthy Python instance: download Enthought Python by adding your .edu email address here. Once downloaded follow the installer instructions.

2. Get the latest versions of the following NLTK packages: PyYAML and NLTK (note: pick up the source code, when I downloaded the .dmg package Enthought could not find the NLTK package.)

3. Install PyYAML. Extract the compressed file, start up Terminal and cd into the PyYAML directory. Then run:

sudo python setup.py install

3. Install NLTK. Extract the compressed file, start up Terminal and cd into the NLTK directory. Then run:

sudo python setup.py install

4. Enjoy!

Pianobar on Mac OSX

I stumbled across a great post on how to install pianobar, the command-line interface to Pandora, on OSX. http://happygastropod.com/2011/01/pianobar-on-mac-osx

The basic rundown and few notes:

1. Install Homebrew
2. Install pianobar (Note: I had to use use the –HEAD flag in order to get the dependencies to update)


brew install pianobar --HEAD

If you want to trick-out your installation, you can go on to add automatic login and growl support in a configuration file (that you’ll need to create in ~/.config/pianobar/config). Make sure you are running the latest version of Growl (or the correct version for your OS), if not you will meet a series of errors!

You can even go beyond, and add a custom image to your Growl notification using the growlnotify –image flag. For more on that just run


growlnotify --help

Install graphical interface for TreeTagger on Windows

Here’s a slimmed down step-by-step instruction list on how to install the TreeTagger graphical interface on a Windows machine.

1. Download the Tree-Tagger software for Windows.

2. Unzip this file into your C:\Program files\ directory. Using WinZip, make sure you have the “Use folder names” box ticked and extract all files.

3. Download the parameter file(s) that you need and extract them into the subdirectory C:\Program Files\TreeTagger\lib

4. Download and drop the graphical interface files (tagger and training programs) in the C:\Program Files\TreeTagger\bin subdirectory.

5. Then make a shortcut to the desktop by right-clicking on the tagger and/or training programs and selecting create shortcut. Drag that shortcut to the desktop.

You should now be able to launch TreeTagger from the desktop.

Install vislcg3 tools on Mac OS X

Here are the instructions to install the vislcg3 constraint grammar on a Mac.

1. Install the Xcode developer tools (App Store)

2. Install cmake and boost. I use Homebrew, but I imagine you could use MacPorts or Fink.

3. Install ICU. This takes a few steps:
A. Download the package here: http://download.icu-project.org/files/icu4c/4.8.1/icu4c-4_8_1-src.tgz (or the latest version) and decompress it:

$ gunzip -d < icu4c-4_8_1-src.tgz | tar -xvf -

Then run:

$ cd icu/source/

It's a good idea to make sure the permissions are set so run:

$ chmod +x runConfigureICU configure install-sh

B. Now run the runConfigureICU like so:

$ ./runConfigureICU MacOSX

C. You'll then make and make install, and you should be golden:

$ make
$ sudo make install

4. Now it's time to get to vislcg3.
A. Download the files from the svn repository:

$ svn co http://beta.visl.sdu.dk/svn/visl/tools/vislcg3/trunk vislcg3

Then move into the main directory:

$ cd vislcg3/

B. Do a checkup on the install:

$ ./cmake.sh

C. Run make and make install to finalize this thing.

$ make
$ sudo make install

D. Now check to see that it's in your path:

$ which vislcg3

And if you get a path to the binary, you're ready to go!

Create an SSH tunnel for a remote MySQL database

This isn’t that hard to find out on the Internets, but I want to document a couple tips that I find useful once you create an SSH Tunnel to your remote MySQL database. After you create the tunnel, you will be able to interact with the database as if it were on your local machine, which simplifies running SQL scripts.

1) Create an SSH Tunnel

Firs open a command-line interface and enter:

$ ssh user@host -L 3306:localhost:3306

2) Connect to the remote database with with local(ish) syntax

Then open another command-line window (without closing the other session) and enter:

$ mysql -u db_user -h 127.0.0.1 -p

The explicit 127.0.0.1 for localhost seems to be important (I get a connection error when I just specify ‘localhost’.

And there you go, a local interface to your remote MySQL database. A more complete trick-laden version of this post can be found here.

Setting up RStudio server with Apache2 proxy

I just set up a server instance of RStudio on our Language Lab server (running Ubuntu 11.04). I tried following the instructions here, but I was a bit confused where to add the proxy configuration. It turns out you will need to add it to your /etc/apache2/sites-enabled/000-default file. So you fire up the terminal and type …


$ sudo pico /etc/apache2/sites-enabled/000-default

Once in the file skim down to the bottom, and add …

<Proxy *>
Allow from localhost
</Proxy>

ProxyPass / http://localhost:8787/
ProxyPassReverse / http://localhost:8787/

Before the closing </VirtualHost> tag.

This will allow you to connect to your server at http://yourserver.com:80/

You can get creative and add a custom directory, so you can access the RStudio server at http://yourserver.com/rstudio. Just change the above proxy configuration with:

<Proxy *>
Allow from localhost
</Proxy>

ProxyPass /rstudio/ http://localhost:8787/
ProxyPassReverse /rstudio/ http://localhost:8787/
RedirectMatch permanent ^/rstudio$ /rstudio/

You can replace “rstudio” with whatever name you want.

Another piece of useful information. If you plan on having multiple users have access to the server at the same time, and you want them to be able to have separate sessions you will need to add them as users at the system level. The following documentation give some instructions.

Deploying RStudio Server for Classrooms / FAQ / FAQs – RStudio Support.

Setting up WFU VPN on OS X 10.6 & iOS

Now with Snow Leopard (10.6) you can easily connect to the WFU VPN without having to install the Cisco VPN software. Here are the steps:

1) Download/Open the WFU VPN profile for Mac.

2) Open “System Preferences” from the Apple menue, select “Network” and click the “+” to add a new connection.

3) Select “VPN (Cisco IPSec)

4) Enter the VPN IP: 152.17.244.46 and your WFU username.

5) Then open the “Authentication Settings…” menu. We will now add the “Shared Secret” and “Group Name” from the .pcf file (WFU VPN file from step (1)) to this dialogue box.

6) First, copy and paste the information following “GroupName=” in the “Group Name” field. Second, copy the information (all of it) directly following “enc_GroupPwd=” and paste it in the cisco vpnclient password decoder here. Use the resulting decoded password to paste into the “Shared Password” field back on your “Authentication Settings…” menu.

7) Click OK, and then “Apply” the settings on the “Network” preference pane.

8) To make the VPN easy to get to, check the box “Show VPN status in the menu bar”.

To start up the VPN client select just click on the VPN icon in the menu bar and select the connection you just made –it will ask for your WFU credentials.

That’s it.

For iOS devices

1) On your iOS device download the iOS VPN installer.

2) Follow the instructions.

Set up ROM Canon iR5055/iR5065 printer for Mac

Here are some brief instructions on how to set up the Canon iR5055/iR5065 printer in Greene 516 for a Mac.

1. Download the latest PS driver here: Canon driver list (Europe)

2. Install the drivers using the installer contained in the .zip file.

3. Open “Print & Fax” pane in the System Preferences.

4. Add printer

5. Choose IP > LPD and add IP address:10.113.250.34 and name the printer

7. Select print driver: iR5055/iR5065 PS (UK)

8. Add, select Job Accounting

Now you can print.

A couple more tweaks:

1. Make the ROM printer the default printer on your system.
Go to the Print & Fax preference pane and right click (control+click) on the ROM printer, and select “Set Default Printer”.

2. Avoid having to enter the Department ID for each print job.
Open a text document in TextEdit, type some random text and then start to send it to the printer (command+p). The print dialog box will appear.

Select the ROM printer.

Then select “SpecialFeatures” from the lowest dropdown menu.

Then click on “Job Accounting”, add the ID 505033 and deselect “Confirm ID/Password when Printing” checkbox. (You can verify the ID to make sure the ID is valid)

You can then select “Save as…” under configuration “Presets”.

Give it a name like “No password” or something meaningful. If you ever want to go back to the default configuration you can toggle between the default preset “Standard” and any other presets you set up … like the following …

3. Print double-sided and stapled by default.
Now, go to “Finishing” instead of “SpecialFeatures” in the dropdown menu. Select “Duplex”, “Long Edge (left) and check the “Staple” checkbox. Save this as a preset (or add to the previous preset).

You can create as many presets as you want. I’ve combined these features into one. Note: Presets are associated with specific printers, so you have to set the up for each device you have listed in your “Print & Fax” preference pane.

Good luck!

Follow

Get every new post delivered to your Inbox.

Join 50 other followers