Archive for April, 2006

support
April 28, 2006: 2:34 pmcontact: LokkjuGoogle Maps, Javascript, Projects, Widgets

Just a quick note, I have started back in on the gmaps widget, using the GMap2 structure, and basing it on the API code to prevent future breakage.

Hopefully it should be released in a couple weeks!

feedback
April 27, 2006: 3:30 pmconditions: LokkjuCrazyness

I have a friend, relatively computer literate, but definately not a “geek”, who was taking a low level computer course at a community college recently. After taking his first exam, he came to me, asking about some of the questions.

Well, I thought, ok, I’ll take a look, and explain to him why some of the answers he gave were wrong – until I saw the questions.

after the break are the worst of the questions on the test, and you can get the whole test here. The “correct” answers are designated by an asterisk

For reference, the community college in question is Portland Community College, the course was BA 131, and the instructor’s name was Bill Bruno.

(more…)

podcast
April 13, 2006: 9:28 pm
jobs
: Lokkju
Projects

I needed a lits of all the asterisk functions, in a html list format, so I whipped up this:

CODE:
  1.  
  2. sudo -u www-data asterisk -rx 'show functions'|grep \(|awk '{print $1}'|while read line; do sudo -u www-data asterisk -r -n -q -x 'show function '$line''|perl -0777 -ne "\$f = \$_;\$f = s/\033\[(?:\d+(?:;\d+)*)*m//go;if (/function\s'(.*?)'.*?\[Syntax\]\n(.*?)\n.*?\[Synopsis\]\n(.*?)\n.*?\[Description\]\n(.*?)\n/sg) {print '<li>' . \$1 . '<span class="informal"><span class="syntax">' . \$2 . '</span><span class="synopsis">' . \$3 . '</span><span class="description">' . \$4 . '</span></span></li>' . \"\\n\";}" ; done
  3.  

and for all applications, xml format:

CODE:
  1. sudo -u www-data asterisk -rx 'show applications'|grep :| awk -F : '{gsub( /^ +| +$/, "", $1 ) ; print $1}'|sort|while read line; do sudo -u www-data asterisk -r -n -q -x 'show application '$line''|perl -0777 -ne "\$f = \$_;\$f = s/\033\[(?:\d+(?:;\d+)*)*m//go;\$f = s/\</&lt;/go;\$f = s/\>/&gt;/go;if (/application\s'(.*?)'.*?\[Synopsis\]\n(.*?)\n.*?\[Description\]\n(.*?)\n(.*?)\n\n/sg) {print '<application><name>' . \$1 . '</name><synopsis>' . \$2 . '</synopsis><usage>' . \$3 . '</usage><description>' . \$4 . '</description></application>' . \"\\n\";}"  ; done

Obviously, replace the www-data username with your asterisk username. Also, if you want to change the output details, just change the last bit, where perl outputs the results of the regex.

Have fun.

notice
Make payments with PayPal - it's fast, free and secure!
contact