<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0">
			<channel>
			<title>Learnosity Tech Blog</title>
			<link>http://www.learnosity.com/techblog/index.cfm</link>
			<description>Learnosity Developer blog - A blog about the technology related to Learnosity Voice and OnScreen - focussing on ColdFusion, PHP, Flash, Flex, Asterisk, VOIP, XMPP, Web Standards, Linux and a mish mash of other technologies</description>
			<language>en-us</language>
			<pubDate>Fri, 18 May 2012 01:34:11 -0000</pubDate>
			<lastBuildDate>Tue, 31 Jan 2012 23:40:00 -0000</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>mark@learnosity.com</managingEditor>
			<webMaster>mark@learnosity.com</webMaster>
			
			
			
			
			
			<item>
				<title>Using Mac Homebrew to install ffmpeg</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2012/1/31/Using-Mac-Homebrew-to-install-ffmpeg</link>
				<description>
				
				Super quick one - came across this issue again today and had to search for the solution, so as note to self:

To install ffmpeg via homebrew you need to specify which compiler to use on 10.7 at least:

&lt;code&gt;
brew install ffmpeg --use-clang
&lt;/code&gt;


Cheers,
Mark
				
				</description>
				
				<category>Mac OSX</category>
				
				<category>Open Source</category>
				
				<pubDate>Tue, 31 Jan 2012 23:40:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2012/1/31/Using-Mac-Homebrew-to-install-ffmpeg</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Web Developer/Software Engineers - Sydney</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/12/14/Web-DeveloperSoftware-Engineers--Sydney</link>
				<description>
				
				Learnosity are looking for a Web Developer/Software Engineers to join our growing team.

Learnosity develops cutting edge tools for language learning and is used by the leading educational publishers and assessment companies globally.  We deliver millions of assessments every year, to users on 6 continents.

We are looking for multiple roles from junior to mid level range.
				 [More]
				</description>
				
				<category>Railo</category>
				
				<category>PHP</category>
				
				<category>Open Source</category>
				
				<category>Learnosity</category>
				
				<category>Jobs</category>
				
				<category>Java</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Wed, 14 Dec 2011 04:50:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/12/14/Web-DeveloperSoftware-Engineers--Sydney</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Frontend Web Application Developers - Sydney</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/12/14/Frontend-Web-Application-Developers--Sydney</link>
				<description>
				
				Learnosity are looking for Frontend Web Application Developers

Learnosity develops cutting edge tools for language learning and is used by the leading educational publishers and assessment companies globally.  We deliver millions of assessments every year, to users on 6 continents.

We are looking for multiple roles from junior to mid level range.
				 [More]
				</description>
				
				<category>Open Source</category>
				
				<category>Learnosity</category>
				
				<category>Jobs</category>
				
				<category>Javascript</category>
				
				<category>Flex</category>
				
				<category>AIR</category>
				
				<category>Actionscript</category>
				
				<pubDate>Wed, 14 Dec 2011 04:41:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/12/14/Frontend-Web-Application-Developers--Sydney</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>DevOps/Linux Engineer in Sydney, Australia</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/12/13/DevOpsLinux-Engineer-in-Sydney-Australia</link>
				<description>
				
				&lt;p&gt;Learnosity are looking for a DevOps/Linux Engineer to join our growing team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: this role has now been filled.  Thanks to all who applied.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Learnosity is an award winning company which develops cutting edge tools for language learning and is used by the leading educational publishers and assessment companies globally.  We deliver millions of assessments every year to users on 6 continents. &lt;/p&gt;
				 [More]
				</description>
				
				<category>Ubuntu</category>
				
				<category>Systems admin</category>
				
				<category>Software Architecture</category>
				
				<category>Open Source</category>
				
				<category>Linux</category>
				
				<category>Jobs</category>
				
				<pubDate>Tue, 13 Dec 2011 05:50:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/12/13/DevOpsLinux-Engineer-in-Sydney-Australia</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Generate Railo DSN encrypted passwords</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/9/7/Generate-Railo-DSN-encrypted-passwords</link>
				<description>
				
				When dealing with scripted deployments to production environments it&apos;s often very worthwhile to be able to remove any dependencies on the GUI/Web interface and just edit the config files directly.

For a recent project we wanted to use Railo encrypted DSN&apos;s passwords in the railo-server.xml.

The only issue was that the encryption of the passwords was not documented as to how it works.  A bit of digging around in the source code showed me how it was done and I&apos;ve now made a simple page that will generate these encrypted passwords.

Benefits:
 - Can use encrypted passwords
 - Don&apos;t need to be able to see the production DB when creating the config file


So I can now &lt;a href=&quot;http://www.learnosity.com/techblog/examples/railopwd.cfm&quot;&gt;generate encrypted passwords&lt;/a&gt; for railo without hooking my laptop railo instance up to the production db&apos;s.  Nice.
				
				</description>
				
				<category>Railo</category>
				
				<category>Open Source</category>
				
				<category>Database</category>
				
				<pubDate>Wed, 07 Sep 2011 06:19:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/9/7/Generate-Railo-DSN-encrypted-passwords</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Generating PDFs and ePubs from an AsciiDoc ... on a Mac</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/8/11/Generating-PDFs-and-ePubs-from-an-AsciiDoc--on-a-Mac</link>
				<description>
				
				&lt;br/&gt;

I&apos;ve been updaging our existing documentation which was written in &lt;a href=&quot;http://www.methods.co.nz/asciidoc/&quot;&gt;AsciiDoc&lt;/a&gt; and also creating new documentation recently.

Our normal process is to update the source text file, commit to our SVN and the run the documentation build script from the deployment server to create the HTML and PDF versions of the document.

This works fine from our server but to speed things up while I was writing the documents and make sure I had the formatting correct I thought I&apos;d install AsciiDoc on my laptop and &apos;build&apos; the document locally before committing to SVN, building and checking.

Installing AsciiDoc is simple enough using MacPorts:

&lt;code&gt;
$ sudo port install asciidoc
&lt;/code&gt;

Creating a html version of your AsciiDoc is simple at this point:

&lt;code&gt;
$ asciidoc /home/ajdyka/sample.txt
&lt;/code&gt;

That will output a file called sample.html in the same directory as the source file. No worries ...

To create a PDF or an ePub, it&apos;s recommended that you use the &lt;em&gt;a2x&lt;/em&gt; command instead of asciidoc though.

According to the AsciiDoc website &quot;&lt;em&gt;a2x is A toolchain manager for AsciiDoc (converts Asciidoc text files to other file formats)&lt;/em&gt;&quot;

So I gave this a try:

&lt;code&gt;
$ a2x -fpdf -dbook -L sample.txt
$ a2x -fepub -dbook -L sample.txt
&lt;/code&gt;

It generated the following error though!

&lt;code&gt;
a2x: ERROR: xmllint --nonet --noout --valid sample.xml returned non-zero exit status 4
&lt;/code&gt;

It took a bit of Googling (sp?) but I found the core of my solution in this post:&lt;a href=&quot;http://francisshanahan.com/index.php/2011/fixing-epub-problem-docbook-xsl-asciidoc-a2x/&quot;&gt;Fixing the ePub problem with Docbook-XSL/A2X/Asciidoc&lt;/a&gt;

The only &apos;tricky&apos; part was finding my catalogue.xml, which ended up being in /opt/local/share/xsl/docbook-xsl ... and I modified the contents to be:

&lt;code&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;catalog xmlns=&quot;urn:oasis:names:tc:entity:xmlns:xml:catalog&quot;&gt;
  &lt;!-- XML Catalog file for DocBook XSL Stylesheets v1.76.1 --&gt;
  &lt;rewriteURI uriStartString=&quot;/usr/local/docbook-xsl-1.76.1/epub&quot; rewritePrefix=&quot;./&quot;/&gt;
  &lt;rewriteSystem systemIdStartString=&quot;/usr/local/docbook-xsl-1.76.1/epub&quot; rewritePrefix=&quot;./&quot;/&gt;
&lt;/catalog&gt;
&lt;/code&gt;
* the new path is where I extracted the docbook-xsl-1.76.1 archive

Once I had done that, everything generated fine :)

The next thing I need to work on is getting the default XSLT template cleaned up :)

HTH

A.J.
				
				</description>
				
				<category>Mac OSX</category>
				
				<category>HOWTO</category>
				
				<pubDate>Thu, 11 Aug 2011 08:41:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/8/11/Generating-PDFs-and-ePubs-from-an-AsciiDoc--on-a-Mac</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Tomcat: Out of memory - permgen</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/8/4/Tomcat-Out-of-memory--permgen</link>
				<description>
				
				I ran into a permgen out of memory issue with one of our applications running on Tomcat/Railo and did a bit of digging around.  

The main answer on the web is: Increase the size of you permgen by adding the following:
&lt;code&gt;
 -XX:MaxPermSize=128m
&lt;/code&gt;

However, to me this just delays the problem, particularly if you are using dynamic languages which load a lot of classes eg Railo.

So a bit of further digging found these options:
&lt;code&gt;
-XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled
&lt;/code&gt;

These 3 options allow the permgen memory to be garbage collected.  I tried to find a good reference link for them but couldn&apos;t.

The final thing that I discovered was the &lt;a href=&quot;http://download.oracle.com/javase/6/docs/technotes/tools/share/jmap.html&quot;&gt;jmap tool&lt;/a&gt; - which is very helpful for understanding the memory usage.

You run it as follows and it gives a great summary of the memory usage of your running jvm.

&lt;code&gt;
$ sudo jmap -heap 18068

Attaching to process ID 18068, please wait...
Error attaching to process: sun.jvm.hotspot.debugger.DebuggerException: Can&apos;t attach to the process
markl@davoip:/opt/tomcat/bin$ sudo jmap -heap 18068
[sudo] password for markl: 
Attaching to process ID 18068, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 19.1-b02

using thread-local object allocation.
Parallel GC with 2 thread(s)

Heap Configuration:
   MinHeapFreeRatio = 40
   MaxHeapFreeRatio = 70
   MaxHeapSize      = 530579456 (506.0MB)
   NewSize          = 1048576 (1.0MB)
   MaxNewSize       = 4294901760 (4095.9375MB)
   OldSize          = 4194304 (4.0MB)
   NewRatio         = 2
   SurvivorRatio    = 8
   PermSize         = 16777216 (16.0MB)
   MaxPermSize      = 67108864 (64.0MB)

Heap Usage:
PS Young Generation
Eden Space:
   capacity = 114294784 (109.0MB)
   used     = 54227688 (51.715553283691406MB)
   free     = 60067096 (57.284446716308594MB)
   47.445461728157255% used
From Space:
   capacity = 31260672 (29.8125MB)
   used     = 0 (0.0MB)
   free     = 31260672 (29.8125MB)
   0.0% used
To Space:
   capacity = 31260672 (29.8125MB)
   used     = 0 (0.0MB)
   free     = 31260672 (29.8125MB)
   0.0% used
PS Old Generation
   capacity = 353763328 (337.375MB)
   used     = 317909912 (303.1825180053711MB)
   free     = 35853416 (34.192481994628906MB)
   89.86514057217371% used
PS Perm Generation
   capacity = 46399488 (44.25MB)
   used     = 44117200 (42.07344055175781MB)
   free     = 2282288 (2.1765594482421875MB)
   95.08122158589336% used
&lt;/code&gt;

Cheers,
Mark
				
				</description>
				
				<category>Systems admin</category>
				
				<category>Railo</category>
				
				<category>Open Source</category>
				
				<category>Java</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Thu, 04 Aug 2011 05:56:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/8/4/Tomcat-Out-of-memory--permgen</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Using AWS SimpleDB with Railo and Tomcat</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/7/26/Using-AWS-SimpleDB-with-Railo-and-Tomcat</link>
				<description>
				
				I&apos;ve been working with Amazon Webservices (AWS) and needed to connect to it from some of our railo servers.

&lt;h2&gt;Getting Setup&lt;/h2&gt;

Here is some documentation for reference and to help others:

&lt;h3&gt;1. Get the SDK from Amazon&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;I got version 1.2.4 from here: &lt;a href=&quot;http://aws.amazon.com/sdkforjava/&quot;&gt;http://aws.amazon.com/sdkforjava/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Extract the lib/aws-java-sdk-1.2.4jar file and put it in your tomcat/lib folder&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;2. Get the HTTPComponents Client&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;You will also need get the HTTPComponents Client from apache as it depends on this.  &lt;a href=&quot;http://hc.apache.org/downloads.cgi&quot;&gt;http://hc.apache.org/downloads.cgi&lt;/a&gt; I downloaded the 4.1.1 release and this worked a treat&lt;/li&gt;
&lt;li&gt;Extract the 6 jars and drop them in your tomcat/lib folder.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;3. Restart Tomcat and write some code&lt;/h3&gt;


&lt;h2&gt;Comparison of techniques&lt;/h2&gt;

I played with a few different techniques of using the AWS with tomcat and found the following:


&lt;h3&gt;1. CFHTTP direct API calls&lt;/h3&gt;
This was based on a modified version of the &lt;a href=&quot;http://awsconsole.riaforge.org/&quot;&gt;AWS CF Console&lt;/a&gt; code.  This has the benefit of being simple (none of the jar files were needed) and it took approx 900ms to do a query from Australia to US East AWS. From our US datacenter this took less than 30ms). However, this method had the significant drawback or requiring lots of code to be written to handle each function.  Not good.  


&lt;h3&gt;2. Java AWS SDK from Railo&lt;/h3&gt;
I then did the steps above and used the AWS SDK from a test page using the following code:
&lt;code&gt;
&lt;cfset awscreds = createObject(&quot;java&quot;,&quot;com.amazonaws.auth.BasicAWSCredentials&quot;).init(accessKeyId,secretAccessKey)&gt;
&lt;cfset sdb = createObject(&quot;java&quot;,&quot;com.amazonaws.services.simpledb.AmazonSimpleDBClient&quot;).init(awscreds)&gt;
&lt;cfset selectReq =  createObject(&quot;java&quot;,&quot;com.amazonaws.services.simpledb.model.SelectRequest&quot;).init(&quot;select * from #domainName# where testid = &apos;10000000&apos;&quot;)&gt;
&lt;/code&gt;

This worked well, but each request took on average of 1500ms from AU to US East AWS.  This was disappointing, so I tried caching in the the application scope as below.

&lt;h3&gt;3. Java AWS SDK cached in App Scope&lt;/h3&gt;

&lt;code&gt;
&lt;cfif NOT structKeyExists(application,&apos;inited&apos;)&gt;
	&lt;cfset application.awscreds = createObject(&quot;java&quot;,&quot;com.amazonaws.auth.BasicAWSCredentials&quot;).init(accessKeyId,secretAccessKey)&gt;
	&lt;cfset application.sdb = createObject(&quot;java&quot;,&quot;com.amazonaws.services.simpledb.AmazonSimpleDBClient&quot;).init(application.awscreds)&gt;
	&lt;cfset application.inited = true&gt;
&lt;/cfif&gt;
&lt;cfset selectReq =  createObject(&quot;java&quot;,&quot;com.amazonaws.services.simpledb.model.SelectRequest&quot;).init(&quot;select * from #domainName# where testid = &apos;10000000&apos;&quot;)&gt;
&lt;/code&gt;

The first request took ~ 1500ms but then subsequent requests were about 300ms, which was 1/3 of the time of the raw CF code. With the added benefit of having full access to all the API&apos;s, this is definitely the way we&apos;ll be using it going forward.

Cheers,
Mark

&lt;h3&gt;References&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://docs.amazonwebservices.com/AWSJavaSDK/latest/javadoc/index.html&quot;&gt;AWS Java SDK reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://docs.amazonwebservices.com/general/latest/gr/index.html?rande.html&quot;&gt;List of endpoints for each Amazon service&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
				
				</description>
				
				<category>Java</category>
				
				<category>Database</category>
				
				<category>ColdFusion</category>
				
				<pubDate>Tue, 26 Jul 2011 02:36:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/7/26/Using-AWS-SimpleDB-with-Railo-and-Tomcat</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Learnosity Job Vacancy - Web Application Developer (Junior to Mid Level)</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/4/4/Learnosity-Job-Vacancy--Web-Application-Developer-Junior-to-Mid-Level</link>
				<description>
				
				&lt;p&gt;Learnosity develop cutting edge tools for teachers and educators.&amp;nbsp; Our flagship product Learnosity Voice uses the telephone to enable language students and teachers to interact on a one to one level.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Our service:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Makes it practical for students to practice Oral and Aural skills.&lt;/li&gt;
&lt;li&gt;Is efficient and effective for teachers, as they can listen to each student individually at a time to suit them.&lt;/li&gt;
&lt;li&gt;Can be used for homework assignments or &amp;ldquo;High Stakes Assessments&amp;rdquo;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Learnosity are creating the next generation of language and assessment technology for use in schools and education worldwide.&amp;nbsp; The current product portfolio includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;High availability web based systems.&lt;/li&gt;
&lt;li&gt;Cross platform software platforms (Windows, Mac and Linux).&lt;/li&gt;
&lt;li&gt;iPhone/Android native applications.&lt;/li&gt;
&lt;li&gt;VOIP and SMS applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;We need someone who can:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use Javascript or Actionscript to create great user interfaces.&lt;/li&gt;
&lt;li&gt;Develop highly scalable web applications using ColdFusion, PHP or similar.&lt;/li&gt;
&lt;li&gt;Cut code with the best in the world.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You will also need to be:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;keen to continue learning new technologies.&lt;/li&gt;
&lt;li&gt;able to have a conversation with non technical people.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You&apos;ll need:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1-3 years of programming experience.&lt;/li&gt;
&lt;li&gt;Expert in at least one Client side language (Actionscript or Javascript/jQuery).&lt;/li&gt;
&lt;li&gt;Experience in at least one Server side language (eg PHP, Java, ColdFusion, etc).&lt;/li&gt;
&lt;li&gt;Understanding of Object Oriented design.&lt;/li&gt;
&lt;li&gt;Understanding of XHTML and CSS.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It would be good if you have:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a degree in Computer Science, Engineering or similar.&lt;/li&gt;
&lt;li&gt;been working with open source tools.&lt;/li&gt;
&lt;li&gt;been playing around with iPhone/Android applications.&lt;/li&gt;
&lt;li&gt;experience with some of Linux/VOIP/SIP/Asterisk/Jabber/XMPP.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is a full time role and you will be working in a casual workplace with flexible hours in the Sydney CBD.&amp;nbsp;&amp;nbsp; Salary commensurate with experience.&lt;/p&gt;
&lt;p&gt;If this sounds like the job for you, email a covering letter explaining why you&apos;ll be great and your resume to mark.lynch[at]learnosity.com - no agencies please.&amp;nbsp;&lt;/p&gt;
				
				</description>
				
				<category>Jobs</category>
				
				<pubDate>Mon, 04 Apr 2011 05:32:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/4/4/Learnosity-Job-Vacancy--Web-Application-Developer-Junior-to-Mid-Level</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Internet Explorer cannot download file</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/2/28/Internet-Explorer-cannot-download-file</link>
				<description>
				
				I had a report recently from a client that they couldn&apos;t download a file from one of our servers using Internet Explorer 7:


The message they got was:
&lt;code&gt;
Internet Explorer cannot download [filename] from [sitename]

Internet Explorer was not able to open this Internet site.  The requested site is either unavailable or cannot be found.  Please try again later.
&lt;/code&gt;

&lt;img src=&quot;http://www.learnosity.com/techblog/enclosures/internet_explorer_cannot_download.jpg&quot;&gt;

I knew that the site and file were both available and a bit of hunting around I was reminded that IE used to have issues with Gzip encoding in the past - but I presumed that it was a thing of the past.

I also noticed that when downloading the file Firefox would not show a progress bar but would instead show a &quot;indeterminate progress&quot; bar.

Looking at the headers the it turned out that there was no Content-Length header but there was a header as follows:
&lt;code&gt;
Transfer-Encoding: chunked
&lt;/code&gt;
The &lt;a href=&quot;http://en.wikipedia.org/wiki/Chunked_transfer_encoding&quot;&gt;transfer encoding chunked&lt;/a&gt; allows the server so start sending the file before if has completely compressed it - but was not playing nice with IE7.

To fix this I added some more exclusions to my mod_gzip rules to not zip some particular file types.

&lt;code&gt;
#Compress eveything that is not already well compressed
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \
	\.(?:gif|jpe?g|png|mp3|air|exe|zip)$ no-gzip dont-vary
&lt;/code&gt;

Now its working a treat.  It would also be possible to do this only for IE - but most of the files we use on this are already well compressed to gzip compression doesn&apos;t help too much anyway.

Cheers,
Mark
				
				</description>
				
				<category>General</category>
				
				<category>Linux</category>
				
				<category>Systems admin</category>
				
				<category>Windows</category>
				
				<pubDate>Mon, 28 Feb 2011 23:51:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/2/28/Internet-Explorer-cannot-download-file</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Monitor java memory usage</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/2/17/Monitor-java-memory-usage</link>
				<description>
				
				A quickie on how to monitor java memory usage for tomcat.  Note you need to have the JDK installed

&lt;code&gt;
sudo jstat -gcutil `sudo jps -lv | grep tomcat | awk &apos;{print $1}&apos;` 10000
&lt;/code&gt;

Change the &quot;tomcat&quot; to any other unique identifier to pick a different process.  

Thanks to &lt;a href=&quot;&quot;&gt;Maximdim for his post on this&lt;/a&gt;.

The &lt;a href=&quot;http://download.oracle.com/javase/1.5.0/docs/tooldocs/share/jstat.html#gcpermcapacity_option&quot;&gt;JStat reference has the low down&lt;/a&gt; on what all the codes mean.
				
				</description>
				
				<category>Java</category>
				
				<category>Linux</category>
				
				<pubDate>Thu, 17 Feb 2011 11:24:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/2/17/Monitor-java-memory-usage</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Block and IP Address with iptables</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2011/1/20/Block-and-IP-Address-with-iptables</link>
				<description>
				
				I had a nasty hacker trying to get access to one of my Asterisk machines tonight so a quick reminder for myself on how to block a single IP address using iptables:

Block an IP:
&lt;code&gt;
iptables -I INPUT -s 111.222.333.444 -j DROP
&lt;/code&gt;

Unblock an IP (if you typed the wrong address)
&lt;code&gt;
#substitute -D for -I
iptables -D INPUT -s 111.222.333.444 -j DROP
&lt;/code&gt;

Show current rules:
&lt;code&gt;
iptables -n -L
&lt;/code&gt;

Thanks to good folks at www.pbxer.com for the details on this:&lt;a href=&quot;http://www.pbxer.com/asterisk-security-use-iptables-to-block-nasty-hosts/&quot;&gt;Asterisk Security: Use iptables to Block the Bad Guys&lt;/a&gt;
				
				</description>
				
				<category>Asterisk</category>
				
				<category>Linux</category>
				
				<category>Systems admin</category>
				
				<category>Ubuntu</category>
				
				<pubDate>Thu, 20 Jan 2011 10:44:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2011/1/20/Block-and-IP-Address-with-iptables</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Convert FLV to MP4 with ffmpeg Howto</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2010/12/29/Convert-FLV-to-MP4-with-ffmpeg-Howto</link>
				<description>
				
				I recently needed to convert a lot of FLV files which were H264 encoded to MP4 so that they would play nice on my Mac Mini.

Initial attempts using ffmpeg were making it re-encode the entire video which would take ages and result in a larger file or worse quality.

A bit of googling and reading the man pages later I discovered
&lt;code&gt;
-vcodec copy -acodec copy
&lt;/code&gt;

This tells ffmpeg to copy the video and audio without re-encoding.

So insted of this
&lt;code&gt;
ffmpeg -i input.flv output.mp4
&lt;/code&gt;

&lt;h3&gt;The Solution&lt;/h3&gt;
&lt;code&gt;
ffmpeg -i input.flv -vcodec copy -acodec copy output.mp4
&lt;/code&gt;


&lt;h3&gt;Further complications&lt;/h3&gt;

This worked a treat for all except one file - which gave the following error.
&lt;code&gt;
[NULL @ 0x9b6b9f0]error, non monotone timestamps 37464141 &gt;= 37463126
av_interleaved_write_frame(): Error while opening file
&lt;/code&gt;

By using the &quot;-an&quot; and &quot;-vn&quot; flags to skip the video and audio encoding in turn I narrowed it down to a problem in the audio codec timestream.

To try to get ffmpeg to fix the problem I got it to reencode the audio but copy the video codec with the following:

&lt;code&gt;
ffmpeg -i input.flv -vcodec copy -acodec mp2 -ar 44100 -ab 128k  output.mp4
&lt;/code&gt;

Worked a treat.  I love ffmpeg :-)

&lt;h3&gt;Update&lt;/h3&gt;
As usually happens, by the time I finished writing the post I spotted another enhancement - using the libfaac codec (I had been trying to use it as aac which was failing).

Final code to fix it using aac with audio quality quite high 200 (range is 0-255)
&lt;code&gt;
ffmpeg -i input.flv -vcodec copy -acodec libfaac -aq 200  output.mp4
&lt;/code&gt;
				
				</description>
				
				<category>Ubuntu</category>
				
				<category>Open Source</category>
				
				<category>Mac OSX</category>
				
				<category>Linux</category>
				
				<category>HOWTO</category>
				
				<pubDate>Wed, 29 Dec 2010 05:13:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2010/12/29/Convert-FLV-to-MP4-with-ffmpeg-Howto</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Learnosity are looking for Junior to Mid level Web Application Developers x2</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2010/10/20/Learnosity-are-looking-for-Junior-to-Mid-level-Web-Application-Developers-x2</link>
				<description>
				
				Learnosity develop cutting edge tools for teachers and educators.  Our flagship product &lt;a href=&quot;http://www.learnosity.com/learning/talkback/&quot;&gt;Learnosity Voice&lt;/a&gt; uses the telephone to enable language students and teachers to interact on a one to one level. Our service:
&lt;ul&gt;
&lt;li&gt;Makes it practical for students to practice Oral and Aural skills&lt;/li&gt;
&lt;li&gt;Is efficient and effective for teachers, as they can listen to each student individually at a time to suit them&lt;/li&gt;
&lt;li&gt;Can be used for homework assignments or “High Stakes Assessments”&lt;/li&gt;
&lt;/ul&gt;

Learnosity are creating the next generation of language and assessment technology for use in schools and education worldwide.  The current product portfolio includes:
&lt;ul&gt;
&lt;li&gt;High availability web based systems&lt;/li&gt;
&lt;li&gt;Cross platform software (Windows, Mac and Linux)&lt;/li&gt;
&lt;li&gt;iPhone/Android native applications &lt;/li&gt;
&lt;li&gt;Telephony/VOIP and SMS applications&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;We need someone who can:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Use Javascript or Actionscript to create great user interfaces&lt;/li&gt;
&lt;li&gt;Develop highly scalable web applications using ColdFusion, PHP or similar&lt;/li&gt;
&lt;li&gt;Cut code with the best in the world&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;You will also need to be:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;keen to continue learning new technologies&lt;/li&gt;
&lt;li&gt;able to have a conversation with non technical people&lt;/li&gt;
&lt;li&gt;enthusiastic and ready to push the boundaries&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;You&apos;ll need:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;1-3 years of programming experience&lt;/li&gt;
&lt;li&gt;Experience in at least one Client side language (Actionscript or Javascript/jQuery)&lt;/li&gt;
&lt;li&gt;Experience in at least one Server side language (eg PHP, Java, ColdFusion, etc)&lt;/li&gt;
&lt;li&gt;Understanding of Object Oriented design&lt;/li&gt;
&lt;li&gt;Understanding of XHTML and CSS&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;It would be good if you have:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A degree in Computer Science, Engineering or similar.&lt;/li&gt;
&lt;li&gt;been working with open source tools&lt;/li&gt;
&lt;li&gt;Experience with Adobe AIR or Flex&lt;/li&gt;
&lt;li&gt;been playing around with iPhone/Android applications&lt;/li&gt;
&lt;li&gt;experience with some of Linux/VOIP/SIP/Asterisk/Jabber/XMPP&lt;/li&gt;
&lt;/ul&gt;


This is a full time role and you will be working in a casual workplace with flexible hours in the Sydney CBD.  Salary commensurate with experience.

If this sounds like the job for you, email a covering letter explaining why you&apos;ll be great and your resume to mark@learnosity.com - no agencies please.
				
				</description>
				
				<category>XMPP</category>
				
				<category>Windows</category>
				
				<category>Ubuntu</category>
				
				<category>Systems admin</category>
				
				<category>Software Architecture</category>
				
				<category>SMS</category>
				
				<category>Railo</category>
				
				<category>PHP</category>
				
				<category>Open Source</category>
				
				<category>mysql</category>
				
				<category>Mac OSX</category>
				
				<category>Linux</category>
				
				<category>Learnosity</category>
				
				<category>Jobs</category>
				
				<category>Javascript</category>
				
				<category>Java</category>
				
				<category>iPhone</category>
				
				<category>General</category>
				
				<category>Flex</category>
				
				<category>Database</category>
				
				<category>CSS</category>
				
				<category>ColdFusion</category>
				
				<category>Asterisk</category>
				
				<category>AIR</category>
				
				<category>Actionscript</category>
				
				<pubDate>Wed, 20 Oct 2010 03:36:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2010/10/20/Learnosity-are-looking-for-Junior-to-Mid-level-Web-Application-Developers-x2</guid>
				
			</item>
			
		 	
			
			
			<item>
				<title>Remove svn directories using find command on linux</title>
				<link>http://www.learnosity.com/techblog/index.cfm/2010/9/29/Remove-svn-directories-using-find-command-on-linux</link>
				<description>
				
				A quick tip on how to remove .svn directories if you accidentally copy them using a folder copy.

&lt;code&gt;
find . -name &apos;.svn&apos; -exec rm -rf {} \;
&lt;/code&gt;

If you copy code from on svn codebase to another then you can often have hidden .svn directories copied also, which will cause svn operations to fail.

Running the command above will fix it up by finding them all and deleting them.
				
				</description>
				
				<category>Linux</category>
				
				<category>Systems admin</category>
				
				<category>Ubuntu</category>
				
				<pubDate>Wed, 29 Sep 2010 06:17:00 -0000</pubDate>
				<guid>http://www.learnosity.com/techblog/index.cfm/2010/9/29/Remove-svn-directories-using-find-command-on-linux</guid>
				
			</item>
			
		 	
			</channel></rss>
