<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <id>http://danharper.me/</id>
  <title>Dan Harper</title>
  <updated>2011-03-17T00:00:00Z</updated>
  <link rel="alternate" href="http://danharper.me/" />
  
  <author>
    <name>Dan Harper</name>
    <uri>http://danharper.me</uri>
  </author>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/danharper" /><feedburner:info uri="danharper" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <id>tag:danharper.me,2011-02-06:/blog/php5-social-networking-review/</id>
    <title type="html">Book Review - PHP 5 Social Networking</title>
    <published>2011-02-06T00:00:00Z</published>
    <updated>2011-02-06T00:00:00Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/danharper/~3/LuVRxxz05gc/" />
    <content type="html">&lt;p&gt;The guys at Packt Publishing recently emailed me asking if I’d be interested in reviewing their latest book, &lt;a href="https://www.packtpub.com/php-create-powerful-dynamic-social-networking-website/book"&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; 5 Social Networking&lt;/a&gt; by Michael Peacock. Of course I jumped at the chance of receiving another free book!&lt;/p&gt;
&lt;p&gt;The book guides you through the process of building a fully-featured social networking site for Dinosaur owners, complete with user profiles, a status stream, events and groups. While the book pushes itself as a ‘social networking’ book, everything you will learn is adaptable to any type of site – the social network is simply the demo application you will build.&lt;/p&gt;
&lt;p&gt;The book starts you off by building an &lt;span class="caps"&gt;MVC&lt;/span&gt; framework on which the rest of the application will be built upon. &lt;span class="caps"&gt;MVC&lt;/span&gt;, for those unfamiliar, stands for Model-View-Controller and is a programming style whereby your code is split into three logic sections. The Controller processes a user’s request and calls the relevant models and files which will be needed. The Model handles database interaction, and the View is the template the data will be displayed in. The idea is to not have large chunks of &lt;span class="caps"&gt;PHP&lt;/span&gt; code mixed in with your &lt;span class="caps"&gt;HTML&lt;/span&gt; layout files (after all, you wouldn’t include &lt;span class="caps"&gt;CSS&lt;/span&gt; in your &lt;span class="caps"&gt;HTML&lt;/span&gt;, so why big chunks of &lt;span class="caps"&gt;PHP&lt;/span&gt; logic?)&lt;/p&gt;
&lt;p&gt;The framework itself is completely application-agnostic and can be re-used on any other web application project you have.&lt;/p&gt;
&lt;p&gt;Michael does a great job demonstrating the best way to do a task. You learn to build your own database class for handling database interaction instead of relying on PHP’s ageing mysql() class.&lt;/p&gt;
&lt;p&gt;You also build your own templating system which allows you to simplify your views and stripping out all &lt;span class="caps"&gt;PHP&lt;/span&gt; code. From example instead of having &lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;?php echo $user-&amp;gt;username; ?&amp;gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; or something similar, you will use &lt;code&gt;&amp;lt;h1&amp;gt;{username}&amp;lt;/h1&amp;gt;&lt;/code&gt;. There’s a big argument over the use of a templating system in &lt;span class="caps"&gt;PHP&lt;/span&gt; applications and personally I prefer using &lt;span class="caps"&gt;PHP&lt;/span&gt; code instead of some pseudo-template-language, but it’s still a great piece of functionality to add into an app and it’s handled perfectly.&lt;/p&gt;
&lt;p&gt;One surprising addition to the book is Chapter 11, “Developing an &lt;span class="caps"&gt;API&lt;/span&gt;” which guides you through the implementation of an &lt;span class="caps"&gt;API&lt;/span&gt; to allow third parties to access sections of your application just like the one Facebook, Twitter and most other social sites provide. This chapter proved very useful.&lt;/p&gt;
&lt;p&gt;The final three chapters, “Deployment, Security and Maintenance”, “Marketing, &lt;span class="caps"&gt;SEO&lt;/span&gt;, User Retention and Monetization Strategies” and “Planning for Growth” all provide some great information for running a &lt;span class="caps"&gt;PHP&lt;/span&gt; site. The chapters are quite vague in their actual implementation (which is understandable as you could write an entire book on each topic) but prove to offer a wealth of useful information.&lt;/p&gt;
&lt;p&gt;One thing I did find lacking was testing. There’s no mention of unit testing which I feel would be useful on an application of this size where it could be quite easy to accidentally break a feature while altering some core files.&lt;/p&gt;
&lt;p&gt;Overall, I highly recommend this book for anyone with a small amount of programming experience. You’ll learn a variety of good practices which you’ll find useful in other web development projects. And hey, if some day people really do have pet dinosaurs, you’ll have a ready-made social network for them!&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/danharper/~4/LuVRxxz05gc" height="1" width="1"/&gt;</content>
    <summary type="html">&lt;p&gt;The guys at Packt Publishing recently emailed me asking if I'd be interested in reviewing their latest book, &lt;a href="https://www.packtpub.com/php-create-powerful-dynamic-social-networking-website/book"&gt;PHP 5 Social Networking&lt;/a&gt; by Michael Peacock. Of course I jumped at the chance of receiving another free book!&lt;/p&gt;&lt;p&gt;The book guides you through the process of building a fully-featured social networking site for Dinosaur owners, complete with user profiles, a status stream, events and groups. While the book pushes itself as a 'social networking' book, everything you will learn is adaptable to any type of site - the social network is simply the demo application you will build.&lt;/p&gt;</summary>
  <feedburner:origLink>http://danharper.me/blog/php5-social-networking-review/</feedburner:origLink></entry>
  <entry>
    <id>tag:danharper.me,2011-01-22:/blog/one-line-server/</id>
    <title type="html">One Line Server Install</title>
    <published>2011-01-22T00:00:00Z</published>
    <updated>2011-01-22T00:00:00Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/danharper/~3/OMFK1k35H1k/" />
    <content type="html">&lt;p&gt;I’ve recently published a script called &lt;a href="https://github.com/danharper/onelineserver"&gt;One Line Server&lt;/a&gt; over at GitHub which, with one line, installs everything you need to run a &lt;span class="caps"&gt;LAMP&lt;/span&gt; and Rails web server with Ubuntu. This removes a bulk of the work required to set up a server manually, as I detailed recently in my &lt;a href="http://net.tutsplus.com/tutorials/other/setup-a-dev-server-for-php-mysql-and-ruby-on-rails-new-premium-tutorial/"&gt;Setting up an Ubuntu web server&lt;/a&gt; screencast for Nettuts+.&lt;/p&gt;
&lt;p&gt;The script itself is a fork of Joshua Frye’s &lt;a href="https://github.com/joshfng/railsready"&gt;Rails Ready&lt;/a&gt; script which installs Ruby and Rails on Ubuntu.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/danharper/onelineserver"&gt;&lt;strong&gt;One Line Server&lt;/strong&gt;&lt;/a&gt; is available over at GitHub and just like the original ‘Rails Ready’ script, can be install with just one line in the terminal:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-shell"&gt;sudo apt-get -y install curl &amp;amp;&amp;amp; curl https://github.com/danharper/onelineserver/raw/master/railsready.sh &amp;gt;&amp;gt; railsready.sh &amp;amp;&amp;amp; chmod a+x railsready.sh &amp;amp;&amp;amp; ./railsready.sh&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;One Line Server gives you the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Updates your system&lt;/li&gt;
	&lt;li&gt;Apache server 2.2.17&lt;/li&gt;
	&lt;li&gt;
&lt;span class="caps"&gt;PHP&lt;/span&gt; 5.3.5&lt;/li&gt;
	&lt;li&gt;MySQL server 5.5&lt;/li&gt;
	&lt;li&gt;SQLite 3.7.4&lt;/li&gt;
	&lt;li&gt;Ruby 1.9.2 (either through &lt;a href="http://rvm.beginrescueend.com/"&gt;&lt;span class="caps"&gt;RVM&lt;/span&gt;&lt;/a&gt; or natively)&lt;/li&gt;
	&lt;li&gt;Git&lt;/li&gt;
	&lt;li&gt;OpenSSH server&lt;/li&gt;
	&lt;li&gt;Imagemagick&lt;/li&gt;
	&lt;li&gt;Rubygems&lt;/li&gt;
	&lt;li&gt;Bundler gem&lt;/li&gt;
	&lt;li&gt;Rails 3 gem&lt;/li&gt;
&lt;/ul&gt;&lt;aside&gt;&lt;p&gt;Remember that it’s dangerous to run random shell scripts from the internet, but you can be assured this script will not harm your system (&lt;a href="https://github.com/danharper/onelineserver/raw/master/railsready.sh"&gt;check out the source yourself&lt;/a&gt;).&lt;br&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;/aside&gt;&lt;p&gt;You can contribute to &lt;a href="https://github.com/danharper/onelineserver"&gt;One Line Server&lt;/a&gt; or the original &lt;a href="https://github.com/joshfng/railsready"&gt;Rails Ready&lt;/a&gt; by forking the repo at GitHub.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/danharper/~4/OMFK1k35H1k" height="1" width="1"/&gt;</content>
    <summary type="html">&lt;p&gt;I've recently published a script called &lt;a href="https://github.com/danharper/onelineserver"&gt;One Line Server&lt;/a&gt; over at GitHub which, with one line, installs everything you need to run a LAMP and Rails web server with Ubuntu. This removes a bulk of the work required to set up a server manually, as I detailed recently in my &lt;a href="http://net.tutsplus.com/tutorials/other/setup-a-dev-server-for-php-mysql-and-ruby-on-rails-new-premium-tutorial/"&gt;Setting up an Ubuntu web server&lt;/a&gt; screencast for Nettuts+.&lt;/p&gt;&lt;p&gt;The script itself is a fork of Joshua Frye's &lt;a href="https://github.com/joshfng/railsready"&gt;Rails Ready&lt;/a&gt; script which installs Ruby and Rails on Ubuntu. Click through to see just how easy it can be to set up your own development web server!&lt;/p&gt;</summary>
  <feedburner:origLink>http://danharper.me/blog/one-line-server/</feedburner:origLink></entry>
  <entry>
    <id>tag:danharper.me,2011-01-17:/blog/channel4-homepage-css3/</id>
    <title type="html">A (Very) Brief Look at CSS3 Transitions</title>
    <published>2011-01-17T00:00:00Z</published>
    <updated>2011-01-17T00:00:00Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/danharper/~3/jnIyDL5vmIA/" />
    <content type="html">&lt;p&gt;Sometimes I like to re-create effects I like from other sites. I find this is a great way to learn a new technology or skill. Today, I decided to have a go at creating the big “Welcome to Channel 4” navigation area on the &lt;a href="http://www.channel4.com/"&gt;Channel 4 homepage&lt;/a&gt; in CSS3.&lt;/p&gt;
&lt;p&gt;There’s a nice flash animation on the navigation links. On hover the link gets larger, and the two links on either side also get slightly bigger.&lt;/p&gt;
&lt;p&gt;I still hadn’t got round to experimenting with CSS3 animations, so this was new for me. I knew that basically I had to change the font size of a link when it’s hovered over (easy enough), and use CSS3 to somehow ease in to and out of the new size.&lt;/p&gt;
&lt;p&gt;A bit of searching and I came up with this:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-css"&gt;&lt;span class="ty"&gt;section&lt;/span&gt; &lt;span class="ty"&gt;li&lt;/span&gt; &lt;span class="ty"&gt;a&lt;/span&gt;&lt;span class="ps"&gt;:hover&lt;/span&gt; {
        &lt;span class="ke"&gt;transition-property&lt;/span&gt;: &lt;span class="vl"&gt;font-size&lt;/span&gt;;
        &lt;span class="ke"&gt;transition-duration&lt;/span&gt;: &lt;span class="fl"&gt;0&lt;/span&gt;&lt;span class="fl"&gt;.3&lt;/span&gt;&lt;span class="vl"&gt;s&lt;/span&gt;;
        &lt;span class="ke"&gt;font-size&lt;/span&gt;: &lt;span class="fl"&gt;30px&lt;/span&gt;;
}&lt;/code&gt;&lt;/pre&gt;
&lt;aside&gt;&lt;p&gt;(Obviously with the &lt;code&gt;-webkit-&lt;/code&gt; and &lt;code&gt;-moz-&lt;/code&gt; vendor selectors as the spec isn’t yet finalised).&lt;/p&gt;
&lt;/aside&gt;&lt;p&gt;The &lt;code&gt;transition-property&lt;/code&gt; CSS3 property allows you to mark any other &lt;span class="caps"&gt;CSS&lt;/span&gt; property on an element to be animated through a “transition”.&lt;/p&gt;
&lt;p&gt;In this case I’ve marked &lt;code&gt;font-size&lt;/code&gt; as a transition property and set a transition duration of 0.3 seconds. This means that when the font size is changed to 30px, it will occur gradually over a period of 0.3 seconds.&lt;/p&gt;
&lt;p&gt;Another example would be gradually changing the background colour on an element:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-css"&gt;&lt;span class="ty"&gt;a&lt;/span&gt;&lt;span class="ps"&gt;:link&lt;/span&gt;, &lt;span class="ty"&gt;a&lt;/span&gt;&lt;span class="ps"&gt;:visited&lt;/span&gt; {
        &lt;span class="ke"&gt;transition-property&lt;/span&gt;: &lt;span class="vl"&gt;background-color&lt;/span&gt;, &lt;span class="vl"&gt;color&lt;/span&gt;, &lt;span class="vl"&gt;padding&lt;/span&gt;;
        &lt;span class="ke"&gt;transition-duration&lt;/span&gt;: &lt;span class="fl"&gt;1&lt;/span&gt;&lt;span class="vl"&gt;s&lt;/span&gt;;
        &lt;span class="ke"&gt;background-color&lt;/span&gt;: &lt;span class="vl"&gt;red&lt;/span&gt;;
        &lt;span class="ke"&gt;color&lt;/span&gt;: &lt;span class="vl"&gt;blue&lt;/span&gt;;
        &lt;span class="ke"&gt;padding&lt;/span&gt;: &lt;span class="fl"&gt;10px&lt;/span&gt; &lt;span class="fl"&gt;15px&lt;/span&gt;;
        &lt;span class="ke"&gt;text-decoration&lt;/span&gt;: &lt;span class="vl"&gt;none&lt;/span&gt;;
}

&lt;span class="ty"&gt;a&lt;/span&gt;&lt;span class="ps"&gt;:hover&lt;/span&gt; {
        &lt;span class="ke"&gt;background-color&lt;/span&gt;: &lt;span class="vl"&gt;black&lt;/span&gt;;
        &lt;span class="ke"&gt;color&lt;/span&gt;: &lt;span class="vl"&gt;white&lt;/span&gt;;
        &lt;span class="ke"&gt;padding&lt;/span&gt;: &lt;span class="fl"&gt;10px&lt;/span&gt; &lt;span class="fl"&gt;30px&lt;/span&gt;;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;aside&gt;&lt;p&gt;View a demo of this code &lt;a href="http://danharper.me/assets/blog/channel4-homepage-css3/example-bg.html"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/aside&gt;&lt;p&gt;Anyway, with the transition working, this simple effect is done. You can see &lt;a href="http://danharper.me/assets/blog/channel4-homepage-css3/example.html"&gt;the example&lt;/a&gt; below (in an iframe of all things :S)…&lt;/p&gt;
&lt;p&gt;&lt;iframe src="/assets/blog/channel4-homepage-css3/example.html" width="980" height="92%" scrolling="auto" class="inline-site-960"&gt;&lt;p&gt;Iframes disabled, eh? &lt;a href="http://danharper.me/assets/blog/channel4-homepage-css3/example.html"&gt;Click here to view the demo&lt;/a&gt;.&lt;/p&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;One thing which doesn’t work, is the change in size of the two links next to the one currently being hovered. As far as I know, there isn’t a way to target the previous and next link in &lt;span class="caps"&gt;CSS&lt;/span&gt; (or maybe there is and I’m just low on sleep). So I decided to use jQuery to target those links, and apply/remove a class to them as needed:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-js"&gt;&lt;span class="pd"&gt;$&lt;/span&gt;(&lt;span class="kw"&gt;function&lt;/span&gt;() {
        &lt;span class="kw"&gt;var&lt;/span&gt; prev;
        &lt;span class="kw"&gt;var&lt;/span&gt; next;
        &lt;span class="pd"&gt;$&lt;/span&gt;(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;section li a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;).hover(
                &lt;span class="kw"&gt;function&lt;/span&gt; () {
                        prev = &lt;span class="pd"&gt;$&lt;/span&gt;(&lt;span class="lv"&gt;this&lt;/span&gt;).parent().prev(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;li&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;).children(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;);
                        next = &lt;span class="pd"&gt;$&lt;/span&gt;(&lt;span class="lv"&gt;this&lt;/span&gt;).parent().next(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;li&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;).children(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;);
                        prev.addClass(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;hovered&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;);
                        next.addClass(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;hovered&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;);
                },
                &lt;span class="kw"&gt;function&lt;/span&gt; () {
                        prev.removeClass(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;hovered&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;);
                        next.removeClass(&lt;span class="s"&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="k"&gt;hovered&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;/span&gt;);
                }
        );
});&lt;/code&gt;&lt;/pre&gt;
&lt;aside&gt;&lt;p&gt;I’m still trying out different methods of syntax highlighting, and I’m having trouble getting code indentation to work with the current method I’m using…&lt;/p&gt;
&lt;/aside&gt;&lt;p&gt;And the &lt;span class="caps"&gt;CSS&lt;/span&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-css"&gt;&lt;span class="ty"&gt;section&lt;/span&gt; &lt;span class="ty"&gt;li&lt;/span&gt; &lt;span class="ty"&gt;a&lt;/span&gt;&lt;span class="cl"&gt;.hovered&lt;/span&gt; {
        &lt;span class="ke"&gt;font-size&lt;/span&gt;: &lt;span class="fl"&gt;20px&lt;/span&gt;;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I’m not that great with jQuery so there may be a more elegant way to achieve this, but I tried. Here’s the &lt;a href="http://danharper.me/assets/blog/channel4-homepage-css3/example-b.html"&gt;example&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;iframe src="/assets/blog/channel4-homepage-css3/example-b.html" width="980" height="92%" scrolling="auto" class="inline-site-960"&gt;&lt;p&gt;Iframes disabled, eh? &lt;a href="http://danharper.me/assets/blog/channel4-homepage-css3/example-b.html"&gt;Click here to view the demo&lt;/a&gt;.&lt;/p&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;The effect on the adjacent links is subtle but quite jumpy/slow so it’s not something I’d use in a different project unless I could make it smoother.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/danharper/~4/jnIyDL5vmIA" height="1" width="1"/&gt;</content>
    <summary type="html">&lt;p&gt;Sometimes I like to re-create effects I like from other sites. I find this is a great way to learn a new technology or skill. Today, I decided to have a go at creating the big &amp;#147;Welcome to Channel 4&amp;#148; navigation area on the &lt;a href="http://www.channel4.com/"&gt;Channel 4 homepage&lt;/a&gt; in CSS3.&lt;/p&gt;</summary>
  <feedburner:origLink>http://danharper.me/blog/channel4-homepage-css3/</feedburner:origLink></entry>
  <entry>
    <id>tag:danharper.me,2011-01-08:/blog/moving-files-between-servers/</id>
    <title type="html">Moving files between servers</title>
    <published>2011-01-08T00:00:00Z</published>
    <updated>2011-01-08T00:00:00Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/danharper/~3/FMGliTpHgQE/" />
    <content type="html">&lt;p&gt;While publishing my &lt;a href="http://net.tutsplus.com/tutorials/other/setup-a-dev-server-for-php-mysql-and-ruby-on-rails-new-premium-tutorial/"&gt;latest Nettuts+ post&lt;/a&gt;, a screencast tutorial on setting up a &lt;span class="caps"&gt;LAMP&lt;/span&gt; server with Ubuntu, I first needed to get the video, a 150mb archive, to the editor.&lt;/p&gt;
&lt;p&gt;Now, I could have uploaded the file through &lt;span class="caps"&gt;FTP&lt;/span&gt; to my own server then sent him the link, but I’ve developed a bit of a distrust of &lt;span class="caps"&gt;FTP&lt;/span&gt; with it corrupting a few of my files, and with an upload speed of ~45kb/s I only wanted to do this once.&lt;/p&gt;
&lt;p&gt;So I went with &lt;a href="http://rapidshare.com"&gt;Rapidshare&lt;/a&gt;: a popular file hosting service. About an hour later, the file was uploaded and I sent the link off to Jeffrey to be published.&lt;/p&gt;
&lt;p&gt;Now, you may be aware that the Tuts+ network allow their authors to publish the Premium tutorials they’ve created to the &lt;a href="http://marketplace.tutsplus.com"&gt;Tuts+ Marketplace&lt;/a&gt; for people who would rather use their marketplace allowance to buy the occasional premium tutorial than purchase a recurring Tuts+ Premium membership. So I also needed to get this 150mb archive up on the Marketplace &lt;span class="caps"&gt;ASAP&lt;/span&gt; to maximise the number of potential buyers.&lt;/p&gt;
&lt;p&gt;So I could have uploaded the file through the marketplace’s web-based file uploader, but I knew there had to be a faster way. Well, the marketplace also allow you to upload your large files via &lt;span class="caps"&gt;FTP&lt;/span&gt; if you prefer, but as I mentioned I don’t really trust my connection with &lt;span class="caps"&gt;FTP&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;But I do trust my web server’s connection. So how do I go about using my web server to upload a file hosted on Rapidshare to my &lt;span class="caps"&gt;FTP&lt;/span&gt; account at Envato? &lt;strong&gt;&lt;span class="caps"&gt;SSH&lt;/span&gt;&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;Typically to download a Rapidshare file you must either:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Be a ‘free’ user, wait for a count-down and enter a Captcha before the download starts&lt;/li&gt;
	&lt;li&gt;Be a Premium member (which I am) and the download starts immediatly&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;So I need a way to log in to Rapidshare account on my web server so I can get an instant download. I could have figured out the details behind logging in and storing a cookie, but I remembered Rapidshare allow you to mark any of your files as “TrafficShare” which means that this anyone downloading the file will be treated as a Premium user and the traffic they use will be deducted from your own download limit.&lt;/p&gt;
&lt;p&gt;With my file marked as “TrafficShare”, I connected to my server through &lt;span class="caps"&gt;SSH&lt;/span&gt; and entered:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;$ wget http://rapidshare.com/path/to/my/file&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This downloaded the file to the server almost instantly. Now I could &lt;span class="caps"&gt;FTP&lt;/span&gt; this file to my Envato account:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;$ ftp ftp.marketplace.envato.com
Connected to ftp.marketplace.envato.com.
220
Name (ftp.marketplace.envato.com): danharper
331 Please specifiy the password.
Password: 
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.

ftp&amp;gt; put nettuts-ubuntu-server.tgz&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A few seconds later, the file had been sent over! This whole process took about 5 minutes, as opposed to the hour it would have taken me to upload it over my own connection.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/danharper/~4/FMGliTpHgQE" height="1" width="1"/&gt;</content>
    <summary type="html">&lt;p&gt;While publishing my &lt;a href="http://net.tutsplus.com/tutorials/other/setup-a-dev-server-for-php-mysql-and-ruby-on-rails-new-premium-tutorial/"&gt;latest Nettuts+ post&lt;/a&gt;, a screencast tutorial on setting up a LAMP server with Ubuntu, I first needed to get the video, a 150mb archive, to the editor.&lt;/p&gt;&lt;p&gt;Now, I could have uploaded the file through FTP to my own server then sent him the link, but I've developed a bit of a distrust of FTP with it corrupting a few of my files, and with an upload speed of ~45kb/s I only wanted to do this once.&lt;/p&gt;&lt;p&gt;So I went with &lt;a href="http://rapidshare.com"&gt;Rapidshare&lt;/a&gt; a popular file hosting service. About an hour later, the file was uploaded and I sent the link off to Jeffrey to be published.&lt;/p&gt;</summary>
  <feedburner:origLink>http://danharper.me/blog/moving-files-between-servers/</feedburner:origLink></entry>
  <entry>
    <id>tag:danharper.me,2011-01-01:/blog/new-year-new-site/</id>
    <title type="html">A New Year, A New Site</title>
    <published>2011-01-01T00:00:00Z</published>
    <updated>2011-01-01T00:00:00Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/danharper/~3/A-YQDE_KLcI/" />
    <content type="html">&lt;p&gt;It’s been a whole year since I last had what I could think of as a “proper site”, and not just a landing page with links to my profiles elsewhere on the web. It’s always such a challenge to create something for yourself and be 100% pleased with it. I must have gone through over 20 new designs which I get part-way through, decide I don’t like it any more and abandon it.&lt;/p&gt;
&lt;p&gt;This time it’ll be different. I’m going into this new design knowing that I’ll probably be making slight changes to it every few weeks, constantly improving, constantly changing.&lt;/p&gt;
&lt;p&gt;I’ve also never really blogged before as I’ve never been happy with the tools available. Previous versions of my site have been built on the &lt;a href="http://wordpress.org"&gt;WordPress&lt;/a&gt; blogging platform which I’ve also hacked a portfolio section in to, so it’s not that I don’t understand WordPress, but that writing a blog post in the WordPress dashboard is actually a horrible experiece.&lt;/p&gt;
&lt;p&gt;There’s text boxes, checkboxes, sliders and buttons for a huge amount of settings cluttering up the ‘Write’ page from what’s most important: your content!&lt;/p&gt;
&lt;p&gt;&lt;img src="http://danharper.me/assets/blog/new-year-new-site/wp-dash.png" class="full_site_ss" alt=""&gt;&lt;/p&gt;
&lt;p&gt;I was about ready to start work on my own little &lt;span class="caps"&gt;CMS&lt;/span&gt;/blogging script which would do content creation the &lt;em&gt;right way&lt;/em&gt; when I discovered &lt;a href="http://nanoc.stoneship.org/"&gt;nanoc&lt;/a&gt;, a surprisingly flexible “static-site” generator which allows you to write your site using Ruby which will then be compiled into normal, static &lt;span class="caps"&gt;HTML&lt;/span&gt; pages which you can upload to your site. nanoc offered me:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Freedom from a database – accessing it for every page request is slow and stupid, and a caching system is creating static &lt;span class="caps"&gt;HTML&lt;/span&gt; pages anyway…&lt;/li&gt;
	&lt;li&gt;The ability to write my content into whatever format I please, using whatever text editor I choose. I’m formatting this post in Textile using MacVim and nanoc will filter this content through &lt;a href="http://redcloth.org/"&gt;RedCloth&lt;/a&gt; to parse it into valid &lt;span class="caps"&gt;HTML&lt;/span&gt;.&lt;/li&gt;
	&lt;li&gt;Version control with Git over not just my site’s files, but over my blog posts, too!&lt;/li&gt;
	&lt;li&gt;No security holes! As no server-side code is being run, there’s not a chance of someone exploiting yet another hole in WordPress’ defenses.&lt;/li&gt;
	&lt;li&gt;
&lt;span class="caps"&gt;SEO&lt;/span&gt;-friendly URLs without any complex .htaccess rules or behind-the-scenes trickery – just normal files and directories!&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;And just to show off the simpilicity: this is how I’ll be backing up this post, publishing it to the site and pushing it to GitHub:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;nanoc compile
        git commit -a
        git push origin master
        rake deploy:rsync
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But I’m going to write a simple Rake task to make the whole process as easy as:&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-bash"&gt;rake publish&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I’m going to publish another post in a few days time detailing the process I took in both designing &amp;amp; developing this site.&lt;/p&gt;
&lt;p&gt;I’ve also decided to open-source this site and I’ve released it on my &lt;a href="https://github.com/danharper/danharper.me"&gt;GitHub profile&lt;/a&gt; along with my previous &lt;a href="https://github.com/danharper/Landing-Page"&gt;landing page&lt;/a&gt; design.&lt;/p&gt;
&lt;p class="attribution"&gt;Post image courtesty of &lt;a href="http://www.flickr.com/photos/lmmnfrsh/507284458/"&gt;tetraconz – Flickr&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/danharper/~4/A-YQDE_KLcI" height="1" width="1"/&gt;</content>
    <summary type="html">&lt;p&gt;It's been a whole year since I last had what I could think of as a "proper site", and not just a landing page with links to my profiles elsewhere on the web. It's always such a challenge to create something for yourself and be 100% pleased with it. I must have gone through over 20 new designs which I get part-way through, decide I don't like it any more and abandon it.&lt;/p&gt;&lt;p&gt;This time it'll be different. I'm going into this new design knowing that I'll probably be making slight changes to it every few weeks, constantly improving, constantly changing.&lt;/p&gt;&lt;p&gt;I've also never really blogged before as I've never been happy with the tools available. Previous versions of my site have been built on the &lt;a href="http://wordpress.org"&gt;WordPress&lt;/a&gt; blogging platform which I've also hacked a portfolio section in to, so it's not that I don't understand WordPress, but that writing a blog post in the WordPress dashboard is actually a horrible experiece.&lt;/p&gt;</summary>
  <feedburner:origLink>http://danharper.me/blog/new-year-new-site/</feedburner:origLink></entry>
</feed>
