<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3185686173503381798</id><updated>2012-02-17T00:22:55.562Z</updated><category term='chrome'/><title type='text'>Cookie's Code</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://cookie-code.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://cookie-code.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>James</name><uri>http://www.blogger.com/profile/00649305830207117768</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3185686173503381798.post-7505979036813754976</id><published>2012-01-12T22:01:00.002Z</published><updated>2012-01-16T09:46:15.744Z</updated><title type='text'>Quick and dirty recursive FTP</title><content type='html'>I just brought a new QNAP NAS (TS-459 Pro II) - which is pretty cool, but I needed a way of getting all my files off the old NAS (which only supported FTP). QNAP doesn't come with lftp or any other ftp package that could do recursive gets so I started looking at scripting. I found a couple out there but all written in bash or ksh, both of which are not installed on the QNAP. These didn't work in plain old sh and I didn't fancy debugging them.&lt;br /&gt;&lt;br /&gt;In the end, I used wget from a shell on the QNAP to copy the files from my old NAS' ftp server:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;wget -r --level=20 -x -nH --cut-dirs=1 -nv 'ftp://user:password@192.168.1.69/Stuff'&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here's a list of the params I used:&lt;br /&gt;&lt;br /&gt;-r: recursive download&lt;br /&gt;--level: depth to go down to (wget has a maximum of 5 if this is not given)&lt;br /&gt;-x: create folders&lt;br /&gt;-nv: non-verbose, but not as quiet as '-q'&lt;br /&gt;-nH: Don't prefix the downloaded folder structure with the host name (in my case, '192.168.1.69')&lt;br /&gt;--cut-dirs=1: Don't prefix the downloaded folder structure with '/Stuff'&lt;br /&gt;&lt;br /&gt;Hope it helps&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3185686173503381798-7505979036813754976?l=cookie-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookie-code.blogspot.com/feeds/7505979036813754976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cookie-code.blogspot.com/2012/01/quick-and-dirty-recursive-ftp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/7505979036813754976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/7505979036813754976'/><link rel='alternate' type='text/html' href='http://cookie-code.blogspot.com/2012/01/quick-and-dirty-recursive-ftp.html' title='Quick and dirty recursive FTP'/><author><name>James</name><uri>http://www.blogger.com/profile/00649305830207117768</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3185686173503381798.post-2698064955692731219</id><published>2012-01-05T13:15:00.001Z</published><updated>2012-01-05T13:21:43.348Z</updated><title type='text'>Move non-standard subversion repository into github</title><content type='html'>I had some issues when trying to migrate my svn repo into git. I think the main problem was that the &lt;a href="http://help.github.com/import-from-subversion/" target="_blank"&gt;docs&lt;/a&gt;&amp;nbsp;assume that you have a standard svn layout (which I didn't).&lt;br /&gt;&lt;br /&gt;First, create your &lt;a href="https://github.com/repositories/new" target="_blank"&gt;github repo&lt;/a&gt;, but do &lt;b&gt;not&amp;nbsp;&lt;/b&gt;follow any of the commands that it suggests.&lt;br /&gt;&lt;br /&gt;Then run these commands instead:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;mkdir &amp;lt;name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;cd &amp;lt;name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;git svn clone -T http://&amp;lt;host&amp;gt;/&amp;lt;repo&amp;gt;/&amp;lt;path&amp;gt;/&amp;lt;to&amp;gt;/&amp;lt;name&amp;gt; .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;git remote add origin git@github.com:&amp;lt;github_username&amp;gt;/&amp;lt;name&amp;gt;.git&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;git push -u origin master&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;Tar-dah, all done!&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3185686173503381798-2698064955692731219?l=cookie-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookie-code.blogspot.com/feeds/2698064955692731219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cookie-code.blogspot.com/2012/01/move-non-standard-subversion-repository.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/2698064955692731219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/2698064955692731219'/><link rel='alternate' type='text/html' href='http://cookie-code.blogspot.com/2012/01/move-non-standard-subversion-repository.html' title='Move non-standard subversion repository into github'/><author><name>James</name><uri>http://www.blogger.com/profile/00649305830207117768</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3185686173503381798.post-771957282269254134</id><published>2012-01-05T12:54:00.000Z</published><updated>2012-01-05T12:54:00.249Z</updated><title type='text'>Some common linux commands that I forget</title><content type='html'>&lt;div&gt;Check for dodgy logins :&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;cat /var/log/auth.log | grep 'Accepted password '&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Get something off the NAS as nother user :&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;sudo su tomcat -c 'lftp admin@192.168.1.69/development/Java/blah'&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check ubuntu version&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;cat /etc/issue&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Update&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;sudo apt-get update&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;sudo apt-get upgrade&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;sudo apt-get dist-upgrade&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;Show packages&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;dpkg --get-selections&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Check tomcat&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;less /var/lib/tomcat6/logs/catalina.out&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3185686173503381798-771957282269254134?l=cookie-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookie-code.blogspot.com/feeds/771957282269254134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cookie-code.blogspot.com/2012/01/some-common-linux-commands-that-i.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/771957282269254134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/771957282269254134'/><link rel='alternate' type='text/html' href='http://cookie-code.blogspot.com/2012/01/some-common-linux-commands-that-i.html' title='Some common linux commands that I forget'/><author><name>James</name><uri>http://www.blogger.com/profile/00649305830207117768</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3185686173503381798.post-44344099421846029</id><published>2012-01-04T23:35:00.001Z</published><updated>2012-01-04T23:37:53.865Z</updated><title type='text'>I Hate Facebook</title><content type='html'>Why do they insist on changing their API without prior notice? My users had been complaining since mid&amp;nbsp;December&amp;nbsp;that it wasn't working, but I hadn't got around to looking at it...&lt;br /&gt;&lt;br /&gt;Their latest change had me foxed for over an hour as it wasn't obvious what was wrong. It just looked as though &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;FB.Auth._loadState&lt;/span&gt; was stuck as "loading" and therefore my call-back from &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;FB.getLoginStatus&lt;/span&gt; was never getting executed. Turns out that is a problem with running as localhost!&lt;br /&gt;&lt;br /&gt;The actual problem was that they had changed the&amp;nbsp;response object that gets handed to the call-back, I was checking for &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;response.session&lt;/span&gt; but it is now &lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;response.authResponse&lt;/span&gt;, to be fair the new way is documented&amp;nbsp;&lt;a href="http://developers.facebook.com/docs/reference/javascript/FB.getLoginStatus/" target="_blank"&gt;here&lt;/a&gt;, but no mention that it had changed recently - thanks.&lt;br /&gt;&lt;br /&gt;All working again now though...enjoy:&amp;nbsp;&lt;a href="http://apps.facebook.com/panoramio/" target="_blank"&gt;http://apps.facebook.com/panoramio/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3185686173503381798-44344099421846029?l=cookie-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookie-code.blogspot.com/feeds/44344099421846029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cookie-code.blogspot.com/2012/01/i-hate-facebook.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/44344099421846029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/44344099421846029'/><link rel='alternate' type='text/html' href='http://cookie-code.blogspot.com/2012/01/i-hate-facebook.html' title='I Hate Facebook'/><author><name>James</name><uri>http://www.blogger.com/profile/00649305830207117768</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3185686173503381798.post-52096158630190858</id><published>2011-12-09T22:08:00.000Z</published><updated>2011-12-09T22:08:24.272Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><title type='text'>Chrome Crash</title><content type='html'>Ack! Chrome crashed and didn't ask me if I wanted to restore when it came back (as it updated itself?)&lt;br /&gt;&lt;br /&gt;Maybe not a problem if you have a few tabs open - but I'm a tab-aholic; I have 15 windows open, each with an average of 10 tabs. You try remembering what all those 150 tabs were!&lt;br /&gt;&lt;br /&gt;Anyway, after a lot of google searching (who would have thought that "chrome restore session" &amp;amp; "chrome has lost my last session" would not turn up useful tips), I finally stumbled upon &lt;a href="http://bashelton.com/2011/06/how-to-unclobber-your-last-session-in-google-chrome/"&gt;http://bashelton.com/2011/06/how-to-unclobber-your-last-session-in-google-chrome/&lt;/a&gt; - it saved my life (well, session at least)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3185686173503381798-52096158630190858?l=cookie-code.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://cookie-code.blogspot.com/feeds/52096158630190858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://cookie-code.blogspot.com/2011/12/chrome-crash.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/52096158630190858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3185686173503381798/posts/default/52096158630190858'/><link rel='alternate' type='text/html' href='http://cookie-code.blogspot.com/2011/12/chrome-crash.html' title='Chrome Crash'/><author><name>James</name><uri>http://www.blogger.com/profile/00649305830207117768</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
