<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jigsaw Boys</title>
	<atom:link href="http://www.jigsawboys.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jigsawboys.com</link>
	<description>Security, Network and Computer Tech Tip Database!</description>
	<lastBuildDate>Wed, 17 Aug 2011 22:59:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>RVM &#8211; no such file to load &#8212; openssl</title>
		<link>http://www.jigsawboys.com/2011/07/30/rvm-no-such-file-to-load-openssl/</link>
		<comments>http://www.jigsawboys.com/2011/07/30/rvm-no-such-file-to-load-openssl/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 07:06:39 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=413</guid>
		<description><![CDATA[Installed ruby 1.9.2 via RVM and getting the following error? Try getting RVM to install the required openssl files. Unfortunately this means removing ruby and installing it again. But hey, it works. No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Installed ruby 1.9.2 via RVM and getting the following error?</p>
<pre class="brush: bash; title: ; notranslate">
no such file to load -- openssl
</pre>
<p>Try getting RVM to install the required openssl files. Unfortunately this means removing ruby and installing it again.</p>
<pre class="brush: bash; title: ; notranslate">
rvm pkg install openssl
rvm remove 1.9.2
rvm install 1.9.2 --with-openssl-dir=$HOME/.rvm/usr
</pre>
<p>But hey, it works.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2011/07/30/rvm-no-such-file-to-load-openssl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Running Resque Workers from Upstart + RVM</title>
		<link>http://www.jigsawboys.com/2011/05/25/running-resque-workers-from-upstart-rvm/</link>
		<comments>http://www.jigsawboys.com/2011/05/25/running-resque-workers-from-upstart-rvm/#comments</comments>
		<pubDate>Tue, 24 May 2011 22:48:08 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[resque]]></category>
		<category><![CDATA[RVM]]></category>
		<category><![CDATA[upstart]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=406</guid>
		<description><![CDATA[I recently had the task of getting resque workings to start from Ubuntu&#8217;s upstart daemon. First I created a bash script with the following; Put the above contents in a file called resque.sh in your home directory. Then give it executable status! Next, create a file called resque.conf in /etc/init (you&#8217;ll need sudo access). If [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I recently had the task of getting resque workings to start from Ubuntu&#8217;s upstart daemon.</p>
<p>First I created a bash script with the following;</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/bash

# Load RVM into the shell
source &quot;$HOME/.rvm/scripts/rvm&quot;

# Switch to the right RVM version
rvm 1.9.2

# CD to the rails app
cd /home/myapp/

# Start the resque workers
QUEUE=* /home/myapp/.rvm/gems/ruby-1.9.2-p180/bin/rake resque:work
</pre>
<p>Put the above contents in a file called resque.sh in your home directory.<br />
Then give it executable status!</p>
<pre class="brush: bash; title: ; notranslate">
chmod +x resque.sh
</pre>
<p>Next, create a file called resque.conf in /etc/init (you&#8217;ll need sudo access).</p>
<pre class="brush: bash; title: ; notranslate">
description &quot;my App resque workers
start on (net-device-up and local-filesystems)
stop on runlevel [016]
respawn
exec su -c &quot;/home/myapp/resque.sh&quot; myappuser &gt;&gt; /home/myappuser/resque.log 2&gt;&amp;1
</pre>
<p>If you run into errors, you can take a peek at /home/myappuser/resque.log to debug the problem.</p>
<p>Good luck! <img src='http://www.jigsawboys.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2011/05/25/running-resque-workers-from-upstart-rvm/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Valum Fileupload +jQuery +csrf</title>
		<link>http://www.jigsawboys.com/2011/05/19/valum-fileupload-jquery-csrf/</link>
		<comments>http://www.jigsawboys.com/2011/05/19/valum-fileupload-jquery-csrf/#comments</comments>
		<pubDate>Thu, 19 May 2011 01:04:38 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=403</guid>
		<description><![CDATA[I recently went to implement Valum&#8217;s Fileupload script with a Ruby on Rails jQuery project I was working on. One thing I figured out is that all requests in Rails3 must send also send the X-CSRF-Token. Now normally the rails.js jQuery adapter takes care of this; but Valum&#8217;s fileupload script is written in raw javascript [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>I recently went to implement Valum&#8217;s <a href="http://valums.com/ajax-upload/">Fileupload script</a> with a Ruby on Rails jQuery project I was working on.</p>
<p>One thing I figured out is that all requests in Rails3 must send also send the X-CSRF-Token. Now normally the rails.js jQuery adapter takes care of this; but Valum&#8217;s fileupload script is written in raw javascript <img src='http://www.jigsawboys.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The problem I had was a logged in user was automatically logged out whenever they attempted a fileupload (I was using the Devise auth gem).</p>
<p>Find line 1203 and add the following below it.</p>
<pre class="brush: jscript; title: ; notranslate">
        var token = $('meta[name=&quot;csrf-token&quot;]').attr('content');
        if (token) xhr.setRequestHeader('X-CSRF-Token', token);
</pre>
<p>This will ensure that fileupload requests also send the csrf token.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2011/05/19/valum-fileupload-jquery-csrf/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SQL &#8211; Changing to British Datetime format</title>
		<link>http://www.jigsawboys.com/2011/04/28/sql-changing-to-british-datetime-format/</link>
		<comments>http://www.jigsawboys.com/2011/04/28/sql-changing-to-british-datetime-format/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 00:51:49 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=398</guid>
		<description><![CDATA[Error converting data type varchar to datetime Are you getting the above error? Run the following under your app user. If it says us_english then you&#8217;re probably hitting errors when parsing dates as DD/MM/YYYY. We can change the default language for a particular user. Login to your SQL server as an administrator account and run [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p><code>Error converting data type varchar to datetime</code><br />
Are you getting the above error?</p>
<p>Run the following under your app user.</p>
<pre class="brush: sql; title: ; notranslate">select @@Language, @@Langid</pre>
<p>If it says us_english then you&#8217;re probably hitting errors when parsing dates as DD/MM/YYYY.<br />
We can change the default language for a particular user. Login to your SQL server as an administrator account and run the following;</p>
<pre class="brush: sql; title: ; notranslate">ALTER LOGIN yourapplogin WITH DEFAULT_LANGUAGE = British;
GO</pre>
<p>Then login with the user &#8220;yourapplogin&#8221; and run</p>
<pre class="brush: sql; title: ; notranslate">select @@Language, @@Langid</pre>
<p>Hopefully you now see &#8220;British&#8221; and 23.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2011/04/28/sql-changing-to-british-datetime-format/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why iPhone and Android phones are unsuitable for the Enterprise world</title>
		<link>http://www.jigsawboys.com/2010/10/07/why-iphone-and-android-phones-are-unsuitable-for-the-enterprise-world/</link>
		<comments>http://www.jigsawboys.com/2010/10/07/why-iphone-and-android-phones-are-unsuitable-for-the-enterprise-world/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 00:13:32 +0000</pubDate>
		<dc:creator>Burnsie</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Enterprise]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=381</guid>
		<description><![CDATA[Every month there seems to be another news article about a large enterprise investigating the possiblity of replacing some or all of their Blackberry devices with iPhones or Android devices

This article attempts to explain why this is a bad idea and why corporate solutions such as Blackberry are far more suited for this environment.



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Every month there seems to be another news article about a large enterprise investigating the possibility of <a href="http://www.adi-news.com/jpmorgan-and-ubs-considers-iphone-and-google-android-smartphones-as-blackberry-alternative-for-company-email/24689/">replacing some or all of their Blackberry devices with iPhones or Android devices</a>.</p>
<p>I can almost guarantee that the reason for this is due to senior managers who no longer want to carry around their funky iPhones as well as their boring old Blackberry.  These senior managers see their kids using email on their iPhone and chew out their CIO because they can&#8217;t see their work email on their own.  Unfortunately these senior managers don&#8217;t often understand the implications of their request, and this post is an attempt to help educate them.</p>
<p><strong>1.  iPhones have useless data encryption</strong><br />
The iPhone 3GS encryption is useless. It can be <a href="http://www.wired.com/gadgetlab/2009/07/iphone-encryption/">broken in under 2 minutes</a> using software freely available on the internet.</p>
<p>In contrast, countries like the UAE and India are considering banning Blackberries within their country because even their government’s top science people can&#8217;t break the encryption.</p>
<p>For firms like UBS and JP Morgan this is a problem.  More and more laws are being created relating to the encryption of customers financial data.  <a href="http://searchsecurity.techtarget.com/news/article/0,289142,sid14_gci1347836,00.html">For example, in Massachusetts</a>:</p>
<blockquote><p>The law requires any firm conducting business with state residents to deploy encryption and protect against data leakage. A combination of a person&#8217;s name along with their Social Security number, bank account number or credit card number must be encrypted when stored on portable devices, or transmitted wirelessly on public networks, according to the new law. </p>
<p>Encryption of personal information on portable devices carrying identity data like laptops, PDAs and flash drives must also be completed by Jan. 1, according to the Massachusetts Office of Consumer Affairs and Business Regulation, which announced the extension Thursday. </p></blockquote>
<p><strong>2.  Control of device settings using policies</strong><br />
Blackberry&#8217;s have the ability to be controlled from a central administration console within the organisation.  This means that systems administrators can control everything about a device from a server.  This also ensures that all devices have a standard configuration making it far less likely they will stop working and easier (read: cheaper) for the service desk to support.</p>
<p>Enabling the encryption settings mentioned above on a fleet of 22,000 Blackberry&#8217;s involves changing one setting on a server.  To change this setting on 22,000 iPhones it needs to be done manually on each device.  Even then, there is no way to detect if it has actually been configured on each device.  Something a financial auditor will pounce on immediately.</p>
<p>An enterprise solution also allows settings such as password unlock requirements to be enforced on the device.  This allows administrators to ensure that if a device wiped clean if it is lost, and someone finds it and types the password wrong a few times.  If this setting is configured manually on an iPhone or Android, it is often disabled by the user because they find it too cumbersome to type a password in each time they want to make a phone call or read an email.</p>
<p><strong>3.  Control of application installation</strong><br />
An enterprise solution, such as Blackberry, allows an administrator to control which applications an end user can install on their devices.  This cannot currently be done on an iPhone or Android device.  Allowing users to install any application that they choose on a corporate device poses several security problems.</p>
<p>A rogue application may have back doors or security flaws allowing it to steal corporate emails, calendar appointments and send them to the application author.  A lot of malicious programmers embed this type of code within games or any other application that may seem initially harmless.  This could allow sensitive customer data to fall into the wrong hands.</p>
<p>By only allowing users to install approved and tested applications system administrators can ensure this will not happen.  It is amazing how many organisations ban installation of applications on locked down laptop and desktop computers but don&#8217;t seem to care what their users install on their mobile devices, which contain the same types of customer information.</p>
<p>At the end of the day, iPhones and Android phones are great and I couldn&#8217;t imagine life without one.  However these are consumer products and therefore not designed for corporate use.  Corporate devices are safe, secure and robust.  This basically means that they are boring, which is why people want to stop using them.  One day iPhones and Android might evolve to a point when they are suitable for corporate use, but I hope that never happens as it will take the fun, spontaneity and creativity out of them.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/10/07/why-iphone-and-android-phones-are-unsuitable-for-the-enterprise-world/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Vbscript: Output specific users mailbox sizes under Exchange 2000/2003 to csv</title>
		<link>http://www.jigsawboys.com/2010/10/07/exchange-user-mailbox-size-vb/</link>
		<comments>http://www.jigsawboys.com/2010/10/07/exchange-user-mailbox-size-vb/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 23:49:19 +0000</pubDate>
		<dc:creator>Burnsie</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=388</guid>
		<description><![CDATA[This script generates a CSV file containing a users name, exchange server, mailbox size and total number of items.  It queries Active Directory to find out which mailbox server the user lives on, then goes and finds the total size of their mailbox.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>What does it do?<br />
This script generates a CSV file containing a users name, exchange server, mailbox size and total number of items.  It queries Active Directory to find out which mailbox server the user lives on, then goes and finds the total size of their mailbox.</p>
<p>How do I use it?<br />
1.  Edit the vbs file and change the strLDAPString to suit your environment<br />
2.  Provide a list of users (one AD user name per line) in the userlist.txt file<br />
3.  Run this script.<br />
4.  Open CSV file</p>
<p><code><br />
'This VBS script queries a list of users and outputs a CSV file containing their mailbox sizes<br />
'It is designed for Exchange 2000/2003.  2007 lets you do the same thing a lot easier with Powershell<br />
'Written 07/10/2010 by Burnsie<br />
'</p>
<p>'User Configurable settings<br />
'This string contains your base domain LDAP string<br />
strLDAPString =LDAP://dc=YOUR,dc=WINDOWS,dc=DOMAIN,dc=com</p>
<p>'Declare variables<br />
Dim oSession<br />
Dim oInfoStores<br />
Dim oInfoStore<br />
Dim StorageUsed<br />
Dim NumMessages<br />
Dim strProfileInfo<br />
Dim sMsg</p>
<p>'Input and Output files<br />
Set iFSO = CreateObject("Scripting.FilesyStemObject")<br />
Set oFSO = CreateObject("Scripting.FilesyStemObject")</p>
<p>'Input file (Change this if you change the input file name)<br />
Set ifile = iFSO.OpenTextFile("userlist.txt")</p>
<p>'Output file<br />
Set ofile = iFSO.CreateTextFile("Mailbox Details.csv")<br />
ofile.writeline "UserName,FullName,Exchange Server,Storage Used (Bytes),Total Items"</p>
<p>'Set up AD stuff<br />
Const E_ADS_PROPERTY_NOT_FOUND  = &#038;h8000500D<br />
Const ADS_SCOPE_SUBTREE = 2<br />
Set objConnection = CreateObject("ADODB.Connection")<br />
Set objCommand =   CreateObject("ADODB.Command") </p>
<p>'Loop through each user one by one.<br />
Do until ifile.AtEndOfLine<br />
	struser = ifile.ReadLine</p>
<p>	'Connect to AD and find out where the users mailbox is located.  Also grabs a lot of other details.<br />
	objConnection.Provider = "ADsDSOObject"<br />
	objConnection.Open "Active Directory Provider"<br />
	Set objCommand.ActiveConnection = objConnection<br />
	objCommand.Properties("Page Size") = 1000<br />
	objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE<br />
	'Change this if you change the domain<br />
	objCommand.CommandText = _<br />
		"SELECT Name, adspath FROM '" &#038; strLDAPString &#038; "' WHERE objectCategory='user' " &#038; "AND sAMAccountName='" &#038; struser &#038; "'"<br />
	Set objRecordSet = objCommand.Execute<br />
	objRecordSet.MoveFirst<br />
		strpath = objRecordSet.Fields("ADsPath").Value<br />
		set objuser = GetObject(strPath) </p>
<p>	'If there is no error, then get the details.<br />
	If Err.Number = 0 then<br />
		strExchangeServer = (Mid(objuser.msExchHomeServerName,(InStrRev(objuser.msExchHomeServerName,"=")+ 1)))<br />
		strFullName = objuser.fullname<br />
	Else<br />
		wscript.echo "Error User Account May Not Exist or Corrupt AD Info For Account"<br />
	end if<br />
	objConnection.Close </p>
<p>   On Error Resume Next</p>
<p>   'Create MAPI Session object.<br />
   Set oSession = CreateObject("MAPI.Session")<br />
   if Err.Number <> 0 Then<br />
	  sMsg = "Error creating MAPI.Session."<br />
	  sMsg = sMsg &#038; "Make sure CDO 1.21 is installed. (Run it on an Exchange server is probably easiest)"<br />
	  sMsg = sMsg &#038; Err.Number &#038; " " &#038; Err.Description<br />
	  WScript.Echo sMsg<br />
   End If</p>
<p>	'Build logon string<br />
   strProfileInfo = strExchangeServer &#038; vbLf &#038; strUser</p>
<p>   'Log on to mailbox<br />
   oSession.Logon , , False, True, , True, strProfileInfo<br />
   if Err.Number <> 0 Then<br />
      Set oSession = Nothing<br />
   End If</p>
<p>   'Grab the information stores.<br />
   Set oInfoStores = oSession.InfoStores<br />
   if Err.Number <> 0 Then</p>
<p>      Set oInfoStores = Nothing<br />
      Set oSession = Nothing<br />
   End If</p>
<p>   'Loop through information stores to find the user's mailbox.<br />
   For Each oInfoStore In oInfoStores<br />
      If InStr(1, oInfoStore.Name, "Mailbox - ", 1) <> 0 Then<br />
         '&#038;HE080003 = PR_MESSAGE_SIZE<br />
         StorageUsed = oInfoStore.Fields(&#038;HE080003)<br />
         if Err.Number <> 0 Then<br />
            sMsg = "Error retrieving PR_MESSAGE_SIZE: "<br />
            sMsg = sMsg &#038; Err.Number &#038; " " &#038; Err.Description<br />
            WScript.Echo sMsg<br />
            WScript.Echo "Server: " &#038; obArgs.Item(0)<br />
            WScript.Echo "Mailbox: " &#038; obArgs.Item(1)<br />
            Set oInfoStore = Nothing<br />
            Set oInfoStores = Nothing<br />
            Set oSession = Nothing<br />
         End If</p>
<p>         '&#038;H33020003 = PR_CONTENT_COUNT<br />
         NumMessages = oInfoStore.Fields(&#038;H36020003)</p>
<p>         if Err.Number <> 0 Then</p>
<p>            sMsg = "Error Retrieving PR_CONTENT_COUNT: "<br />
            sMsg = sMsg &#038; Err.Number &#038; " " &#038; Err.Description<br />
            Set oInfoStore = Nothing<br />
            Set oInfoStores = Nothing<br />
            Set oSession = Nothing<br />
         End If</p>
<p>         strInfoStore = oInfoStore.Name<br />
         strStorageUsed = StorageUsed<br />
         strTotalItems = NumMessages<br />
      End If<br />
   Next</p>
<p>   ' Log off.<br />
   oSession.Logoff</p>
<p>   ' Clean up memory.<br />
   Set oInfoStore = Nothing<br />
   Set oInfoStores = Nothing<br />
   Set oSession = Nothing </p>
<p>   'Echo to screen for people who are impatient and like to see what is going on<br />
   wscript.echo strUser &#038;","&#038; strFullName &#038;","&#038; strExchangeServer &#038;"," &#038; strStorageUsed &#038;","&#038; strTotalItems</p>
<p>   'Write to CSV file<br />
   ofile.writeline strUser &#038;","&#038; strFullName &#038;","&#038; strExchangeServer &#038;"," &#038; strStorageUsed &#038;","&#038; strTotalItems</p>
<p>loop</p>
<p>'Clean up memory and variables<br />
ifile.close<br />
ofile.close<br />
set ifile = nothing<br />
set ofile = nothing<br />
set wsfile = nothing<br />
</code></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/10/07/exchange-user-mailbox-size-vb/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ruby On Rails AJAX File Upload With Valum</title>
		<link>http://www.jigsawboys.com/2010/10/06/ruby-on-rails-ajax-file-upload-with-valum/</link>
		<comments>http://www.jigsawboys.com/2010/10/06/ruby-on-rails-ajax-file-upload-with-valum/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 03:21:46 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[ajax]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=383</guid>
		<description><![CDATA[Some sample code I wrote with Andrew Valums&#8217;s AJAX uploader script and Ruby On Rails. Note; I use the prototype javascript library to manipulate the DOM during the onComplete event. If you need any help getting this to work, simply use the comments below. and the ruby on rails code No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Some sample code I wrote with Andrew Valums&#8217;s AJAX <a href="http://github.com/valums/file-uploader">uploader script</a> and Ruby On Rails.</p>
<p>Note; I use the prototype javascript library to manipulate the DOM during the onComplete event. </p>
<p>If you need any help getting this to work, simply use the comments below.</p>
<pre class="brush: jscript; title: ; notranslate">
  function createUploader(){
      var uploader = new qq.FileUploader({
          allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
          element: document.getElementById('file-uploader-demo1'),
          action: '/vendor/products/12/upload',
          params: {
                 postid: '9999'
          },
          onComplete: function(id, fileName, responseJSON){
            if (responseJSON.success) {
              $$('.qq-upload-failed-text').first().update('Successfully Uploaded!');
            }
            else
            {
              $$('.qq-upload-failed-text').first().update('Hmm .. upload failed');
            }
          }
      });
  }
  // in your app create uploader as soon as the DOM is ready
  // don't wait for the window to load
  window.onload = createUploader;
</pre>
<p>and the ruby on rails code</p>
<pre class="brush: ruby; title: ; notranslate">
  def upload
    @filename = params['qqfile']

    newf = File.open('assets/' + @filename, &quot;wb&quot;)
    str =  request.body.read
    newf.write(str)
    newf.close

    render :text =&gt; '{success:true}'
  end
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/10/06/ruby-on-rails-ajax-file-upload-with-valum/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Review: Zenithink ZT-180 ePad</title>
		<link>http://www.jigsawboys.com/2010/09/07/review-zenithink-zt-180-epad/</link>
		<comments>http://www.jigsawboys.com/2010/09/07/review-zenithink-zt-180-epad/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 02:43:16 +0000</pubDate>
		<dc:creator>Burnsie</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=378</guid>
		<description><![CDATA[The release of the iPad has inspired many copy-cat devices, mostly originating from China. The Zenithink ZT-180 ePad is one of these devices, recently released with Android 2.1 as it&#8217;s OS. Being a Google fanboy, the idea of a 1Ghz tablet running Android had me very intruiged and I ordered one for $AU280. I was [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>The release of the iPad has inspired many copy-cat devices, mostly originating from China.  The Zenithink ZT-180 ePad is one of these devices, recently released with Android 2.1 as it&#8217;s OS.  Being a Google fanboy, the idea of a 1Ghz tablet running Android had me very intruiged and I ordered one for $AU280.</p>
<p>I was excited to receive it and have a tinker.  I quickly discovered that it is an absolute piece of garbage and here is why:</p>
<p>1.  It does not in fact have a 1Ghz processor as advertisied, it is an ARM11 CPU with a coreclock of 800MHz. The OS is sluggish and it often freezes for 5-10 seconds as it catches up with what I am trying to do.<br />
2.  It has a resistive touch screen, not a capacitive one like the iPad. This makes it frustrating to use.  It is also not multi touch. (Explained here: <a href="http://en.wikipedia.org/wiki/Touchscreen#Technologies">http://en.wikipedia.org/wiki/Touchscreen#Technologies</a>)<br />
3. There is no access to the Android Market out of the box.  You can get access to the market by following a series of unnecessarily complicated steps, which I did and they indeed work a treet.  I have a lot of respect for the people who hacked this together. (<a href="http://bobhood.wordpress.com/2010/08/30/android-market-and-the-zenithink-zt-180/">http://bobhood.wordpress.com/2010/08/30/android-market-and-the-zenithink-zt-180/</a>)<br />
4.  The wifi antenna is on a PCB, and about the size of a match stick.  This causes the wifi to drop out if you walk more than 5m away from your access point.<br />
5.  It is called an ePad, with the &#8216;e&#8217; of their logo directly ripped off from the Microsoft Internet Explorer logo.</p>
<p>But like a puppy with only three legs, it is impossible not to simultaneously love this device.  It shows so much potential and I can&#8217;t wait for an Android tablet from a decent hardware manufacturer.  Even with the above major flaws it is much better than an iPad in the following ways:</p>
<p>1.  It has USB ports, allowing you to plug in a wide variety of peripherals such as web cams, USB sticks and 3G modems.<br />
2.  It has a MicroSD slot which means you can upgrade the memory whenever you damn please.  You can also have more than one storage device for it allowing you to copy movies or music to it without having to bollocks around with itunes or DRM.  At the time of writing 16GB and 32GB microSD cards cost $60 and $110 respectively.<br />
3.  It plays a wide variety of formats like Divx, and it allegedly does this in 1080p.<br />
4.  You can install apps from the internet without having to go through the market place.  Just click on a link on the developers website, or even have a friend email the application to you.<br />
5.  It multi-tasks quite well.<br />
6.  If you use the Google cloud, then this is a perfect companion for checking your emails, calendar or documents when you&#8217;re on the couch and can&#8217;t be bothered waiting for your laptop to boot.<br />
7.  Using apps from the Android store, you can access file shares from other computers in your house using Wifi.</p>
<p>You have to hand it to Apple though, they&#8217;ve once again found a piece of technology that has existed for many years and re-invented it as something that excites people.  I thank them for re-launching the tablet PC world with the enthusiasm it deserves.</p>
<p>At the end of the day, considering ZT-180 is 1/3rd the price of an iPad, you really can&#8217;t expect much.  It shows excellent potential and will continue to keep an eye on the Android tablet PC market.  There are some exciting projects in the pipeline from people like Samsung and Asus which will be worth a look.</p>
<p>I love living in the future.</p>
<p><strong>UPDATE::</strong><br />
Since upgrading the device firmware to the latest version the device is infinitely more stable and the touch screen is somehow a lot more responsive.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/09/07/review-zenithink-zt-180-epad/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>WordPress on Mobile (iPhone and Android)</title>
		<link>http://www.jigsawboys.com/2010/05/10/wordpress-on-mobile-iphone-and-android/</link>
		<comments>http://www.jigsawboys.com/2010/05/10/wordpress-on-mobile-iphone-and-android/#comments</comments>
		<pubDate>Mon, 10 May 2010 02:06:22 +0000</pubDate>
		<dc:creator>Burnsie</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=373</guid>
		<description><![CDATA[WPTouch is a fantastic plugin for WordPress that allows your users to browse your WordPress Blog on iPhone and Android mobile phones. http://www.bravenewcode.com/products/wptouch/ If you want to customise the mobile theme, you can modify the PHP theme included in your wp-content/plugins/wptouch/themes folder in the same way as any other theme. See a customised theme in [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>WPTouch is a fantastic plugin for WordPress that allows your users to browse your WordPress Blog on iPhone and Android mobile phones.</p>
<p><a href="http://www.bravenewcode.com/products/wptouch/">http://www.bravenewcode.com/products/wptouch/</a></p>
<p>If you want to customise the mobile theme, you can modify the PHP theme included in your wp-content/plugins/wptouch/themes folder in the same way as any other theme.  </p>
<p>See a customised theme in action by visiting <a href="http://www.bestaussiecoffee.com ">http://www.bestaussiecoffee.com </a>on your Android or iPhone.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/05/10/wordpress-on-mobile-iphone-and-android/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>rake db:seed &#124; Don&#8217;t know how to build task error</title>
		<link>http://www.jigsawboys.com/2010/03/23/rake-dbseed-dont-know-how-to-build-task-error/</link>
		<comments>http://www.jigsawboys.com/2010/03/23/rake-dbseed-dont-know-how-to-build-task-error/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 11:30:48 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rake]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=368</guid>
		<description><![CDATA[So I ran into a little issue today, I wasn&#8217;t able to get my rake db:seed task to work. This is the error I was getting; The solution? Update rails to 2.3.5 How? No related posts.


No related posts.]]></description>
			<content:encoded><![CDATA[<p>So I ran into a little issue today, I wasn&#8217;t able to get my rake db:seed task to work. This is the error I was getting;</p>
<pre class="brush: ruby; title: ; notranslate">
rake db:seed  don't know how to build task
</pre>
<p>The solution?</p>
<p>Update rails to 2.3.5</p>
<p>How?</p>
<pre class="brush: ruby; title: ; notranslate">
gem update rails
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/03/23/rake-dbseed-dont-know-how-to-build-task-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ordinal Number in Reporting Services</title>
		<link>http://www.jigsawboys.com/2010/03/04/ordinal-number-in-reporting-services/</link>
		<comments>http://www.jigsawboys.com/2010/03/04/ordinal-number-in-reporting-services/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 23:04:12 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[datetime format]]></category>
		<category><![CDATA[ordinal]]></category>
		<category><![CDATA[reporting services]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=359</guid>
		<description><![CDATA[Recently I had a client request for reporting services dates to use ordinal numbers, that being, &#8220;1st instead of 1, 2nd instead of 2&#8243; etc. To my surprise, this isn&#8217;t a standard datetime format in reporting services! So I set out to create my own ordinal function based on a C# version I found on [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Recently I had a client request for reporting services dates to use ordinal numbers, that being, &#8220;1st instead of 1, 2nd instead of 2&#8243; etc. To my surprise, this isn&#8217;t a standard datetime format in reporting services! </p>
<p>So I set out to create my own ordinal function based on a C# version I found on the Internet.</p>
<p>To use the below function in your report;</p>
<p>1) Open up your report in Reporting Services<br />
2) Make sure you&#8217;re in the Design section and click the &#8220;Report&#8221; menu option (up the top), then &#8220;Report Properties&#8221;<br />
3) Select &#8220;Code&#8221;<br />
4) Copy and Paste the function below into the &#8220;Custom Code&#8221; box.</p>
<pre class="brush: vb; title: ; notranslate">
Public Function FormatOrdinal(ByVal day As Integer) as String

    ' Starts a select case based on the odd/even of num
    Select Case (day Mod 100)
        ' If the nymber is 11,12 or 13 .. we want to add a &quot;th&quot; NOT a &quot;st&quot;, &quot;nd&quot; or &quot;rd&quot;
        Case 11
        Case 12
        Case 13
            Return day.ToString() + &quot;th&quot;
    End Select

    ' Start a new select case for the rest of the numbers
    Select Case day Mod 10
        Case 1
            ' The number is either 1 or 21 .. add a &quot;st&quot;
            Return day.ToString() + &quot;st&quot;
        Case 2
            ' The number is either a 2 or 22 .. add a &quot;nd&quot;
            Return day.ToString() + &quot;nd&quot;
        Case 3
            ' The number is either a 3 or 33 .. add a &quot;rd&quot;
            Return day.ToString() + &quot;rd&quot;
        Case Else
             ' Otherwise for everything else add a &quot;Th&quot;
            Return day.ToString() + &quot;th&quot;
    End Select
End Function
</pre>
<p>I was then able to use the function in an expression.</p>
<p>I wanted to format &#8220;01/01/2010&#8243; as &#8220;1st January 2010&#8243;. My expression was;</p>
<pre class="brush: vb; title: ; notranslate">
=Code.FormatOrdinal(Day(Fields!LETTERDATE.value)) &amp; &quot; &quot; &amp; MonthName(Month(Fields!LETTERDATE.value), False) &amp; &quot; &quot; &amp; Year(Fields!LETTERDATE.value)
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/03/04/ordinal-number-in-reporting-services/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Will_paginate with multiple models</title>
		<link>http://www.jigsawboys.com/2010/03/02/will_paginate-with-multiple-models/</link>
		<comments>http://www.jigsawboys.com/2010/03/02/will_paginate-with-multiple-models/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 06:39:08 +0000</pubDate>
		<dc:creator>Jamsi</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[paging]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[will_paginate]]></category>

		<guid isPermaLink="false">http://www.jigsawboys.com/?p=341</guid>
		<description><![CDATA[If you need to implement paging in your Ruby on Rails application, a quick and easy way is to use the fantastic &#8220;Will_Paginate&#8221; plugin (available here). However I came across a need to paginate multiple models on the same page, for example; a list of users and a list of groups. Luckily Google came to [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>If you need to implement paging in your Ruby on Rails application, a quick and easy way is to use the fantastic &#8220;Will_Paginate&#8221; plugin (<a href="http://wiki.github.com/mislav/will_paginate/" target="_blank">available here</a>).</p>
<p>However I came across a need to paginate multiple models on the same page, for example; a list of users and a list of groups.</p>
<p>Luckily Google came to the rescue with <a href="http://candidcode.com/2009/11/03/paginating-multiple-models-using-will_paginate-on-the-same-page/" target="_blank">this article</a>, which demonstrates the use of the :page option, allowing you to specify the page against a model object.</p>
<p>Check out the code below (courtesay of candidcode.com)</p>
<p><strong>Controller</strong></p>
<pre class="brush: ruby; title: ; notranslate">
@users = User.paginate(:page =&gt; params[:user_page], :per_page =&gt; 10)
@administrators = Administrator.paginate(:page =&gt; params[:administrator_page], :per_page =&gt; 10)
</pre>
<p><strong>View</strong></p>
<pre class="brush: ruby; title: ; notranslate">
&lt;%= will_paginate @users, :param_name =&gt; 'user_page' %&gt;
&lt;%= will_paginate @administrators, :param_name =&gt; 'administrator_page' %&gt;
</pre>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.jigsawboys.com/2010/03/02/will_paginate-with-multiple-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

