<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 <title>nickcharlton.net</title>
 <link href="http://nickcharlton.net/atom.xml" rel="self"/>
 <link href="http://nickcharlton.net/" />
 <updated>2010-02-26T09:16:47-08:00</updated>
 <id>http://nickcharlton.net/</id>
 <author>
   <name>Nick Charlton</name>
   <email>nickcharlton91@gmail.com</email>
 </author>
 
 <entry>
   <id>http://nickcharlton.net/blog/fixing-missing-gem-problems</id>
   <link href="http://nickcharlton.net/blog/fixing-missing-gem-problems"/>
   <title>Fixing Missing Gem Problems on OS X</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Fixing Missing Gem Problems on OS X&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Disclaimer: This could potentially bugger up Ruby and Ruby Gems on your machine, proceed carefully.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Recently I've been doing quite a few &lt;a href=&quot;http://en.wikipedia.org/wiki/REST&quot; title=&quot;Representational State Transfer - Wikipedia, the free encyclopedia&quot;&gt;REST&lt;/a&gt; API building stuffs with &lt;a href=&quot;http://www.ruby-lang.org/en/&quot; title=&quot;Ruby Programming Language&quot;&gt;Ruby&lt;/a&gt;, &lt;a href=&quot;http://www.sinatrarb.com/&quot; title=&quot;Sinatra&quot;&gt;Sinatra&lt;/a&gt; and trying to pick up &lt;a href=&quot;http://ar.rubyonrails.org/&quot; title=&quot;Active Record -- Object-relation mapping put on rails&quot;&gt;ActiveRecord&lt;/a&gt; to use with Rails. I was however getting quite a lot of problems with Gems loading, but not loading completely.&lt;/p&gt;

&lt;p&gt;If when running &lt;code&gt;gem check --alien&lt;/code&gt;, you get something similar to below:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt; rails-1.2.6 has 2 problems
        /Library/Ruby/Gems/1.8/specifications/rails-1.2.6.gemspec:
        Spec file doesn&amp;#39;t exist for installed gem

        /Library/Ruby/Gems/1.8/cache/rails-1.2.6.gem:
        missing gem file /Library/Ruby/Gems/1.8/cache/rails-1.2.6.gem
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Clear out all of the gems located in the following directories. You will need to similarly remove anything in the bin/, cache/, doc/, gems/ and specifications/ directories.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt; /Library/Ruby/Gems/1.8
    /Users/&amp;lt;username&amp;gt;/.gem/ruby/1.8
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;(These directories can be found by entering &lt;code&gt;gem environment&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;You will then need to reinstall all of your gems. You may wish to issue a &lt;code&gt;gem check&lt;/code&gt; on each of them to ensure it's all good.&lt;/p&gt;
</content>
   <updated>2010-02-26T00:00:00-08:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/thoughts-ipad</id>
   <link href="http://nickcharlton.net/blog/thoughts-ipad"/>
   <title>Thoughts on the iPad</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Thoughts on the iPad&lt;/h2&gt;

&lt;p&gt;Tablets and small computers have always interested me. My iPhone is a great little mobile computer - the internet in the palm of your hand, and the rest of that..&lt;/p&gt;

&lt;p&gt;The thing is, I've never seen the actual &lt;em&gt;point&lt;/em&gt; of tablets. They are generally not convenient enough to make them worthwhile, the wrong size, too limited and have an awful input mechanism.&lt;/p&gt;

&lt;p&gt;There was an &lt;a href=&quot;http://news.ycombinator.com/item?id=1077772&quot; title=&quot;Hacker News | The Healthcare System: An Apple Tablet's Biggest Opportunity&quot;&gt;interesting discussion on Hacker News&lt;/a&gt; earlier today about tablets in medicine. The article itself suggested that tablets would be a great way for doctors to enter information about patients - forgetting of course that paper has worked wonderfully since pre-Nightingale and such an adaption would be an uphill struggle. Anyway, I digress.&lt;/p&gt;

&lt;p&gt;From &lt;a href=&quot;http://nickcharlton.net/blog/new-macbook-pro&quot; title=&quot;nickcharlton.net/blog&quot;&gt;my rather biased perspective&lt;/a&gt;, I think Apple has done something interesting with the &quot;iPad&quot;.&lt;/p&gt;

&lt;p&gt;The interesting bit here, at least, I think, is their showing off of iWork on the device. The biggest issue with such a device is text input. Being just a large screen, there's not the ability to easily enter text. The iPhone isn't a bad, if a little small, but still a pretty good mobile keypad, the iPad is similar, although on a larger scale.&lt;/p&gt;

&lt;p&gt;What I can't see though is the gap between the iPhone and the MacBook models. Therefore, I don't think it's revolutionary, at all.&lt;/p&gt;

&lt;p&gt;I find reading to be quite possible on both my iPhone and MacBook Pro, leading me to not need something to fit in that gap. At least, not with just a LCD screen. e-Ink would be something different entirely, reading of an LCD screen is tiring on the eyes.&lt;/p&gt;

&lt;p&gt;I can't see why you would use such a device for writing a document when a laptop is far nicer and why you would use such a device for watching TV, recorded or otherwise.&lt;/p&gt;

&lt;p&gt;What I do think is clever though is the price point. It's not cheap enough that I would buy one - not least at the 3G end of the scale, but priced cleverly enough to provide another option for people looking for a new machine.&lt;/p&gt;

&lt;p&gt;Maybe the revolutionary aspect is producing a excellent, portable device?&lt;/p&gt;

&lt;p&gt;I intend to see it pan out, I can't see me buying one, but it's interesting, none-the-less.&lt;/p&gt;
</content>
   <updated>2010-01-27T00:00:00-08:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/ideas-and-university</id>
   <link href="http://nickcharlton.net/blog/ideas-and-university"/>
   <title>Ideas and University</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Ideas and University&lt;/h2&gt;

&lt;p&gt;It's been a while since I've written down a set of thoughts. Most of which occurred before I started University. What I do want to ponder here I will come to in a moment, but now I've been at University for nearly 4 months - I'm trailing on to the end of the first term.&lt;/p&gt;

&lt;p&gt;It has certainly been a experience, but something I thought would be overly more strenuous and complex. Especially after the first few weeks. Unfortunately, it has not been like what I had hoped. I certainly don't find the amount of work I'm given hard enough - or even to the level of other's at different Universities and the topics covered never seem to go into the depth I'd like. All in all, it either feels like I'm not learning anything or that I am rather having to teach myself.&lt;/p&gt;

&lt;p&gt;Arguably this is a failing of the University itself and speaking with &lt;a href=&quot;http://bma.subvert.org.uk/&quot; title=&quot;~bma &amp;mdash; Home&quot;&gt;others&lt;/a&gt; the first year doesn't appear to change, and &lt;a href=&quot;http://twitter.com/rossbearman&quot;&gt;some&lt;/a&gt; have stated that the second year is not much better.&lt;/p&gt;

&lt;p&gt;What I do want to talk about though are ideas. Ideas are those amazing things you dream up doing and in most people's cases, don't get the chance to execute them. I used to have a constant flow of such things. Possible projects flying out of my ears just waiting to be executed.&lt;/p&gt;

&lt;p&gt;Since getting to Plymouth though, that all seems to have changed. I have ended up having passing possibles, rather than something that sticks for any reasonable amount of time.&lt;/p&gt;

&lt;p&gt;Quite possibly this down to not specifically having any problems to solve, or indeed too many options to solve it, neither of them which are worth spending time on.&lt;/p&gt;

&lt;p&gt;As an example, I have been meaning to launch something of substance on &lt;a href=&quot;http://heroku.com/&quot; title=&quot;Heroku | Ruby Cloud Platform as a Service&quot;&gt;Heroku&lt;/a&gt; for a while. Could do with patching up my Ruby knowledge by writing some client-side apps, rather than simple ideas executed with Sinatra and then abandoned. Similarly, I haven't used C for a while, would like to learn some Objective-C for Mac development (and Cocoa, obviously) but have no reasons to push ahead with it. No project idea generally means that I merely read and plan about either a project, or something new (like a framework) and not end up with something at the end.&lt;/p&gt;

&lt;p&gt;As part of my course, I am supposed to be learning C#, half of my problem here is that I don't use Windows and therefore I don't have a need to build anything there. Although, fortunately I seem to be able to pick  it up quite easily.&lt;/p&gt;

&lt;p&gt;So, instead of spending my time working on something specific I am slowly reading through a mountain of books. To run off a list off the top of my head:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.co.uk/gp/product/0596529864?ie=UTF8&amp;amp;amp;tag=nisbl-21&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1634&amp;amp;amp;creative=19450&amp;amp;amp;creativeASIN=0596529864&quot; title=&quot;Learning Ruby: Amazon.co.uk: Michael Fitzgerald: Books&quot;&gt;Learning Ruby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.co.uk/gp/product/0596102097?ie=UTF8&amp;amp;amp;tag=nisbl-21&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1634&amp;amp;amp;creative=19450&amp;amp;amp;creativeASIN=0596102097&quot; title=&quot;Learning C# 2005, Second Edition: Amazon.co.uk: Jesse Liberty, Brian MacDonald: Books&quot;&gt;Learning C# 2005&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.co.uk/gp/product/0470147628?ie=UTF8&amp;amp;amp;tag=nisbl-21&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1634&amp;amp;amp;creative=19450&amp;amp;amp;creativeASIN=0470147628&quot; title=&quot;Beginning Linux Programming: Amazon.co.uk: Neil Matthew, Richard Stones: Books&quot;&gt;Beginning Linux Programming&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.co.uk/gp/product/0596529260?ie=UTF8&amp;amp;amp;tag=nisbl-21&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1634&amp;amp;amp;creative=19450&amp;amp;amp;creativeASIN=0596529260&quot; title=&quot;RESTful Web Services: Amazon.co.uk: Leonard Richardson, Sam Ruby: Books&quot;&gt;RESTful Web Services&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;ttp://www.amazon.co.uk/gp/product/1430218096?ie=UTF8&amp;amp;amp;tag=nisbl-21&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1634&amp;amp;amp;creative=19450&amp;amp;amp;creativeASIN=1430218096&quot;&gt;Learn C on the Mac&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;and finally: &lt;a href=&quot;http://www.amazon.co.uk/gp/product/0321503619?ie=UTF8&amp;amp;amp;tag=nisbl-21&amp;amp;amp;linkCode=as2&amp;amp;amp;camp=1634&amp;amp;amp;creative=19450&amp;amp;amp;creativeASIN=0321503619&quot; title=&quot;Cocoa Programming for Mac OS X: Amazon.co.uk: Aaron Hillegass: Books&quot;&gt;Cocoa Programming for Mac OS X&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;I do also have a couple of UK-centric business books which I'm slowly attacking, although there is not much point (bar the background reading) to learn about that when I have nothing to execute!&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;mailto:&amp;amp;#x6E;&amp;amp;#x69;&amp;amp;#x63;&amp;amp;#x6B;&amp;amp;#x63;&amp;amp;#x68;&amp;amp;#x61;&amp;amp;#x72;&amp;amp;#x6C;&amp;amp;#x74;&amp;amp;#x6F;&amp;amp;#x6E;&amp;amp;#x39;&amp;amp;#x31;&amp;amp;#x40;&amp;amp;#x67;&amp;amp;#x6D;&amp;amp;#x61;&amp;amp;#x69;&amp;amp;#x6C;&amp;amp;#x2E;&amp;amp;#x63;&amp;amp;#x6F;&amp;amp;#x6D;&quot;&gt;You can of course put an idea on a postcard.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Of course this &quot;lack of ideas&quot; could instead be covering another problem. Instead I may have lost the passion I used to have for simple things that felt worthwhile building. Whether that is a good or bad thing, I'm not sure. Possibly better in the sense that I end up not starting and then stopping projects, but not so great in the sense that in four months I have produced nothing.&lt;/p&gt;

&lt;p&gt;Retrospect is a wonderful thing and the last few weeks can be looked back upon with the odd test, only three assignments, and a pretty dodgy sleep pattern for me to look back upon. Don't get me wrong, University is worth it's while, however when you feel you are getting nowhere (because it's too simple), it's easy to wonder if being somewhere is worth it's time.&lt;/p&gt;

&lt;p&gt;So now, my general week consists of 5/6 lecture slots, sinking my way through some quite heavy books, eventually learning the Guitar and spending just a little too much money. That's quite a far cry from the last two years. Maybe I shouldn't complain?&lt;/p&gt;
</content>
   <updated>2009-11-03T00:00:00-08:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/jekyll-and-github</id>
   <link href="http://nickcharlton.net/blog/jekyll-and-github"/>
   <title>Jekyll and GitHub</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Jekyll and GitHub&lt;/h2&gt;

&lt;p&gt;After quite a bit of work, I have finally moved over to using GitHub pages, Jekyll and Markdown to power &lt;a href=&quot;http://nickcharlton.net&quot; title=&quot;nickcharlton.net&quot;&gt;nickcharlton.net&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;From now on, this is a Git repository made up of Markdown files and a sprinkling of HTML. This comes with quite a few benefits, those of which I hope to explain below.&lt;/p&gt;

&lt;h3&gt;Versioning &amp;amp; Backup&lt;/h3&gt;

&lt;p&gt;As it is powered primarily by Git, each post has version tracking without any extra effort. This was recently added to Wordpress, instead of a clean solution, this just turned to make the database even more of a mess than it already was.&lt;/p&gt;

&lt;p&gt;Secondly, due to the distributed nature of Git, I always have two copies. One is served up at GitHub, and the other is my working copy stored locally on my main machine. On top of this, other people can fork it, adding more backups.&lt;/p&gt;

&lt;h3&gt;Security &amp;amp; Access&lt;/h3&gt;

&lt;p&gt;Without the intention of using this primarily as a vehicle for moaning about Wordpress, this is another of it's issues. Certainly the two most important issues are security and access to the content.&lt;/p&gt;

&lt;p&gt;As is typical with any large dynamic project, it's going to have security issues. This means that new versions of Wordpress are routinely rolled out, this means that you need to keep up-to-date with the latest build to keep your writings safe.&lt;/p&gt;

&lt;p&gt;Next, is access of the posts themselves. They're stored in a MySQL database. This both means that accessing the individual posts requires accessing the database, rather than just opening a file. Opening a flat HTML file will always scale better than a solution which involves reloading the same information from a database on each connection (presuming no caching is used).&lt;/p&gt;

&lt;h3&gt;The Source&lt;/h3&gt;

&lt;p&gt;You can find the source on &lt;a href=&quot;http://github.com/nickcharlton/nickcharlton.github.com&quot;&gt;GitHub&lt;/a&gt;. Please feel free to reuse any parts which are not posts without attribution. The posts themselves are licensed under a Creative Commons Attribution-Non-Commercial-Share Alike license. You can read more about that in the &lt;a href=&quot;http://github.com/nickcharlton/nickcharlton.github.com/blob/master/README.markdown&quot;&gt;README&lt;/a&gt;.&lt;/p&gt;
</content>
   <updated>2009-10-05T00:00:00-07:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/ssh-public-key-screencast-notes</id>
   <link href="http://nickcharlton.net/blog/ssh-public-key-screencast-notes"/>
   <title>SSH Public Key Screencast Notes</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;SSH Public Key Screencast Notes&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;These are just a few quick notes to accompany &lt;a href=&quot;http://vimeo.com/6523718&quot;&gt;Peter Upfold's screencast&lt;/a&gt;. If you haven't ready I would suggest you give it a watch before following this rather brief notes&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;On the local machine&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;run: &lt;code&gt;ssh-keygen -t rsa&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Accept default path.&lt;/li&gt;
&lt;li&gt;Enter a passphrase. (terminal can save this in Keychain)&lt;/li&gt;
&lt;li&gt;Finder &gt; Go &gt; Type: &quot;.ssh&quot;&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;id_rsa.pub&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;On the remote machine&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;run: &lt;code&gt;touch .ssh/authorized_keys&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Edit the file: &lt;code&gt;.ssh/authorised_keys&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Paste the contents of the &lt;code&gt;id_rsa.pub&lt;/code&gt; file into &lt;code&gt;.ssh/authorized_keys&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;Permissions Check&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;code&gt;authorized_keys&lt;/code&gt; file needs to be &lt;code&gt;rw&lt;/code&gt; for the user.&lt;/li&gt;
&lt;li&gt;That is &lt;code&gt;chmod 600&lt;/code&gt; to change, if needed.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Logging in&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Login as usual from the Terminal.&lt;/li&gt;
&lt;li&gt;When asked for the password to the ssh key, this is the passphrase mentioned earlier.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;em&gt;Once again, thank you, &lt;a href=&quot;http://peter.upfold.org.uk&quot;&gt;Peter&lt;/a&gt; for recording it for me, and the mention.&lt;/em&gt;&lt;/p&gt;
</content>
   <updated>2009-09-18T00:00:00-07:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/new-macbook-pro</id>
   <link href="http://nickcharlton.net/blog/new-macbook-pro"/>
   <title>New MacBook Pro</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;New MacBook Pro&lt;/h2&gt;

&lt;h3&gt;Intro&lt;/h3&gt;

&lt;p&gt;Yesterday my new MacBook Pro arrived. It's a 2.66Ghz model with a Matte screen. It really is wonderful. It's certainly the fastest, and most custom machine I've had. Coupled with the &lt;a href=&quot;http://nickio.posterous.com/a-few-notes-on-the-apple-education-store&quot; title=&quot;A Few Notes on the Apple Education Store - Nick Charlton&quot;&gt;Apple Student Discount&lt;/a&gt;, it does end up working affordable.&lt;/p&gt;

&lt;p&gt;Last night I tested out the power of this machine. There's various things which I couldn't do which I now can. Today &lt;a href=&quot;http://nickio.posterous.com/macbook-pro-some-photos&quot; title=&quot;MacBook Pro: Some Photos - Nick Charlton&quot;&gt;I took some photos&lt;/a&gt; (ones of the Matte screen are rather thin on the ground).&lt;/p&gt;

&lt;h3&gt;Flash&lt;/h3&gt;

&lt;p&gt;I can play Flash. Especially HD flash, I rather liked watching the HD shorts on Vimeo but this had to come to a halt a while back as I wasn't able to use it. It got to the point where I couldn't even use YouTube, so it's quite a difference.&lt;/p&gt;

&lt;p&gt;Last night I watched some iPlayer content in HD - the difference in it not stuttering is quite different.&lt;/p&gt;

&lt;p&gt;Interestingly; Flash in Snow Leopard (could have also been before) is now a separate process. So Flash itself uses ~170% CPU, whilst Safari uses &amp;lt;10%.&lt;/p&gt;

&lt;h3&gt;Development&lt;/h3&gt;

&lt;p&gt;Development should be faster. I was having lag of minutes at times using TextMate, especially as I typically develop server side using ExpanDrive to aid with using SFTP. This also meant quite a few things have fallen behind where I'd like them, or I haven't put the effort in where I should. This really was a reflection of my main development environment rather than me, a pain, but now that bottleneck is gone.&lt;/p&gt;

&lt;p&gt;So now, hopefully various things will be given a kick up the backside into getting started, finished or otherwise.&lt;/p&gt;

&lt;h3&gt;In Conclusion&lt;/h3&gt;

&lt;p&gt;All in all, everything is great. Things are slotting together ready for my move over to Plymouth for University. So if you're around, pop me an email and visit!&lt;/p&gt;
</content>
   <updated>2009-09-12T00:00:00-07:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/public-key-auth-screencast</id>
   <link href="http://nickcharlton.net/blog/public-key-auth-screencast"/>
   <title>Public Key Auth Screencast</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Public Key Auth Screencast&lt;/h2&gt;

&lt;p&gt;After a request by &lt;a href=&quot;http://twitter.com/nickcharlton/status/3884874880&quot;&gt;Peter Upfold&lt;/a&gt; on Twitter for ideas for a screencast, I suggested he do something on Public Key Authentication. My wish was made true as he made it up yesterday.&lt;/p&gt;

&lt;p class=&quot;center&quot;&gt;&lt;object width=&quot;400&quot; height=&quot;300&quot;&gt;&lt;param name=&quot;allowfullscreen&quot; value=&quot;true&quot; /&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot; /&gt;&lt;param name=&quot;movie&quot; value=&quot;http://vimeo.com/moogaloop.swf?clip_id=6523718&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; /&gt;&lt;embed src=&quot;http://vimeo.com/moogaloop.swf?clip_id=6523718&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1&quot; type=&quot;application/x-shockwave-flash&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; width=&quot;400&quot; height=&quot;300&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/p&gt;


&lt;p&gt;I was rather surprised to hear myself mentioned, so a huge hat tip (presumes a huge hat, I guess...) to Peter for doing that.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;
</content>
   <updated>2009-09-11T00:00:00-07:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/configuring-sudo-on-debian</id>
   <link href="http://nickcharlton.net/blog/configuring-sudo-on-debian"/>
   <title>Configuring Sudo on Debian</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Configuring Sudo on Debian&lt;/h2&gt;

&lt;p&gt;Setting up sudo on Debian can seem daunting at first, but the process is really quite simple.&lt;/p&gt;

&lt;p&gt;To do this you must use the command &quot;visudo&quot;. Whilst you do not need to use &quot;vi/vim&quot; to do the actual editing (as it will use your preferred editor as listed in .bashrc), you will not be able to save changes.&lt;/p&gt;

&lt;p&gt;From here you will see the config file. Under &quot;# User alias specification&quot; you will want to list the users required to access. You can comma separate values here.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# User alias specification
User_Alias STAFF nickcharlton, otheruser
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Next, although optional, it is possible to specify the applications that the user can run.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Cmnd alias specification
Cmnd_Alias DEB = /usr/bin/apt-get
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Similarly, this section can be comma separated. On a system where it's users can be trusted at a higher level, it's not important to drill down tightly on these.&lt;/p&gt;

&lt;p&gt;Next, you need to allow access under the &quot;# User privilege specification&quot;. Where no commands have been specified it is appropriate to simply duplicate that of the root user.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# User privilege specification
root ALL=(ALL) ALL
MAINTAINERS ALL = DEB
STAFF ALL-(ALL) ALL
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that's it. Another simple task, which at first can seem a little daunting.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Sources: &lt;a href=&quot;http://newbiedoc.berlios.de/wiki/How_to_configure_Sudo_to_run_programs_as_a_different_user&quot;&gt;NewbieDoc: Configuring Sudo to Run Programs as Another User&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content>
   <updated>2009-06-26T00:00:00-07:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/ssh-banner-debian</id>
   <link href="http://nickcharlton.net/blog/ssh-banner-debian"/>
   <title>Configuring an SSH banner on Debian</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Configuring an SSH banner on Debian&lt;/h2&gt;

&lt;p&gt;Configuring a &quot;Welcome Banner&quot; is a great way to notify your users about the machine they are about to login to. I personally use this to inform the user of the IP, Hostname, OS version and someone to contact.&lt;/p&gt;

&lt;p&gt;Edit the file under &quot;/etc/motd&quot;.&lt;/p&gt;

&lt;p&gt;Change this to something informative such as the below:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;========================================
=         Welcome to Hitchcock         =
=  IP: 10.10.10.10                     =
=  Hostname: hitchcock.example.com     =
=  OS: Debian 5.01/Lenny               =
========================================
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Just a short one this, but useful to know.&lt;/p&gt;
</content>
   <updated>2009-06-24T00:00:00-07:00</updated>
 </entry>
 
 <entry>
   <id>http://nickcharlton.net/blog/introduction-to-sqlite-2-with-php-5</id>
   <link href="http://nickcharlton.net/blog/introduction-to-sqlite-2-with-php-5"/>
   <title>Introduction to SQLite 2 with PHP 5</title>
   <author>
     <name>Nick Charlton</name>
     <email>nickcharlton91@gmail.com</email>
   </author>
   <content type="html">&lt;h2&gt;Introduction to SQLite 2 with PHP 5&lt;/h2&gt;

&lt;p&gt;Where a full &lt;acronym title=&quot;Relational Database Management System&quot;&gt;RDBMS&lt;/acronym&gt; is unnecessary, &lt;a href=&quot;http://www.sqlite.org/&quot; title=&quot;SQLite Home Page&quot;&gt;SQLite&lt;/a&gt; provides the perfect stand in. However, most articles are based around the Object-Orientated way of dealing with SQLite in PHP. This article provides an explanation of how to use it procedurally.&lt;/p&gt;


&lt;h2&gt;Points&lt;/h2&gt;


&lt;p&gt;A couple of things to note before going ahead and using SQLite are that:&lt;/p&gt;


&lt;ul&gt;
    &lt;li&gt;The directory and the database need to be writable from the web server.&lt;/li&gt;
    &lt;li&gt;As it is simply a flatfile, this should be stored where it cannot be accessed by browsers.&lt;/li&gt;
    &lt;li&gt;Where an &quot;auto_increment&quot; field is used in MySQL, it should be created by specifying &quot;INTEGER PRIMARY KEY&quot; when configuring the table. This is further explained later.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Opening a SQLite DB&lt;/h2&gt;


&lt;p&gt;Opening an SQLite Database is quite simple. The &quot;sqlite_open&quot; function is assigned to a variable which is then used to indicate that database later on in queries. If the database does not already exist then it will be created upon opening.&lt;/p&gt;


&lt;p&gt;The file extension need not be .db, it may be anything, or even have none. The directory which is referenced should be both outside of the web root and writable by the server user. On Debian Etch with Apache, the user is &quot;www-data&quot;.&lt;/p&gt;


&lt;pre lang=&quot;php&quot;&gt;
    $db = sqlite_open(&quot;../db/name.db&quot;);
&lt;/pre&gt;


&lt;h2&gt;Creating a table&lt;/h2&gt;


&lt;p&gt;Before data can be written or read to a Database, a table needs to be created to hold it. The the line below runs a CREATE query which describes the table which will be created. Whilst I do not wish to explain how to use SQL in this article, the following creates a table with two fields, one (called &quot;id&quot;) which automatically increments in regards to it's value and is set as a primary key and the second, called &quot;name&quot; containing text of up to 255 characters. The table itself is called &quot;example&quot;. The &lt;a href=&quot;http://www.sqlite.org/lang.html&quot; title=&quot;Query Language Understood by SQLite&quot;&gt;SQLite Documentation&lt;/a&gt; provides a good guide behind the syntax.&lt;/p&gt;


&lt;pre lang=&quot;php&quot;&gt;
    sqlite_query($db, &quot;CREATE TABLE example (id INTEGER PRIMARY KEY, name CHAR(255))&quot;);
&lt;/pre&gt;


&lt;h2&gt;Inserting data&lt;/h2&gt;


&lt;p&gt;To insert data, the &quot;sqlite_query&quot; function is used which specifies the database in the first part, and then the query behind it.&lt;/p&gt;


&lt;p&gt;The query in this example inserts the name &quot;Nick&quot; into the field &quot;name&quot; in the table &quot;example&quot;. As the field &quot;id&quot; auto increments, it is not necessary to specify a value for it.&lt;/p&gt;


&lt;pre lang=&quot;php&quot;&gt;
    sqlite_query($db, &quot;INSERT INTO example (name) VALUES ('Nick')&quot;);
&lt;/pre&gt;


&lt;h2&gt;Querying data&lt;/h2&gt;


&lt;p&gt;The following line would fetch all of the data in the table &quot;example&quot; and display it as a &quot;printed array&quot;.&lt;/p&gt;


&lt;pre lang=&quot;php&quot;&gt;
    $result = sqlite_query($db, &quot;SELECT * FROM table&quot;);
    while ($row = sqlite_fetch_array($result)) {
        echo &quot;&amp;lt;pre&gt;&quot;;
        print_r($row);
        echo &quot;&amp;lt;/pre&gt;&quot;;
    }
&lt;/pre&gt;


&lt;p&gt;On an alternative note, such a method can be used to see the contents of a query and check the names of fields, at least in development.&lt;/p&gt;


&lt;h2&gt;Further Reading&lt;/h2&gt;


&lt;p&gt;Whilst this article focuses on the procedural method built into PHP 5 (which incidentally is limited to SQLite 2), SQLite can also be accessed through &lt;acronym title=&quot;PHP Data Objects&quot;&gt;PDO&lt;/acronym&gt; and through the Object Orientated Method.&lt;/p&gt;


&lt;p&gt;Further (and more complete) code examples can been seen on &lt;a href=&quot;http://nickio.tumblr.com/&quot; title=&quot;nickio&quot;&gt;my code snippets blog&lt;/a&gt;.&lt;/p&gt;


&lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;http://php.net/sqlite&quot; title=&quot;PHP: SQLite - Manual&quot;&gt;PHP Manual: SQLite&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://www.devshed.com/c/a/PHP/Introduction-to-Using-SQLite-with-PHP-5/&quot; title=&quot;Introduction to Using SQLite with PHP 5&quot;&gt;Object Orientated SQLite, Devshed&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;http://devzone.zend.com/article/863&quot; title=&quot;SQLite: Lean, Mean DB Machine&quot;&gt;SQLite 3 with PDO, Zend DevZone&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
   <updated>2009-05-18T00:00:00-07:00</updated>
 </entry>
 
</feed>
