Archive for the 'Howto' Category

Quick File Sharing for Linux and Mac OS X

Monday, March 1st, 2010

This is a great little trick to quickly make a directory of files accessible to anyone. You can do it in any OS that has Python installed, which most Linux distros and Mac OS X do. Windows does not have python installed by default, but the same thing should work from there if python is installed.

First, open the terminal and navigate to the directory you want to share. While in that directory type the following command:

CODE:
  1. python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

This will start a web server on port 8000. This is a very simple and quick way to share a file over the network. Just send a link to the IP address of the machine.

If you are behind a NAT router or firewall, port 8000 needs to be forwarded or opened, but if you are on the same network all you need to do is send them a link to http://<your_ip_address>:8000 and they can easily browse the directory you ran the command from and download any file there. When you're finished, go back to the terminal and use Ctrl+C to end the process.

Accessing Mac OS X Leopard Grayed-out Preference Panes

Thursday, February 25th, 2010

UPDATE: This also works on Snow Leopard if you are having the same problem accsessing any preference panes.

I have a work-issued MacBook Pro with Leopard, specifically Mac OS X 10.5.8, installed. It is a test image that was installed to test ideas about ways to administer systems for users without Administrative rights. At the end of the test, my access was changed to grant my user administrative rights on the laptop, but it still has many problems. I am waiting for the new Snow Leopard image to be completed to have my laptop reimaged. In the mean time, I have been struggling with a few issues.

The system blocks access to certain preference panes in System Preferences. This was probably an oversight or the leftovers of some experiment, because it does not block access to some of the more sensitive preferences. I can add new users to the laptop and do all sorts of things that I should probably not do on the network. The preferences I could not access were not too important for me to change, like Growl, for instance. Then I tried to use Apple's Magic Mouse. When I installed the system update that enables its advanced features, I could not access the new Mouse preference pane. When I hover over it, the tooltip says "Your access to this preference has been restricted." If you try to open the pane directly the error says "You cannot open "[name of preference pane]" preferences pane because it is not available to you at this time. You might need to connect a device to your computer to see this preferences pane." It looks like this:

Here's how you do it:

  1. Open the Applications folder and find the System Preferences.app file.
  2. Right click or ^-click System Preferences.app and choose Create Duplicate.
  3. Right click or ^-click the new System Preferences copy.app and choose Show Package Contents.
  4. Navigate to Contents > Resources and find the NSPrefPaneGroups.xml file.
  5. Move NSPrefPaneGroups.xml to the Trash.
  6. Make sure System Preferences is not running and double click System Preferences copy.app to run it. All the preference panes appear to be gone!

  7. In the System Preferences application click the View menu at the top of the screen. All the preference panes are now accessible from the View menu.

  8. When you have changed the preferences you need to change, close System Preferences.

Any time you need to access the disabled system preferences, just use System Preferences copy.app, otherwise you can still use the original System Preferences.app for changing system preferences normally.

So, You Want to Learn a Language?

Thursday, November 8th, 2007

You can learn (but not master) any language in one hour or less. Don't believe me? Well, that's what Tim Ferriss says. He says most language learners neglect the most critical first step in learning a new language: deconstruction. He claims that the fastest language learners deconstruct the language they want to learn before they start memorizing lists of vocab words. His reasoning is that for native speakers of a particular language to learn some languages might be very easy, while others might be nearly impossible.

I took an intro to Linguistics course in Southern California and the instructor also happened to teach English as a Second Language (ESL) classes. Most of his students were Japanese students who wanted to learn English, so they enrolled in student exchange programs. My Linguistics instructor and Ferriss both point out that Japanese and Mexican Spanish have very similar sets of sounds (phonemes) in their languages. Many students would become frustrated learning English and wound up learning Spanish from other students at the college.

Treat Language like a sport. If you are very short, you might have more work to do to be a successful basketball player. The same holds for languages that are very different from those you already speak. Learn how to deconstruct a language first so you know what you're getting yourself into.

Searching a Freecycle Mailing List with Gmail

Thursday, October 18th, 2007

I subscribe to the local freecycle mailing list and have filters set up in Gmail to label all freecycle mail and have it get archived automatically so it doesn't clutter up my inbox. I don't check it every day, so I just want to see what's available right now. Sometimes I also have a specific thing I'm looking for. To help look for these things, I use the following search string in Gmail.

label:freecycle subject:offer subject:-wanted subject:-want subject:-needed subject:-need subject:-taken

You can also add subject:bike and it will only return results that have the word bike in the subject line. This assumes that the label you are using for all of the freecycle messages is freecycle.