Patrick Truchon's Web Portal

Archive for March, 2010

Dropbox Webfolder

Posted by Patrick on March 25, 2010

Public Web Folder

A few years ago, I started working at a one-to-one laptop school where every student has their own MacBook and classrooms are equipped with iMacs, projectors, sound systems, etc.  Our server also hosts our Moodle [1] site,  and provides us all with some server space to set up individual websites.

One of the tasks I wanted to accomplish (often, quickly, and easily) was to share files with my students.  The obvious (and most annoying) method of delivery was to email everyone.  Another possibility was to upload the files on Moodle and use my course pages to organize these resources.  I found both these methods, however, too time consuming.  Finally, I decided to use my little corner of the school server to set up a Web Folder [2] where I only had to drag and drop files.  To allow the public to browse these files, I wrote a Bash script that creates index.html files to list content.  I’ve been finding this method very convenient, but always kept wondering how it could be adapted for people without access to a server.  Then, came Dropbox. [3]

File synchronization

Dropbox is an online tool that allows users to sync a folder online and across multiple computers automatically.  If you are regularly using different computers, this can be an excellent productivity tool.  I keep all my work files in the Dropbox folder on my three computers.  That way, it doesn’t matter if I’m at school or home, my work is always there and up-to-date.  This also provides me with the added safety of backing up my work: it’s on three computers + the Dropbox server.

The Public Folder

Dropbox also provide a few extra goodies, one of which is a public folder.  To share big files with others:

  • simply put them in your Dropbox/Public folder
  • right click on the file and select “Dropbox” -> “Copy Public Link”
  • email this to a friend.

Exploiting this feature, I adapted my Bash script (for GNU/Linux and OS X) so that others can easily use it.

First Time Setup:

  • Create a Dropbox account here [3], and set it up on at least one computer.
  • Create a folder named WebFolder in your Dropbox/Public folder
  • Create a folder named webpix in your WebFolder
  • Download the icons from here [4] and put them in your webpix folder
  • Download index_redirect_javascript.html from here [5],
    • rename it index.html
    • edit it with your own website address (if you have one)
    • place it in your Dropbox/Public folder (just outside your WebFolder)

    This index.html file is used to send people back to your main website when they reach the root of your Dropbox/Public folder.  It is not necessary.

  • Copy your Dropbox Internet address by right clicking on the index.html file in your Dropbox/Public folder by selecting “Dropbox” -> “Copy Public Link” (you’ll need this for the next step)
  • Download dropbox_webfolder.sh from here [5] onto your Desktop and edit the first few lines.  In particular, paste your Public Link into the $ADDRESS section, making sure to replace the “index.html” part by “WebFolder”.  You’ll see my information as an example.
  • Make the dropbox_webfolder.sh file executable: Open a terminal and type:
    sudo chmod 755 ~/Desktop/dropbox_webfolder.sh
  • Ready!

To use it:

  • Simply put files and folders you want to share in your WebFolder
  • Open dropbox_webfolder.sh with a Terminal (it should ask you for your password)
  • Wait a moment for Dropbox to synchronize the files with its server.
  • Done!

The Result:

  • The public at large will be able to browse your WebFolder
  • But it won’t be able to browse files in your Public folder that are outside your WebFolder (unless they know the name of the files)

Links

  1. Moodle, <http://moodle.org>
  2. Patrick Truchon’s HIS WebFolder, <http://secondary.hisdomain.hdis.hc.edu.tw/users/truchonp/classes/index.html>
  3. Dropbox, <https://www.dropbox.com>
  4. Patrick Truchon’s Personal WebFolder icons, <http://dl.dropbox.com/u/3896319/Webfolder/webpix/index.html>
  5. Patrick Truchon’s Personal WebFolder Bash Scripts, <http://dl.dropbox.com/u/3896319/Webfolder/Bash_Scripts/index.html>
Advertisements

Posted in Uncategorized | Tagged: , | Leave a Comment »

A Science of Ethics?

Posted by Patrick on March 23, 2010

Sam Harries gives an excellent TED talk [1] about ethics and morality, arguing that values reduce to fact.  He gives great examples of moral questions that clearly (at least to me) have “wrong answers”, but he seems to hastily jump to the conclusion that morality must therefore be objective (like science is).

Reasonably, morality is not completely relative (to individuals, or cultures, or time, or…), but does it automatically mean that it is objective?  After all, arbitrariness is not the only alternative to objectivity, and “moral expertise” could still exist without complete objectivity.  So in that sense, maybe morality should be compared to the arts more than to the sciences (grounded in the subjective, but not arbitrary).

Science deals with what is and morality with how we ought to act.  What kind of a bridge could there be between the two?  Nature is the way it it is regardless of what we believe about it.  Is the same true about morality?  I can conceive of someone breaking moral “laws” because he doesn’t care about them, but can I conceive of someone breaking the laws of physics because he doesn’t care about them?

From a different angle, does reducing values to facts reduces morality to a mere game of finding the best means of acheiving various ends.  There seems to be something off with the idea that I should be nice to others because they’ll be nice to me, instead of because being nice to others is a good end in itself.

If morality is not grounded in facts (the way science is), what is it grounded in?

Links:

  1. TED: Same Harries, <http://www.ted.com/talks/view/id/801>

Posted in Uncategorized | Tagged: | Leave a Comment »