Ramblings of a math and CS teacher

November 26, 2004

Les Richardson on Linux and Open Source

Filed under: Uncategorized — danschellenberg @ 3:00 pm

Les Richardson was presenting at the SACE conference in Saskatoon today. I was pleased to see him using the new S5 presentation solution created by Eric Meyer using XHTML/CSS. Les began the presentation with a history of computers and software, mentioning how software originally was a shared venture due to the hobby-ist nature of the culture. He then went on to describe the transition to commercial software, and the more recent transition towards paying for support instead of the software itself. Les also had a brief overview of a variety of copyrights, highlighting the GPL and BSD style licences.

Moving into the history of Linux, Les gave an overview of some of the key historical figures such as Richard Stallman (devoloper of GNU) and Linus Torvalds (developer of the Linux Kernel), as well as a quick mention of some of the current Linux distros. The next item on the agenda was an overview of the most frequently used applications on a Linux server (Apache, Sendmail, Samba, etc.). As Linux has gained popularity as a desktop OS, new applications such as Open Office, Mozilla, The Gimp, etc.). A couple of really interesting desktop applications that Les mentioned that I had not heard of before (apparently I live under the Mac OS X rock…) were Cenellera (a free video editing application — think iMovie) and Scribus (desktop publishing software).

Some interesting discussion ensued, with my favourite quote being “we don’t want our students to become techo-serfs”. Les was mentioning how we do not want to continue to dumb down software over and over, since our focus in the school setting is to TEACH, not to produce things at breakneck speed. We need to have students understanding what is going on under the hood, not simply pointing and clicking on “automagic wizards”. Definitely thought provoking stuff, and I admired Les’ obvious expertise on the issues at hand.

November 18, 2004

Firefox desktop wallpaper

Filed under: Uncategorized — danschellenberg @ 4:17 pm

For the truly geeky looking for some spiffy desktop wallpaper, go check out these Firefox wallpapers and download to your hearts delight. Very nice images.

November 11, 2004

Gnews2RSS – Get any new Google News search results in your newsreader!

Filed under: Uncategorized — danschellenberg @ 1:09 pm

EDIT — Well, just after posting this, I discovered that this service is apparently strongly frowned upon by Google. I have therefore taken it down to avoid any possible problems. Sorry about that. If you are interested in hosing the service for your own use, you can grab the source code and set it up on your own server (which is incredibly simple, incidentally).

Although I use Google Alert to have a few search results delivered to me via an RSS feed, the restriction of only 3 searches is somewhat annoying (unless you are willing to pay for the service, of course).

In order to get similar functionality for free, I set up an instance of Julian Bond’s great Gnews2rss at http://www.educationaltechnology.ca/dan/gnews2rss.php. This service allows you to specify a particular search term and be notified via an RSS feed whenever a new Google News item is found that relates to the search term.

Feel free to take a look, and use it if you wish. Please be respectful of our bandwidth, though, as I will have to shut this down if it is abused.

November 4, 2004

Using AppleScript to Automate Daily Crossword Download

Filed under: Uncategorized — danschellenberg @ 12:07 am

EDIT: If you are using OS 10.3 or later, you can automatically open the script with Script Editor. Note that you will have to adjust the file paths before the script will operate correctly.

I’ve been using an AppleScript to grab a crossword for me each morning (the LA Times crossword), save it to a puzzles folder, open it up with the free Across Lite crossword puzzle reader, and open up my copy of OmniDictionary (for which I have installed a local dictionary server, to allow for usage without internet access). I used to use PuzzleGetter (shameless plug for myself, there…) but found it was rather inefficient to open up PuzzleGetter daily just to download one crossword. So, I adapted my PuzzleGetter source slightly as seen in the following AppleScript (which you can simply save as an application from the Script Editor application), and used Cronnix to run this AppleScript application each morning.


on run
set today_year to do shell script "date '+%Y'" as string
--> "2004"
set today_month to do shell script "date '+%m'" as string
--> "01"
set today_day to do shell script "date '+%d'" as string
--> "31"

set today_date to today_year & "-" & today_month & "-" & today_day

--Here is a handy list of date command arguments
(*
%a abbreviated weekday name
%A full weekday name
%b abbreviated month name
%B full month name
%c shorthand for %X %x, the locale format for date and time
%d day of the month as a decimal number (01-31)
%e same as %d but does not print the leading 0 for days 1 through 9
%F milliseconds as a decimal number (000-999)
%H hour based on a 24-hour clock as a decimal number (00-23)
%I hour based on a 12-hour clock as a decimal number (01-12)
%j day of the year as a decimal number (001-366)
%m month as a decimal number (01-12)
%M minute as a decimal number (00-59)
%p AM/PM designation for the locale
%S second as a decimal number (00-59)
%w weekday as a decimal number (0-6), where Sunday is 0
%x date using the date representation for the locale
%X time using the time representation for the locale
%y year without century (00-99)
%Y year with century (such as 1990)
%Z time zone name (such as Pacific Daylight Time)
%z time zone offset in hours and minutes from GMT (HHMM)
*)

set the fileName to ("LA_" & (today_date) & ".puz") as string

-- SAMPLE USAGE
set actionURL to "http://www.latimes.com/cgi-bin/litsoft/litsoft.pl/today.puz"
set testFormInfo to ""
set saveFilePath to "Dans HD:Users:dan:Games:acrosslite:puzzles:" & fileName

curlSimpleDownload(actionURL, saveFilePath, testFormInfo)

set openFile to (saveFilePath as alias)

tell application "Finder"
open file saveFilePath
end tell

try
open application "OmniDictionary"
end try
end run

on curlSimpleDownload(downloadURL, destExpected, theFormInfo)
-- version 1.2, Daniel A. Shockley - public domain
-- downloadURL is STRING
-- saves to destExpected (Mac path as STRING, FILE SPEC, or ALIAS), if given
-- if destExpected is "", returns source result directly as string
-- optional form data for POST - use "" for no form data
try
-- basic download to standard output
set curlCode to "curl '" & downloadURL & "'"

if (length of theFormInfo) > 0 then
set curlCode to curlCode & " -d "" & theFormInfo & """
end if

-- now, add on the desired file location, if there is one given
if destExpected is not "" then
set unixDestExpected to quoted form of POSIX path of (destExpected as string)
set curlCode to curlCode & " --output " & unixDestExpected & " --write-out "%{http_code}""
else -- result as string
set curlCode to curlCode & " | vis" -- pipe into vis to strip nonprintable characters
end if

set curlResponse to do shell script curlCode

return curlResponse
(*
curlResponse will be the http success code ("200"), or an error code.
If no destination was given, curlResponse will be the source
returned, and no file will be saved
*)
on error errMsg number errNum
error "curlSimpleDownload FAILED: " & errMsg number errNum
end try
end curlSimpleDownload

I hope somebody finds this useful — it would be really simple to adapt this to do a daily download of whatever sort of frequently updated file you want.

Blog at WordPress.com.