Archive | LAMP

Linux Apache MySQL Python Perl PostgreSQL

Tool of the day: lynx

lynx is a browser that renders html files as text, optionally using color and bolding. A client needed a word count of a bunch of html files and after installing lynx I used it in batch mode:
lynx *.html --dump --nolist | wc
The –dump option dumps the returned text rather than present it in an interactive fashion; the –nolist option prevents all of the anchor tags from being listed at the end of each document. The pipe character pipes the result of the function to the wc (word count) function that displays the number of lines, words and total characters of what it was fed. Following the UNIX principle of “small tools, loosely joined” this function could easily be included in a larger one, with perhaps sed or cut to isolate and format just the one number of interest, or the –word option added to the wc command to return only the word count. There are many ways to do it, another very Good Thing.

Koolu’s Kool! Great OOBE

Arrived from Canada in January and I’ve been having fun messing with it. The Koolu computer is a low-power computer based on a Geode 500 MHz CPU, up to 1 Gb RAM, an optional internal HDD, an external 12VDC power supply. It sips around 9 watts. Standard ports are AC’97 compatible sound-in, sound-out, line-out, 4 x USB 2.0, VGA, 10/100 ethernet. At under $300, this can be a handy utility computer to:

  • Serve as file and print server for a workgroup
  • Act as the front-end to a MythTV DVR
  • Provide backend services like NTP, DNS, etc.
  • An internal web server, source code control repository for a group of developers
  • Kiosk computer (an optional VESA mount will allow it to be mounted to the back of an LCD panel.

And unlike the cheap $299 computers you can buy at big box stores, this one isn’t make of flimsy parts, nor will it make up for its cheap price in electricity payments. (I’m figuring less than $1 USD a month vs. $20 for a 200w big-box.) The base unit (no hdd, $199) is network bootable, the 80 Gb hdd version ($299) comes with Ubuntu preinstalled. Enjoying running it through its paces!

(Unless otherwise noted, all $ prices in CAD)

MerriLUG Notes, 20-March-2008

Nine people make it to Thursday’s MerriLUG meeting, held on the very last night of astronomical winter, in this case the third Thursday of March, at Martha’s Exchange in Nashua. As was announced, the meeting was unstructured, informal, social and general conversations. A good time was had by all.

Matt mentioned that he’d recently received the designation of Red Hat Certified Architect, currently the top-tier of RH certification, requiring quite a bit of studying and passing some difficult exams. Congratulations, Matt!

Heather talked about some of the issues with calendaring using Evolution and Mozilla Thunderbird/Lightning, and that lead to a general conversation on the disaster that mankind has made of time zones, daylight savings time, expensive telephone systems that can’t cope, countries that change their minds, and so forth.

Ben was heckled in person, as he showed up. He brought a recent Dell lightweight laptop which he obligingly took apart for us to examine the various peripherals. An attempt at installing 2 Gb of Live Ubuntu onto a 1 Gb memory stick was unsurprisingly unsuccessful. He’s also been trying to get a USB wireless widget to work with Ubuntu. Matt plugged it in and showed it would work with Fedora 8, but then Matt’s an RHCA :).

This lead to a discussion of Network Manager, its strengths and
weaknesses, new features coming soon.

Conversation roamed all over the placing, including:

  • Proper grounding of data center racks.
  • Sprinkler systems.
  • EPO (Emergency Power Off) switches.
  • 50 Hz equipment is not a bargain in 60 Hz countries.
  • Proper lacing of cables.
  • MythTV, HDHomeRuns, TiV0, podcasts
  • the upcoming spam conference at MIT

One fellow, whose name I did not catch (he mentioned he was not good with names; me, neither!) brought along an OLPC and we talked about its engineering genius quite a bit. We didn’t talk much about its retail disaster, thankfully. Beautiful machines!

Kenta and Kevin and Mike also attended and contributed and participated.

Thanks to all for coming and participating, to Jim for arranging and announcing the meeting, to Heather for running the group and to Martha’s for providing the food and beer and facilities. Next month, we hope to have a very exciting meeting, but it’s not yet ready for announcement. Stay tuned, as Heather gave us some hints last night and it sounds very worthwhile!

Shutdown & Restart Shortcuts

A handy utility for an oddball situation: Shutdown & Restart Shortcuts for Windows XP. I have a WinXP Pro machine I’m running remotely via rdesktop/tsclient from my Linux laptop, but I run it as a user with reduced rights, not having administrator rights, as a wise security measure. However, once in a blue moon I need to reboot the machine. The trick: using the “RootShell” link I created a few months ago, making a shell with the Administrator’s context and then execute ‘shutdown’ from there. Shutdown’s syntax should be familiar to any UNIX user, other than the shouted CAPS:

SHUTDOWN -R -T 5

will reboot the machine.

Tim Bray’s keynote at O’Reilly RailsConf, via IT Conversations

What I’m listening to this week: IT Conversations | O’Reilly RailsConf | Tim Bray. From the It Conversations website:

In this keynote presentation, Tim Bray, the Director of Web Technologies at Sun Microsystems, covers a broad range of topics such as Sun’s interest in promoting Ruby, the case for JRuby in the enterprise, the areas Ruby needs to improve on, features that may be good extensions to the Rails framework, REST, HTTP Etags, caching in Rails, the Atom publishing feed, Microsoft’s WCF and Sun’s business model of making all its products open source.

Tim’s a great speaker, and has a lot of interesting insight into Ruby and Java and Sun. He makes no bones about the fact that he’s a paid-for speaker, since Sun was a sponsor of RailsConf, gets in his obligatory plug for Sun, but also talks insightfully about the ways that Ruby can scale better on top of Java, and that Sun’s looking forward to selling lots of boxes when it does.

MonadLUG notes, 13-March-2008, Philip Sbrogna on WINE

Twelve people attended the March meeting of the Monadnock Region Linux User Group, MonadLUG, held as usual on the second Thursday of the month at the SAU 1 offices on Hancock Road in Peterborough.

Charlie called the meeting to order at 7 PM and we had the usual round of announcements. One member offered an HP LaserJet 4L and a new cartridge to anyone interested. There’s problems with the paper feeding, likely the rollers, and he didn’t have the inclination to fix it himself and went out and bought a new duplexing laser. If anyone’s interested, we can try to get you in touch with him.

Philip Sbrogna was the main presenter, speaking on Wine. Philip works as sysadmin for a local company, and has past experience as a game software developer (as well as a nuclear power
operator, a past profession we share) and is very interested in getting games working well under Linux. Wine Is Not an Emulator, but a API layer that provides the resources Windows executables need to run under Linux. The main page is at http://www.winehq.org and there’s a lot of information available there. Philip was running OpenSuse 10.x and demonstrated how easy it was to use the built-in YAST tool to locate, download and install a current and stable Wine release, version 0.9.42. Despite having practiced it several times, things don’t work the same during a presentation, and Philip was great about rolling with the punches and showing us how to configure, troubleshoot and tweak on Wine. We talked about the commercial alternatives, CrossOver Office from CodeWeavers and Cedega’s work with getting high-end games working, the Application Database at WineHQ where you can examine the list of programs known to work or known to have limitations and pick up suggestions on how to tune the application to your needs.

Ken got a chance to show off the new facilities of the meeting room. A new hi-tech podium’s in place that supports two projector screens, one of which is a touch-screen, dry-erase screen. The project supports computer video, TV tuner, DVD, videotape and a color video camera that can scan and preserve on memory cards,a 21st century opaque projector. Beautiful equipment! It may take us a while to learn the magic X configuration to get it working, so be prepared for a little struggling at the beginning of the meetings.

Next month, Guy Pardoe will demonstrate Joomla 1.5, the newly-released (and significantly re-engineered) content management system written in PHP. There’s a book on Joomla 1.5, written by Barrie North, who’s spoken at the Dartmouth – Lake Sunapee Linux User Group. It’s published by Prentice Hall PTR, an imprint of Pearson Education. Attendees to the recent CentraLUG meeting may recall we had a copy raffled away.

Thanks to Philip for a great presentation, to Ken for providing the space and facilities, to Charlie Farinella for organizing, promoting and moderating the evening, and to all for attending and participating!

State of the Computer Book Market, Part 4 – The Languages – OReilly Radar

Over at O’Reilly, Mike Hendrickson posts State of the Computer Book Market, Part 4 – The Languages – OReilly Radar. Bear in mind in the world of lies, damned lies and statistics, these are statistics. Like measurements of job posting vs. languages, or web pages vs. languages, these aren’t an indication of what languages are in use out there, or what languages are suitable for use. This is just a measurement of what book titles sold the most, grouped roughly by language. If the best book on your favorite language is years old, it’s probably shown as small here. If a bunch of crappy books got published on the language-of-the-week, and the authors and publishers did a good job of getting a buzz going, it’s probably scoring high. Don’t use this to decide whether to use vi or emacs, tabs or spaces.

But it’s interesting data.

Notes from DLSLUG, 6-Dec-2007

Fourteen people made it to the December meeting of the Dartmouth – Lake Sunapee Linux User Group, held as usual on the first Thursday of the month and in what appears to be our new place, Haldeman 041, in the lower level of the building next to our previous meeting place.

“Nifties” was the theme, for any presentation that might elicit the reaction “Nifty!” from the audience, and they all did.

Roger Trussell presented a firefox extension using Javascript, XML (“XUL”) and SVG (Structured Vector Graphics, yet again more XML, but rendered by Mozilla as graphics) to create graphically complex interactive structures in Mozilla browser. Nifty!

Glen Page, newly appointed leader of the New Hampshire Society for Technology in Education talked about the happenings at the Christa McAuliffe Technology Conference (which also included presentations by well-known GNHLUG activists Ed Lawson, Bill Sconce and Matt Oquist)

Doug McIlroy showed us some tricks with qsort: qsort is an interface under which each developer could implement their own sorting algorithm, a common homework assignment. Doug argued that a properly designed data set could disappoint anyone who thought they’d created the cleverest quicksort EVER by always returned quadratic (slow) results. You can read the code here. Nifty!

Nick Sinnot-Armstrong: One Laptop Per Child XO-1 laptop: show and tell. A local developer experimenting on a pre-production model of the OLPC with the very capable microphone input (accepts both analog and digital for standard audio as well as measurement data). Nick gave us a tour of the laptop, passed it around for people to get a sense of the size and capabilities. Note that the OLPC charitable project “Get One, Give One” is going on through December 31st. Nifty!

Mike Diehn showed off some very powerful tips and tricks in bash and vi, and pointed to some handy resources at http://pixelbeat.org/ – Nifty!

Bill McGonigle demonstrated Munin, a monitoring and recording tool that’s a great add-on for a facility that’s trying to pick up on problems occuring over time, Built on top of RRDTool, it can record and remember a set of measurements over time. Bill showed how one of his web sites was experiencing a surge that was hurting performance and setting off alarms. By picking a set of parameters to monitor, Bill was able to work out that… well, you should have been there. Nifty stuff!

Bill has an interesting pointer to a project called FON. I’ve been reading through the web site on the FON system. Here’s how I read it: Home/businesses with the proper rights granted by their upstream suppliers can post this access point on their network. Internally, the host can use a private wireless access, encrypted with WPA2 or less. Externally, the WAP advertises itself as FON_AP, an open (no key) wireless access point. Other ‘Fonistas’ – registered members who are actively operating their own FON WAPS – can access the wireless for free. But the great unwashed masses do not get to access it for free. They get to pay for access. A FON pass will apparently let them use any FON WAP for a day. They can purchase it on the spot, or buy a bunch of passes and use them as needed. Not sure of rates or the fine print. The host seems to be able to set it up as a “Linus” and collect no fees themselves or as a “Bill” and share in the dividends that FON makes from paying access. It’s an intriguing business model.

Apparently, on Thanksgiving FON offered their WAP for free for a limited time, and Bill was able to get one, which he raffled off at the meeting.

And last, but certainly not least, Bill McGonigle demonstrated a pair of carol-playing, wireless, dueling-banjo penguins. Nifty!

Thanks to Bill McGonigle for organizing the meeting, to Dartmouth College for generously donating the use of the facilities, and to all who attended and demonstrated Nifties!

OLPC: How do we gauge success?

Larry Dignan asks, “OLPC: How do we gauge success? Will 490,000 units do?… So what’s success here? My take is Negroponte’s project is a success simply because it brought an issue to the forefront and got tech giants on board.”

I believe Negroponte’s goal was to put tools in the hands of children eager to learn to use them. Let’s hope that success continues; there’s a lot more need than the initial half-million OLPCs.

Notes from PySIG, 29-Nov-2007: Django in the real world

Fourteen people managed to find their way to the Amoskeag Business Incubator (it’s on SOUTH Commercial Street, contrary to the directions on the ABI site) for the November meeting, one week later than the usual fourth Thursday of the month, of the Python Special Interest Group.

A number of new attendees arrived this month. We pointed out that the mailing list for the group can be found on the DLSLUG and GNHLUG sites, look for “mailing list” and that there was an announcement as well as a discuss list for the group. We pointed out the main calendar at GNHLUG.org as well and talked about other resources.

Several members were new to the area or had come up from Cambridge, MA (our fair city) for the SIG meeting. They pointed out the Cambridge Python Group, who usually posts meeting announcements on Meetup.com, which boasts 103 members on their list! We discussed the ideas for mutual cooperation, and will be glad to cross-post their announcements to the PySIG -announce list.

Kent S. Johnson was the main presenter, and showed us how Django is used to host the http://www.blogcosm.com site. Without going into details on the business aspects of the site, Kent was able to give us a tour of several of the pages, talk about the RESTful URL formats, the model-view-controller model that’s used, demonstrate some of the code used to describe a model and the actions that can be taken on it, and show us some of the templating language that generates the HTML. The built-in administrative functionality, creating simple CRUD pages based on the model descriptions, was an impressive Django feature.

An excellent meeting, with lots of code and lots of ideas. Thanks to Kent for the main presentation, to our Cambridge brethren for making the long trip, to Bill Sconce for arranging, announcing and MC’ing the meeting, and to the Amoskeag Business Incubator for providing the great venue. Hope to see you all again at next month’s meeting, held on the 27th of December, likely just an informal chat due to the proximity with the holiday.

Powered by WordPress. Designed by Woo Themes

This work by Ted Roche is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States.