Archive for the ‘code’ Category

Afrigator.com down?


2010
03.27

No access to afrigator.com, afrigator.biz and blog.afrigator.com – whole system, it seems… and no news on their twitter feed…

Just early for Earth Hour at 20.30pm today?

It’s resolving, but not responding…

PING afrigator.com (69.162.110.42) from coolserver : 56(84) bytes of data.
64 bytes from 42-110-162-69.static.reverse.lstn.net (69.162.110.42): icmp_seq=1 ttl=48 time=276 ms
64 bytes from 42-110-162-69.static.reverse.lstn.net (69.162.110.42): icmp_seq=2 ttl=47 time=264 ms

On a different note, amazing images of Cape Town and surrounds by Andre van Rooyen at The Fairest Cape

KnowledgeTree 3.7.0.2 Document Indexing and Indexer issues (SOLVED)


2010
03.22

Argh. Well, it’s really not quite out of the box, at least on Ubutu Server 9.10 (after reinstallations required after initial failures…), so this is just a selection of the fixes that made the import and indexing of the 160 000 files at 102GB possible. So for KnowledgeTree 3.7.0.2 Commercial Edition (the same holds true for the Community Edition), the following should help:

  1. Use the best-practice advice when doing the local file system import – rather do 10 000 files at a time rather than 100 000 at once. Really. Trust me. It defeats the whole idea of just running a batch job. Completely. As you’d expect the option of saying – just transfer all data in directory X. But alas, that doesn’t work. So do it in batches. Manually.
  2. Tika Apache Indexer for Lucene – not so much on PDFs, Docs, XLS or PPT files. Install catdoc (which includes catppt and xls2csv) and pdftotext (which you’ll find in xpdf-utils).
    1. apt-get install catdoc pdftotext
    2. modify knowledgetree/search2/indexing/extractors/TikaApacheExtractor.inc.php and comment out the mime types that are affected above from the returned array in getSupportedMimeTypes() – PDF, XLS, DOC and PPT: (more…)

KnowledgeTree 3.7.0.2 reinstallation site startup failure (SOLVED)


2010
03.21

OpenOffice.org startup failures, indexing issues and other niggles forced me to re-install KnowledgeTree 3.7.0.2 Commercial Edition (the same holds true for the Community Edition) more than once during setup. I was met with this delicious error notification which killed all further activity on the site (and prevented the startup of /setup/wizard/, control.php, browse.php, login.php — well, everything, really):

Warning: include_once(DB/.php) [function.include-once]: failed to open stream: No such file or directory in /usr/share/knowledgetree/thirdparty/pear/DB.php on line 371

Warning: include_once() [function.include]: Failed opening ‘DB/.php’ for inclusion (include_path=’/usr/share/knowledgetree/search2:/usr/share/knowledgetree/ktapi:/usr/share/knowledgetree/thirdparty/xmlrpc-2.2/lib:/usr/share/knowledgetree/thirdparty/simpletest:/usr/share/knowledgetree/thirdparty/Smarty:/usr/share/knowledgetree/thirdparty/pear:/usr/share/knowledgetree/thirdparty/ZendFramework/library:.:/usr/local/zend/share/ZendFramework/library:/usr/local/zend/share/pear:/usr/share/knowledgetree/thirdparty/pear’) in /usr/share/knowledgetree/thirdparty/pear/DB.php on line 371

Warning: Cannot modify header information – headers already sent by (output started at /usr/share/knowledgetree/thirdparty/pear/DB.php:371) in /usr/share/knowledgetree/config/dmsDefaults.php on line 299 (more…)

KnowledgeTree 3.7.0.2 – OpenOffice startup script (SOLVED)


2010
03.21

Having repeatedly received the error that OpenOffice.org is not running on the standard installation of KnowledgeTree 3.7.0.2 Commercial Edition (the same holds true for the Community Edition), further investigation was necessary. The key area of investigation must focus on the dmsctl.sh file, particularly from line 47 onwards, but more of that further down below. This is on Ubuntu (9.10 Server).

First, do a few quick checks:

  1. Is the process running? Anywhere?
    Check whether OpenOffice.org is actually running, using a simple netstat -pant| grep 8100 — as the default installation is running with a headless OpenOffice.org on port 8100. You should see something like:

    tcp  0 0 127.0.0.1:8100 0.0.0.0:*  LISTEN  9655/soffice.bin

    For the fix in question, it wasn’t giving any results on this check (sudo the commands where required, but you knew that already), which means that it’s not running properly. Also,

    ps -aux | grep soffice

    gave no results, indicating non-functioning backend software.
    (more…)

Cracking passwords fast with rainbow tables on SSD


2010
03.15

A Swiss firm, Objectif Sécurité, makers of Ophcrack_Office (for Word and Excel files) and Ophcrack Open Source (over at sourceforge.net), has tweaked their application to crack XP passwords with up to 14 characters on a Steady State Drive interface (think of large, light, laptop drive using Flashdrive technology) through rainbow tables (pre-calculated hashes) in an average of 5.3s.

Seek times on the SSD seem to be the big tweak here:

Oechslin has fitted an elderly Athlon 64 X2 4400+ with an SSD and the optimised tables. This system can, with only a 75% CPU utilisation, crack a 14 digit password with special characters, in an average of 5.3 seconds. Oechslin says that, worst case, it should be able to search arithmetically through 300 billion passwords per second, a speed that is a factor of 500 faster than an Elcomsoft cracker supported by a modern Tesla GPU from NVIDIA.

(more…)

jQuery UI new 1.8 FINAL release imminent


2010
03.13

So twelve days after jQuery UI 1.8RC3 was released, which followed the release of the previous release candidate – 1.8RC2 after less than 2 weeks, the release of the final jQuery UI 1.8 is only a few days (moments?) away – seeing that 1.8RC3 is the final version before final release. In itself, the UI RC3 release has a huge set of fixes built into it already (listed below, as presented on the release notes) so the rest from here on in will be final testing and tweaking. It’s over at http://jqueryui.com/ (more…)

Excel 2007 password, cell and sheet protection removal – unprotect/remove password easily


2010
03.01

Elmcomsoft has a variety of really good brute-force and dictionary-based password attacks on the full Office suite, including a distributed version to run in the cloud (which I wrote about some time ago). As cool as the software is, it doesn’t allow the removal of cell-based or sheet-based passwords (which kinda sucks), and the password.xla file which seems to be the big thing from staxx.com requires a whole whack of goodies to run on Office 2007 natively.

Enter the same macro that McGimpsey & Associates published in 2004 (reproduced here as per their GPL licence) that removes all internal Excel Passwords: (more…)

jQuery UI 1.8RC2 is out


2010
02.20

As you may know already, RC2 for version 1.8 of jQuery UI for jQuery 1.4 is out, heralding the final release of jQuery UI 1.8 “in the next few days” based on the What’s New post. You can link through directly from http://jquery.com/ or http://jqueryui.com/ — or get the deep-link download here.

But you knew that already! :)

Afrigator internal recent items broken?


2010
02.20

Afrigator.com (Blogs, Videos, Social Media etc) seems to have issues on the cross-linking of author to posting – cross-linking internally and referencing incorrectly.

Internal linking and cross-linking

I'm sure they're working on the references, working to correct.

I’m sure they’re on it.

In this example, Gaming SA hasn’t posted since Dec 2008, but is being referenced for a post from Feb 2010. THe top link goes to the site directly, and a framed Afrigator in the first and second title, respectively…

Oh well, it’s weekend :)

HTML5 takes over from Google Gears


2010
02.20

Google Gears is reportedly being relegated to the bench by the Campus (Google, that is, as mentioned in a range of comments before) in order to allow the fun-filled featues of HTML5 to replace the functionality required. Makes sense – why have a fully fledged custom system when a specification exists that covers most of the features that Google Gears encompasses. Also, this makes sense with the editors for the HTML5 spec (of at least the API vocabulary for HTML5) being Ian Hickson from Google, Inc. and David Hyatt of Apple, Inc. fame. (BTW – there’s a good presentation on the features from GoogleIO: GoogleIO presentation on Gears vs HTML5) (more…)

Google’s Do No evil mantra


2010
01.22

When last did you access google.com/ig/oscheck? It returns a serialized array — with a weird space-holder — instead of “Do no evil” (which implies that you can be evil, think evil, plan evil, but not execute it), they’ve upped it a notch — all the way to “don’t be evil’” (note the trailing apostrophe).

This of course changes the mantra — you can do evil, think evil, plan evil and execute it, but just hug a bunny and buy milk on the way home in your green car (so don’t be evil). Strange deviation. Also, the apostrophe implies omission (or ownership, with bad grammar). So did they mean don’t be evilk (whatever that may mean) — you go through the alphabet and figure that one out.

Happy thoughts! :)

throw 1; < don't be evil' >{m:[{i:1,st:"c=ig&e=APu7icpPle4eIsUPx/8S%2BVe24JQkS/cBvDBsJhSnfdcogQ1nIoym4glNnR1WvsfaswewrREVMvHzqhekfe75PLUAm7A4%2BOlsToBUzAVE4axMYP2Q%2BGGHAMUnq61oFTnlsEU%2BiqWrfH8"}]}

No more silly Google.com fade-in effect


2010
01.21

You’ve seen it, you hate it, you threaten to switch to wolfram or Bing… Or you can just make it go away.

Stylish allows you to apply custom stylesheets to sites by wildcard prefix, so that it works and look the way you want it to. For Firefox. For IE, IE8Pro does something similar (YMMV — I haven’t tried it…)

All you need to apply is a simple CSS script:


@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document url-prefix('http://google.'), url-prefix('http://www.google.') {

#ghead, #sbl, .fade, #fctr{ opacity: 1 !important; }

}

Lots of customisations available at userstyles.org!

Dump MS Access data from Ubuntu


2010
01.20

The mdbtools package for Ubuntu Jaunty includes a command called mdb-export.  This allows you to dump the contents of tblName from database.mdb to STDOUT in CSV format like this:

mdb-export database.mdb tblName

Output redirection to capture the output in a file is also supported (not that that’s a feature of the app, as you know):

mdb-export sample.mdb tblFoo > capture.txt

jQuery 1.4 improvements


2010
01.20

Over at jQuery14 the full list of progress, changes and improvements, notably (amongst other things) in the .css and .attr methods, as well as new AJAXian improvements. Also, event multi-binding is now (finally) available! (more…)

Knowledge Tree 3.7 Community Edition released


2009
11.25

PBGVVH25US66 They released the Knowledge Tree 3.7 RC Community Edition some time ago, which now runs on the full Zend-Server stack! Infrastructurally, this is the biggest changed; PHP-based setup wizards also feature, and sure – you can now run it on IIS6/IIS7, but that switch to the Zend stack with use of Optimiser features most highly for me on this development. But you knew that already! :)

Curious to see the feedback from Steve Briggs from iBurst about their KnowledgeTree (not necessarily their whole CRM solution) usage and implementation experience at iBurst, after the chat I had with him yesterday…

Drupal 7 – Impressions


2009
11.15

So I’ve installed the current beta (for non-production environments) of Drupal 7 on an nginx/php/mysql setup to test speed, interface and ease of use. It was a double-whammy operation, on the one hand testing the server environment, and on the other, the new software. It’s not production-ready, so I don’t expect it to be ready by any stretch of the imagination. So these are just impressions. (more…)

SCRUM – Project Management by any other name?


2009
09.30

YouTube was jumpy, so I post it here…

This looks very familiar, just terminology at the end of the day…but you knew that already.

Thoughts and comments welcome…

Get the Flash Player to see this content.

Wipe all mp3s and avis from the filesystem


2009
09.08

So you want to run a script that removes all mp3 and avi files off the filesystem. One way (in bash) as below. Comment, suggestions and feedback are welcome :) Using $EUID to check for root user, and $IFS to check for line breaks as the file names has spaces in them. IFS is saved to a temp variable, reset and then re-instated afterwards. C is the counter. Got two litte for loops in bash with backtick execution.

(more...)

New ClamAV / clamscan / freshclam on old Ubuntu (Feisty or the like)


2009
09.07

A typical situation – you get to audit a server setup which hasn’t seen a apt-get update / apt-get upgrade or even apt-get dist-upgrade since Netbooks were a pipedream.

“Please don’t change anything, we only want a virus scanner, but the update cache is busted,” they say. That you see a whole bunch of 404‘s in the apt (or aptitude) feedback is normal — there is no active repo for this flavour anymore! Long-gone!

So – what to do? As you would, you compile from source. Ha — one gotcha — zlib‘s probably not installed (compression library, as you know).

So – quick move to virus scanning happiness (on the latest version):

(more…)

phpDocumentor on Windows — but please, you knew that already


2009
09.02

So the below description will give you a step-by-step to run phpDocumentor (which replaces phpDoc):

Get it at www.phpdoc.org or install it via PEAR (much easier – 2MB download or so).

For Windows machines:

  • go-pear.bat (if you haven’t already — find it if you don’t know where it is) and pear install --alldeps phpdocumentor
  • Do a search for PEAR_ENV.reg on your machine.
  • Execute it.
  • Make sure you’ve got the Environment Variables set to point to include the PHP bin directory (
    set PATH=%PATH%;c:\path\to\php ) OR

    1. From the desktop, right-click My Computer and click properties.
    2. In the System Properties window, click on the Advanced tab.
    3. In the Advanced section, click the Environment Variables button.
    4. Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.
    5. In Vista:
      • Open the the Control Panel, select the System and Maintenance link, and select the System link. Or, press the Windows key and the Pause / Break key at the same time.
      • Select the Advanced System settings link.
  • You can now call php and pear commands from the command line (you many need to restart for the changes to come into effect).
  • Verify by typing phpdoc -h
  • phpdoc -d "c:\projectDir" -o HTML:default:default -t "c:\projectDir\docs"
  • for PDF files, replace the output parameter (-o): -o PDF:default:default
  • Formatting in smarty (like PHP website etc): -o HTML:smarty:default
  • -t = target directory of generated documents
    -d = source directory of files to check
    -o output format as above.
    (more…)