<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:media="http://search.yahoo.com/mrss/"><channel><title><![CDATA[ErrRight]]></title><description><![CDATA[Living live one mistake at a time! ]]></description><link>http://blog.errright.com/</link><generator>Ghost 0.6</generator><lastBuildDate>Sat, 13 Jul 2019 15:06:21 GMT</lastBuildDate><atom:link href="http://blog.errright.com/rss/" rel="self" type="application/rss+xml"/><ttl>60</ttl><item><title><![CDATA[Setting up Cloudflare]]></title><description><![CDATA[<p>Last night I set up <a href="https://www.cloudflare.com/">Cloudflare</a> for my website, mostly to get <em>https</em>. Not having many cacheing needs, that was not a concern. Along the way though, I did run into a number of annoyances so hopefully this helps you avoid those.</p>

<h4 id="undiscoveredsubdomains">Undiscovered Subdomains</h4>

<p>After signing up with Cloudflare, it</p>]]></description><link>http://blog.errright.com/setting-up-cloudflare/</link><guid isPermaLink="false">0138015e-be03-402e-94f4-6b744535d472</guid><category><![CDATA[Tech]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Fri, 01 May 2015 05:26:38 GMT</pubDate><content:encoded><![CDATA[<p>Last night I set up <a href="https://www.cloudflare.com/">Cloudflare</a> for my website, mostly to get <em>https</em>. Not having many cacheing needs, that was not a concern. Along the way though, I did run into a number of annoyances so hopefully this helps you avoid those.</p>

<h4 id="undiscoveredsubdomains">Undiscovered Subdomains</h4>

<p>After signing up with Cloudflare, it scans your site for its content and subdomains. It'll find the usual subdomains, but if you have unusual ones you have to add them on the control panel.</p>

<p>Otherwise there will be problems with the nameserver settings, and even though your subdomains will still be showing at their IP Address, you'll see errors when using the URL.</p>

<p><strong>Note:</strong> You just need to add the subdomain here, like <em>blog</em> or <em>demo</em>, and not the full URL. Chances are your subdomain is on the same IP Address as your website, but if not, check your hosting account.</p>

<p><img src="http://blog.errright.com/content/images/2015/05/cloudflare.png" alt=""></p>

<h4 id="changingnameservers">Changing Nameservers</h4>

<p>Once you've Cloudflare configured, change your Nameserver settings with your domain provider. I use Godaddy, but whatever you use you'll need to change your settings to point to the ones Cloudflare uses, which in my case are the following:</p>

<pre><code>gabe.ns.cloudflare.com
uma.ns.cloudflare.com
</code></pre>

<p><img src="http://blog.errright.com/content/images/2015/05/godaddy.png" alt=""></p>

<h4 id="redirectinghttptohttps">Redirecting http to https</h4>

<p>The final step is to always serve your pages using <em>https</em>. I found that the simplest way is to use Nginx with the <code>http_x_forwarded_proto</code> option. You'll need to configure this in all your virtual host files. </p>

<pre><code>server {
    listen      80;
    server_name     example.con www.example.com;

    if ($http_x_forwarded_proto = "http") {
         return 301 https://$server_name$request_uri;
       }

        location / {
        root /path/to/files;
        index index.html index.html; 
        }   
    }
</code></pre>

<h4 id="gitandmercurialproblems">Git and Mercurial Problems</h4>

<p>One problem I have yet to solve is that of a subdomain hosting <em>git</em> and <em>mercurial</em> repositories. For <em>git</em> repositories I am now getting the following error on the command line:</p>

<pre><code>$ git pull
fatal: unable to access 'https://git.repo.url':
gnutls_handshake() failed: Handshake failed
</code></pre>

<p>For Mercurial repositories it is something similar:</p>

<pre><code>$ hg pull
abort: error: _ssl.c:510: error:14094438:SSL routines:SSL3_READ_BYTES:tlsv1 alert internal error
</code></pre>

<p>The workaround currently is to replace the URL in the request with the IP Address, but as I'm not happy with that, it's a problem I'll look into over the weekend.</p>]]></content:encoded></item><item><title><![CDATA[Embracing Change]]></title><description><![CDATA[<p>Change happens no matter what you do in life. Sometimes you make it, sometimes it's hoisted upon you, but most times it's a mixture of life demanding action which sets a change in motion. It's hard to say what the instigator is in that instance, is it reactive or proactive</p>]]></description><link>http://blog.errright.com/embracing-change/</link><guid isPermaLink="false">e676c3ab-a6f4-4cb9-a87b-5fa535c5b74a</guid><category><![CDATA[Change]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Sat, 18 Apr 2015 07:18:46 GMT</pubDate><media:content url="http://blog.errright.com/content/images/2015/05/IMG_0123.jpg" medium="image"/><content:encoded><![CDATA[<img src="http://blog.errright.com/content/images/2015/05/IMG_0123.jpg" alt="Embracing Change"><p>Change happens no matter what you do in life. Sometimes you make it, sometimes it's hoisted upon you, but most times it's a mixture of life demanding action which sets a change in motion. It's hard to say what the instigator is in that instance, is it reactive or proactive change?</p>

<blockquote>
  <p>Who cares?</p>
</blockquote>

<h4 id="paralysisbyanalysis">Paralysis By Analysis</h4>

<p>Sometimes we overthink causes in life and neglect to fully appreciate the effects. Who said or did what to whom is often more discussed than the result. This to me is a poor use of ones time. Cause and effect is as subjective as all other speculation past times.</p>

<p>We are given a finite amount of everything in life; time, willpower, motivation, patience, intelligence, you name it. Even our imagination is limited. These all vary depending on your circumstances but nonetheless there are limits.</p>

<blockquote>
  <p>You are a product of your environment, but that is no excuse!</p>
</blockquote>

<h4 id="limitsaregood">Limits Are Good</h4>

<p>Despite those limits, we are not constrained by them, because within each one there is a huge spectrum of different approaches, philosophies, and paths that you can explore to keep you stimulated for as long as the electrons keep firing between you synapses. </p>

<p>The limits don't act as barriers to growth or change, but more like sign posts turning you back once to have gone to far down a dead end.</p>

<blockquote>
  <p>You can only walk half way into a forest!</p>
</blockquote>

<p>Change stimulates your mind in so many positive ways, and a few negative ones too, but the outcome is almost always positive if you can embrace change and use it to help you grow and become happier.</p>

<blockquote>
  <p>Nothing rots the mind like routine</p>
</blockquote>

<p>Once you reach these limits and nothing challenges you in a positive way any more, then it is time for change. If you don't make a conscious effort to bring about that change required to keep you fresh, then you'll stagnate.</p>

<h4 id="shedanchors">Shed Anchors</h4>

<p>The most effective way to handle this is to embrace change into your life, stay nimble, and unattached to inanimate objects. </p>

<blockquote>
  <p>You don't need that thing!</p>
</blockquote>

<p>For a number of years now I've had a philosophy of buying nothing that I couldn't put into a backpack, and despite having a car for most of that time, I managed to stick to it for everything else. </p>

<p>Two years ago I got a swanky new bike, and last year I finally jettisoned the car. I haven't looked back, in fact, it's been great even though prior to that I couldn't imagine getting by without four wheels and a Diesel engine. </p>

<p><em>Slight cheat: I did move to countries with better weather and good public 
transport</em> </p>

<p>I am now fully inline with that goal, and it's liberating. I don't have any <em>stuff</em> that requires my presence, and my Apple, Horse chestnut, Ash, and Sycamore trees require minimal maintenance. I just prune them excessively in the Winter, and nature seems to do the rest. </p>

<h4 id="savemoney">Save Money</h4>

<p>Actually, before I continue here. One point to note, money doesn't grow on those trees, no matter how useful mother nature is. When you are making some money, bank it, and don't be tempted by that shiny new product. Change is often hindered by financial constraints, so don't let that finite resource limit you as best you can.</p>

<h4 id="promotingchange">Promoting Change</h4>

<p>Once you drop all silly attachments, then you will find that you are in a more agreeable frame of mind to accept curve balls. In fact, you'll probably be looking forward to the entertainment. </p>

<p>You'll be ready to embrace change into your life and make the best of most situations. No matter how awkward or unwelcome it may originally seem to be.</p>

<p>Much like having a rotten tooth pulled out, for a time you'll want the old form back because the new space is empty, feels weird, and sometimes it does bleed. But your breath will be so much better!</p>

<h4 id="greatchangeswillappear">Great Changes Will Appear</h4>

<p>Once you are surfing on a particular wave of change, you'll find that more will start coming your way. Challenging you in life and pushing you in directions you didn't foresee. Occasionally, one of these waves will be a big one that'll knock you for six. </p>

<p>Whether initially in a positive or negative direction is irrelevant, as it's all about how you embrace the change and use it to take you places you haven't been. </p>

<blockquote>
  <p>Jump at the chances it provides</p>
</blockquote>

<p>Changes that seem to promise only positive growth are rare, and need to be embraced wholeheartedly. You have to be bold, and discard anything in the past that would hold you back.</p>

<p>Once you take the mental leap to fill the void with positivity and put your shoulder to the wheel though, you can create situations and opportunities that enrich who you are, and spur you on to <a href="http://elliotthulse.com/">becoming a stronger version of yourself</a></p>

<p>This is why I try and set myself up to be pro-change because it's what keeps refining those rough edges I have that can only be improved through friction with life!</p>]]></content:encoded></item><item><title><![CDATA[Updating to Sphinx 1.3.1 using Nix]]></title><description><![CDATA[<p>Today I updated my <a href="http://sphinx-doc.org/">Sphinx</a> version to 1.3.1, using Nix. I hadn't updated it since last July if my <a href="http://blog.errright.com/switching-from-homebrew-to-nix/">previous Nix blog</a> is anything to go by.</p>

<p>There are quite a few additional dependencies, and no big issues, but I should begin with the disclaimer.</p>

<h3 id="issues">Issues</h3>

<p>Before you</p>]]></description><link>http://blog.errright.com/updating-to-sphinx-1-3-1-using-nix/</link><guid isPermaLink="false">697a705b-23f7-4dd6-8236-9113bb06e84d</guid><category><![CDATA[Nix]]></category><category><![CDATA[Sphinx]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Wed, 15 Apr 2015 18:09:24 GMT</pubDate><content:encoded><![CDATA[<p>Today I updated my <a href="http://sphinx-doc.org/">Sphinx</a> version to 1.3.1, using Nix. I hadn't updated it since last July if my <a href="http://blog.errright.com/switching-from-homebrew-to-nix/">previous Nix blog</a> is anything to go by.</p>

<p>There are quite a few additional dependencies, and no big issues, but I should begin with the disclaimer.</p>

<h3 id="issues">Issues</h3>

<p>Before you do the same, here are my issues with it, nothing major:</p>

<ol>
<li><p>If using the <a href="https://github.com/snide/sphinx_rtd_theme">readthedocs theme</a>, then it is currently not supporting 1.3.1, <a href="https://github.com/rtfd/readthedocs.org/issues/1214">issue 1214</a>. It seems the way Sphinx is now generating its HTML is different, so until this is fixed I'm rolling back to 1.2.2 Here is what command line output now looks like. Red text is usually for big errors! <img src="http://blog.errright.com/content/images/2015/04/sphinx-broken-markup.png" alt="" title=""></p></li>
<li><p>During installation the <code>Babel</code> library is not picking up the <code>pytz</code> library, so I had to disable the checks.</p></li>
</ol>

<h3 id="defaultnix">Default.nix</h3>

<p>Anyway, here you go, a <code>default.nix</code> for Sphinx 1.3.1. It's also in a <a href="https://gist.github.com/zaniphrom/b72e35624b225d365529">Github gist</a> if you prefer.</p>

<pre><code>{ system ? builtins.currentSystem
}:

let

  pkgs = import &lt;nixpkgs&gt; { inherit system; };

  inherit (pkgs) fetchurl fetchgit;

  buildPythonPackage = pkgs.python27Packages.buildPythonPackage;
  python = pkgs.python27Packages.python;

  Jinja2 = buildPythonPackage rec {
    name = "Jinja2-2.7.3";
    src = fetchurl {
      url = "http://pypi.python.org/packages/source/J/Jinja2/${name}.tar.gz";
  md5 = "b9dffd2f3b43d673802fe857c8445b1a";
};
propagatedBuildInputs = [ MarkupSafe ];
};

MarkupSafe = buildPythonPackage rec {
  name = "MarkupSafe-0.23";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/M/MarkupSafe/${name}.tar.gz";
    md5 = "f5ab3deee4c37cd6a922fb81e730da6e";
};
};

Pygments = buildPythonPackage rec {
  name = "Pygments-2.0.2";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/P/Pygments/${name}.tar.gz";
    md5 = "238587a1370d62405edabd0794b3ec4a";
};
};

alabaster = buildPythonPackage rec {
  name = "alabaster-0.7.3";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/a/alabaster/${name}.tar.gz";
    md5 = "67428d1383fd833f1282fed5deba0898";
};
};

six = buildPythonPackage rec {
  name = "six-1.9.0";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/s/six/${name}.tar.gz";
    md5 = "476881ef4012262dfc8adc645ee786c4";
};
};

snowballstemmer = buildPythonPackage rec {
  name = "snowballstemmer-1.2.0";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/s/snowballstemmer/${name}.tar.gz";
    md5 = "51f2ef829db8129dd0f2354f0b209970";
};
};

pytz = buildPythonPackage rec {
  name = "pytz-2015.2";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/p/pytz/${name}.tar.gz";
    md5 = "08440d994cfbbf13d3343362cc3173f7";
};
};

babel = buildPythonPackage rec {
  name = "Babel-1.3";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/B/Babel/${name}.tar.gz";
    md5 = "5264ceb02717843cbc9ffce8e6e06bdb";
};
# TODO: tests breaking due to not finding pytz, even though it is in
doCheck = false;
};

Sphinx = buildPythonPackage (rec {
  name = "Sphinx-1.3.1";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/S/Sphinx/${name}.tar.gz";
    md5 = "8786a194acf9673464c5455b11fd4332";
  };
propagatedBuildInputs = [
  docutils
  Jinja2
  Pygments
  alabaster
  six
  snowballstemmer
  pytz
  babel

  # TODO: Had to include it here so that can be imported
  sphinx_rtd_theme
];
});

docutils = buildPythonPackage rec {
  name = "docutils-0.12";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/d/docutils/${name}.tar.gz";
    md5 = "4622263b62c5c771c03502afa3157768";
  };
};

sphinx_rtd_theme = buildPythonPackage rec {
  name = "sphinx_rtd_theme-0.1.7";
  src = fetchurl {
    url = "https://pypi.python.org/packages/source/s/sphinx_rtd_theme/${name}.tar.gz";
    md5 = "3ffe014445195705968d899c38b305fd";
  };

# TODO: Tests would require sphinx and this creates recursion issues
doCheck = false;
};

in python.buildEnv.override {
  inherit python;
  extraLibs = [
    Sphinx
    sphinx_rtd_theme
 ];
}
</code></pre>

<h3 id="runningabuild">Running a build</h3>

<p>Once it is done, run <code>nix-build</code> and you'll be able to generate your docs:</p>

<pre><code>$ nix-build
/nix/store/8h6iysvp583rycl1ll6w75n1z1h1psmx-python-2.7.9-env

$ make html
../result/bin/sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v1.3.1
making output directory...
loading pickled environment... not yet created
loading intersphinx inventory from http://docs.python.org/objects.inv...
building [mo]: targets for 0 po files that are out of date 
building [html]: targets for 3 source files that are out of date updating environment: 3 added, 0 changed, 0 removed 
reading sources... [100%] index                                                 
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index                                                  
generating indices... genindex
writing additional pages... search
copying static files... WARNING: html_static_path entry u'/Users/brian/personal-vcs/cahoots/app-design/_static' does not exist
done
copying extra files... done
dumping search index in English (code: en) ... done
dumping object inventory... done
build succeeded, 1 warning.

Build finished. The HTML pages are in _build/html.
</code></pre>]]></content:encoded></item><item><title><![CDATA[In Absence of Integrity]]></title><description><![CDATA[<p>All systems tend towards degradation, and eventually decay and death over time. This is more or less the 2nd law of thermodynamics and it can be applied to both physical, and human systems.</p>

<p>What slows down this process of degradation is integrity, and while the physical aspect is easier to</p>]]></description><link>http://blog.errright.com/in-absence-of-integrity/</link><guid isPermaLink="false">6de1d376-1019-4c8c-9f22-11708f39d4f0</guid><category><![CDATA[Integrity]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Mon, 13 Apr 2015 18:55:06 GMT</pubDate><media:content url="http://blog.errright.com/content/images/2015/05/IMG_0077.jpg" medium="image"/><content:encoded><![CDATA[<img src="http://blog.errright.com/content/images/2015/05/IMG_0077.jpg" alt="In Absence of Integrity"><p>All systems tend towards degradation, and eventually decay and death over time. This is more or less the 2nd law of thermodynamics and it can be applied to both physical, and human systems.</p>

<p>What slows down this process of degradation is integrity, and while the physical aspect is easier to fathom, the integrity factor within humans is often a more elusive variable to define. </p>

<h4 id="observingintegrity">Observing Integrity</h4>

<p>It can be quite difficult to measure what behaviour adds integrity to a relationship, and what acts as a destructive force. Being subjective creatures, we cannot empirically measure the effects, but we can observe the changes from a higher plane upon reflection, and decide whether the overall integrity is diminishing or increasing. </p>

<p>This isn't easy when you are caught up in the moment itself. Being inside a destructive, deteriorating situation does influence how you think, and how you deal with it. </p>

<p>The <a href="https://en.wikipedia.org/wiki/Observer_effect_(physics)">observer effect</a> comes into play, and alters your ability to see things for how they really are, making you a confused student of your own circumstances. </p>

<blockquote>
  <p>How did I end up here?</p>
</blockquote>

<p>In challenging times, when you are confronted by this breakdown of integrity and wondering how to deal with it, the resultant clash of ethics and morals can spin your head into an endless loop of inner doubts.</p>

<h4 id="internalconflict">Internal Conflict</h4>

<p>Even ethics and morals themselves becomes a foggy haze of bewilderment when integrity breaks down. The prescribed ethics of an organisation are always lofty and idealistic. Usually espousing teamwork, cohesion, and support. </p>

<p>But often when you observe how the people responsible for those diktats act in complete contradiction to their own mantra; with blame games, underhanded tactics, and each out for their own personal gain, you cannot help but be influenced by it. </p>

<p>Then what are the true ethics of that situation, the idealistic or realistic ones?</p>

<p>These external factors feed into our own inner moral compass, which can often point in many directions. So instead of your own morals acting as a shining beacon in dark times, they become an even more confusing maze of questions, suggestions, and conflicting thoughts. </p>

<h4 id="mentalpollution">Mental Pollution</h4>

<p>This all leads to a lot of mental pollution. You can't think straight, you don't know right from wrong, and definitely are not in a good frame of mind to make correct decisions. </p>

<p>There are a number of factors which are telltale signs of this kind of psychological conflict:</p>

<ul>
<li>Increased anxiety and incoherent thinking.</li>
<li>Hostility and falsehoods, both passive and overt, floating your way.</li>
<li>A lack of motivation and increasing stress for no definable reason.</li>
<li>Outbursts over trivial matters, with your mouth being used before your brain.</li>
<li>A futility about your ability to affect change, and lower energy levels.</li>
<li>You may also start drinking and smoking a lot more.</li>
<li>Not sleeping well, perhaps with 4am bad dreams and spending the day wishing you could sleep again.</li>
</ul>

<h4 id="thinkingthroughit">Thinking Through It</h4>

<p>So, your brain is a mess, ethics and morals are confusing, and you are low on energy. </p>

<blockquote>
  <p>What do I do? </p>
</blockquote>

<p>Given that thinking is hard, the simplest solution is not to think through it, and quit. Walk away from the situation and time will heal the wounds. It'll be like it never happened if you can sever the link. For some situations in life quitting is the best option, allowing you to put your efforts into more rewarding pursuits.</p>

<p>But, what if quitting is also going against your morals in a particular situation? What if that's not who you want to be? </p>

<blockquote>
  <p>I'm not a quitter!</p>
</blockquote>

<p>Then you have a problem, or opportunity, depending on who you are listening to.</p>

<h4 id="setyourselfupforsucces">Set Yourself Up For Succes</h4>

<p>The first step is to define who you want to be. Cut away all the external factors, and just focus on the kind of actions and thoughts you want to be part of who you are. This has to be the first step, because without it, your lack of self-knowledge will guide you along false paths. More thought loops, more head spins, no remedy!</p>

<p>The answers are usually lurking at the back of your mind, but are swamped in the daily grind that engulfs us all. Or maybe paralyzed by the clashing of thoughts within. To let them come to the fore you need to set yourself up for success. But how do you do that?</p>

<p>Well, I find starting with the body helps. When the mind is a mess exercise does wondrous things for your ability to think straight. It helps burn away the negativity, and lets your brain pick its way through the fog as you churn out the miles, lift those weights, or dance until your muscles ache. </p>

<p>No matter what exercise you find acts as your 'therapist', do it, no matter how little energy you think you have. </p>

<blockquote>
  <p>Use your body to lead your mind</p>
</blockquote>

<p>Simply forcing yourself to act contrary to your lethargic feelings will put you in a better frame of mind, and of course this is a little bit of "fake it 'til you make it". </p>

<p>But it's all part of setting yourself up for success. Before you have even defined what that is, or how you go about it, putting yourself in the right frame of mind is a necessary prerequisite. </p>

<h4 id="forcingchange">Forcing Change</h4>

<p>Once you take the first step along that path, the rest will follow if you keep on track. The forcing part is about being hard on yourself, not accepting a backward step, or letting people get in your way. </p>

<blockquote>
  <p>Do something for others </p>
</blockquote>

<p>Surround yourself with the right kind of people. Ones who you can talk to, trust, and also do something good for. Maybe cook them dinner, or offer to help them for nothing in return. </p>

<p>This positivity will reenforce itself within you and help you stay going in the right direction. Especially if you have to put some effort into it.</p>

<p>Much like exercising the body, you also need to exercise positivity, even when you don't feel like it. </p>

<p>All the while, your brain will be unravelling the entangled strings, helping you see the right path forward. Driven on by the power of the positivity you are bringing into your life, the decisions you make will be the right ones for the kind of person that you want to become. </p>

<h4 id="goingforit">Going For It</h4>

<p>The final step, should it ever come to it, might be to make a big decision, or take a chance on something far outside your comfort zone. </p>

<p>If you find yourself in such a situation, take this simple piece of advice; <em>"that which is falling should also be pushed"</em>, apply your own thermodynamics, and light a fire under your actions.</p>

<p>If you've taken a decision, and know it's the right one, go for it wholeheartedly and follow through with action. </p>

<p>Life is too short for observing relational physics at a slow pace, and your positive actions will only attract other positives to you. You'll be surprised how easy it is once you put yourself on the right track. </p>

<p>Positivity will flow back in your direction, and your life will improve with it. In the end you'll be the author of your own success, and will be a better person for taking those bold steps that align with your integrity, and <a href="https://soundcloud.com/yokoo/flux-fm-mgf-september-2014-podcast">improve the content of your mind</a></p>]]></content:encoded></item><item><title><![CDATA[Long Live the Command Line]]></title><description><![CDATA[<blockquote>
  <p>There's an app for that!</p>
</blockquote>

<p>The thing is, if you are doing more that just posting pictures of your dog online, making a todo list, or checking your bank account balance, there probably isn't an app for that. </p>

<p>I think that software development is currently going through a bloated phase</p>]]></description><link>http://blog.errright.com/long-live-the-command-line/</link><guid isPermaLink="false">c916a629-2e8f-4b89-924a-523801456a53</guid><category><![CDATA[Tech]]></category><category><![CDATA[Python]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Mon, 13 Apr 2015 12:12:58 GMT</pubDate><content:encoded><![CDATA[<blockquote>
  <p>There's an app for that!</p>
</blockquote>

<p>The thing is, if you are doing more that just posting pictures of your dog online, making a todo list, or checking your bank account balance, there probably isn't an app for that. </p>

<p>I think that software development is currently going through a bloated phase of UX/UI design input that it stiffling the forward momentum of many projects. </p>

<p>So many now have their own mini wannabe Steve Jobs looking to add a responsive user interface to a product that is ultimately not going to be used in a manner that a design team can envision. Mostly because not everyone wants to click around in PhotoShop all day, and eventually delete <code>.psd</code> files and call them failed experiments. </p>

<h4 id="designisrarelyforusers">Design is Rarely for Users</h4>

<p>UI/UX designers have one purpose in mind, and that is to see their design become the abstraction that sits on top of a platform to act as the user interface. They add this to their creative portfolio, and if they are happy with it they will be proud to have designed something that people use everyday. At the very least they should have something that recommends them to the next client. </p>

<p>Along the way, the user is hopefully considered in this process and their experience is actually improved and not hindered. Unfortunately a clean user interface usually means hiding half the functions, and keeping it that way results in endless support emails complaining about it.</p>

<blockquote>
  <p>Can we downgrade?</p>
</blockquote>

<h4 id="focus">Focus</h4>

<p>Additionaly, very often a designer is asked to pour efforts and resources into a one off task, or a low visibility function, just for the sake of it and this consumes both design and development time on something of low value. Nothing says job satisfaction like that!</p>

<h4 id="getoutofmyway">Get Out of My Way</h4>

<p>Finally, I want to play with a product and to see how it runs, so deploy your design resources where they matter; close to the clicky stuff! </p>

<p>And create elegant and powerful command line tools with good documentation to let advanced users zip through providing the services to those users who don't want to look behind the curtain. </p>]]></content:encoded></item><item><title><![CDATA[Rebuilding This Blog]]></title><description><![CDATA[<p>For the last 7 months I've poured my blogging efforts into the <a href="https://rhodecode.com/blog/author/brian-butler/">company blog</a> to the detriment of my own.</p>

<p>I found delivering week in week out tough, and was regularly stuck for ideas. It required a lot of discipline and overcoming writers block on more than one occassion. So,</p>]]></description><link>http://blog.errright.com/rebuilding-this-blog/</link><guid isPermaLink="false">f5fbbe13-7a82-4321-9c45-5a0af0d48ed9</guid><category><![CDATA[Ghost]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Sun, 12 Apr 2015 06:16:56 GMT</pubDate><media:content url="http://blog.errright.com/content/images/2015/04/IMG_7491-sm.jpg" medium="image"/><content:encoded><![CDATA[<img src="http://blog.errright.com/content/images/2015/04/IMG_7491-sm.jpg" alt="Rebuilding This Blog"><p>For the last 7 months I've poured my blogging efforts into the <a href="https://rhodecode.com/blog/author/brian-butler/">company blog</a> to the detriment of my own.</p>

<p>I found delivering week in week out tough, and was regularly stuck for ideas. It required a lot of discipline and overcoming writers block on more than one occassion. So, while I did learn the discipline part I lost a good chunk of the fun factor. </p>

<p>Also, creating a well written interesting post that I am happy with is the real problem. Churning crap is always easy and I see so many blogs build their posts from scraps copied from another. I'd rather not let that be my (lack of) style!</p>

<p>So, today I'm making a public statement that I will revive the efforts going into this one and get it back on track.</p>

<p>Now that I've said it, I have to do it!</p>]]></content:encoded></item><item><title><![CDATA[Interstellar]]></title><description><![CDATA[<p>Last night <a href="http://www.imdb.com/title/tt0816692/">Interstellar</a> became the 2nd movie of all time to make my highly prestigious "walk-out" list. This ranks it up there with a particularly traumatic experience which saw me once end up in a theatre showing <a href="http://www.imdb.com/title/tt0458352/">The Devil Wears Prada</a>. </p>

<p>While the Prada debacle was an honest mistake that</p>]]></description><link>http://blog.errright.com/interstellar/</link><guid isPermaLink="false">ff6992cc-c01e-49c4-9d24-2ecf0ec65e21</guid><category><![CDATA[Kino]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Wed, 03 Dec 2014 08:06:58 GMT</pubDate><content:encoded><![CDATA[<p>Last night <a href="http://www.imdb.com/title/tt0816692/">Interstellar</a> became the 2nd movie of all time to make my highly prestigious "walk-out" list. This ranks it up there with a particularly traumatic experience which saw me once end up in a theatre showing <a href="http://www.imdb.com/title/tt0458352/">The Devil Wears Prada</a>. </p>

<p>While the Prada debacle was an honest mistake that I quickly recovered from, this Interstellar one I really didn't see coming. I voluntarily walked into the cinema, bought a ticket, a few beers, and some popcorn. All set for take off, or so I thought. </p>

<h4 id="timeandspace">Time and Space</h4>

<p>Looking back at the movie, I wonder did it ever really take off. The most interesting thing about Interstellar is how it deals with a somewhat dystopian future where crop failures have ravaged mankind's ability to speak clearly, serve hotdogs at a baseball game, or close the windows during a dust storm. </p>

<p>Once the opening scene of 7 hours was over, there was suddenly a secret NASA space research centre hidden behind one of the corn fields. Where else would it be?!</p>

<p>This obviously had old robots doing most of the work, such as opening the gate, and making jokes. The robot with sarcasm setting 100% was my favourite, until of course it was reduced to 75%. Presumably to keep the speed of time so slow, that mere minutes watching the movie felt like hours in real life! </p>

<h4 id="badcasting">Bad Casting</h4>

<p>The biggest gap in the movie was the absence of Bruce Willis. Someone needed to shoot that wormhole, or Will Smith to fly some converted crop spraying bi-plane out of the solar system with a box of fireworks taped to the back of it as thruster boosters. </p>

<p>I'm skipping over the whole gravity binary signal thing because you really don't want to see it, nor read about it. </p>

<p>Some stuff happened then during the 7 year period where they pitched the badly spoken, hat wearing, ex-spaceship pilot, widower farmer Matthew McSleepy as the only potential saviour of this planet. He eventually got in his spaceship, before which there was a dramatic wrist-watch scene, and then some more time-space things happened. </p>

<p>Somewhere along the way they surfed a wave on one planet that took 23 years, and suddenly Matt Damon woke up on a different planet far far away. Even though the planet was extremely cold there were no killer polar bears, which was disappointing. At that point I'd have taken anything to speed up the film! When Matt Damon did wake up I thought</p>

<blockquote>
  <p>"No Matt, no, go back to sleep!" </p>
</blockquote>

<p>I was very emotional at this point as you can tell! </p>

<p>But Matt didn't listen, and when he started crying into the other Matt's arms, I cried too. I knew that after 48 years in the cinema, and with no more popcorn or beer, my time in that world was coming to an end. </p>

<h4 id="beerdrought">Beer Drought</h4>

<p>Somewhat ironically, the lack of beer, presumably caused by a sudden wheat crop failure in this world, had me running very low on mind numbing enhancers and I was fading fast. </p>

<p>Then the dramatic death scene happened. Of course it was all a lie! </p>

<p>The underlying assumptions about time had been wrong and suddenly McSleepy's now 743 year old daughter was about to save the world with some trick maths equation. Presumably this saw her save the whole thing and meet her father who was now younger than her, but they eventually reconciled and love conquered all, or some rubbish like that.</p>

<p>Anyway, I say presumably because at this point I was prompted by a fellow time-space travelling physicist that the exit sign was hurtling towards us, from our future, at a much faster rate than anticipated, into our present. I wandered back out onto the street, older, but I don't know by how much! </p>]]></content:encoded></item><item><title><![CDATA[Busted!]]></title><description><![CDATA[<p>Once again I destroyed my blog, and I just deleted all my backups yesterday in a stupid clean up my computer delete everything session! </p>

<p>Give this a few days! </p>]]></description><link>http://blog.errright.com/busted/</link><guid isPermaLink="false">14279e1b-634c-464e-be8b-436fe1f66f81</guid><category><![CDATA[Stupidity]]></category><category><![CDATA[Ghost]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Fri, 28 Nov 2014 07:42:59 GMT</pubDate><content:encoded><![CDATA[<p>Once again I destroyed my blog, and I just deleted all my backups yesterday in a stupid clean up my computer delete everything session! </p>

<p>Give this a few days! </p>]]></content:encoded></item><item><title><![CDATA[Switching from Homebrew to Nix]]></title><description><![CDATA[<p>The <a href="http://nixos.org/nix/">Nix package manager</a> has a number of unique features that differentiate it from <a href="http://brew.sh/">Homebrew</a>. These enable it to provide a much more stable and smoother installation experience when managing different environments and dependencies.</p>

<p>The smoother experience is due to Nix using <strong>binaries</strong> when installing software. This eliminates the need</p>]]></description><link>http://blog.errright.com/switching-from-homebrew-to-nix/</link><guid isPermaLink="false">ae8f9403-1e8e-499d-ab5a-d19cfcbfcddb</guid><category><![CDATA[Computing]]></category><category><![CDATA[Nix]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Sun, 27 Jul 2014 11:58:00 GMT</pubDate><content:encoded><![CDATA[<p>The <a href="http://nixos.org/nix/">Nix package manager</a> has a number of unique features that differentiate it from <a href="http://brew.sh/">Homebrew</a>. These enable it to provide a much more stable and smoother installation experience when managing different environments and dependencies.</p>

<p>The smoother experience is due to Nix using <strong>binaries</strong> when installing software. This eliminates the need to compile from source. <br>
Increased stability is supported through a generation system. Each new package installation creates a <strong>new generation</strong> of your environment which can be easily rolled back should an error occur. </p>

<p>Nix also supports creating <strong>isolated development environments</strong>. These isolated development environments also have their own generation roll back system. This allows you to completely compartmentalize your system into many stable custom environments.</p>

<h4 id="nixpackagemanagerfeatures">Nix Package Manager Features</h4>

<p>The following are some of the differences compared to Homebrew and how they can make the user experience a lot more pleasant.</p>

<ul>
<li><p><strong>Nix channels</strong> contain previously compiled binary versions of a package from where downloads are sourced. This means that you do not need to download and compile a package, its dependencies, and pray, but instead you download and untar a working tarball from a channel. 
Use the following command to view your download channels:<br> <br>
<code>brian@rhodecode:~# nix-channel --list nixpkgs http://nixos.org/channels/nixpkgs-unstable</code></p></li>
<li><p>Nix <strong>--rollback</strong> and <strong>--switch-generation</strong> functions provide the additional stability. Each package installation creates a new generation of your Nix environment. This means that if a download breaks a build you simply rollback to the last previous working generation.</p></li>
<li><p>The <code>nix-shell</code> is used to provide isolated environments. </p></li>
</ul>

<h4 id="makingtheswitchtonix">Making the Switch to Nix</h4>

<p>To switch package handling from <a href="http://brew.sh/">Homebrew</a> to <a href="http://nixos.org/nix/">Nix</a>, use the following steps:</p>

<ol>
<li><p>Find out which packages you currently manage with homebrew:</p>

<pre><code>  $ brew list
  openssl python treadline sqlite
</code></pre></li>
<li><p>Remove these packages from your system.<br> <code>brew remove package-name</code>  </p></li>
<li><p>Remove Homebrew using the following steps: </p>

<pre><code>cd brew --prefix
rm -rf Cellar brew 
prune rm git ls-files
rm -r Library/Homebrew Library/Aliases Library/Formula Library/Contributions
rm -rf .git
rm -rf ~/Library/Caches/Homebrew` 
</code></pre></li>
<li><p>Install Nix on your operating system with the following command: </p>

<pre><code>$ bash &lt;(curl https://nixos.org/nix/install)
</code></pre>

<ul><li>For more information, see <a href="http://nixos.org/nix/download.html">Getting Nix</a> </li></ul>

<p><strong>Note:</strong> the installer sources a Nix profile in the <code>~/.profile</code> or <code>~./bash_profile</code> file by adding the following line:</p>

<pre><code>if [ -e /Users/brian/.nix-profile/etc/profile.d/nix.sh ]; 
then . /Users/brian/.nix-profile/etc/profile.d/nix.sh; fi 
# added by Nix installer
</code></pre>

<p>If during installation this is not created, you should add it manually to the appropriate file. </p></li>
<li><p>Once Nix is downloaded. Reinstall the packages you require with the Nix install command:</p>

<pre><code># download package-name
nix-env --install package-name  
# see all available packages
nix-env --query --available
</code></pre></li>
</ol>

<p>For more information, see <a href="https://nixos.org/wiki/Nix_Installing_Packages">Nix Installing Packages</a> </p>

<p><strong>Note:</strong> Package names in Homebrew and Nix may not be the exact same, but should be similar. You can view all package names using this command: </p>

<pre><code>brian$ nix-env -qaP
</code></pre>

<h4 id="installingwithnix">Installing with Nix</h4>

<p>Once you have reconfigured your package manager to Nix, you can see where the default packages are using the <code>which</code> command, and <strong>rollback</strong> <code>nix-env --rollback</code> or <strong>switch generation</strong> <code>nix-env --switch-generation generation-number</code>. </p>

<pre><code>brian@rhodecode:~# which python/usr/bin/python 
brian@rhodecode:~# nix-env -i python
installing `python-2.7.8'
building path(s) /nix/store/iqm4bnb1assfdwka4xmmky96yrnhj91w-user-environment'
created 263 symlinks in user environment
brian@rhodecode:~# which python
/root/.nix-profile/bin/python
</code></pre>

<h4 id="wheninstallsgobad">When Installs Go Bad</h4>

<p>This is where Nix comes into a league of its own. If an install wrecks your development environment, you can simply rollback to the previous working one. </p>

<p>Additionally, the Nix <strong>Garbage collection</strong> function allows you to quickly clean up your environment once you have carried out a number of changes: </p>

<pre><code>nix-collect-garbage -d
</code></pre>

<p>See the following example for an explanation of these functions:</p>

<pre><code>[nix-shell:~]$ nix-env -i python3 # Install Python 3
replacing old `python3-3.4.1'\n
installing `python3-3.4.1'\n
[nix-shell:~]$ which python3 # based on latest gen\n/root/.nix-profile/bin/python3\n
[nix-shell:~]$ nix-env --list-generations\n   
1   2014-07-27 10:18:50    
2   2014-07-27 10:31:27      
3   2014-07-27 14:06:42      
4   2014-07-27 14:09:27      
5   2014-07-27 14:16:44      
6   2014-07-27 14:16:53      
7   2014-07-28 08:13:07      
8   2014-07-28 08:20:00      
9   2014-07-28 08:21:42     
10   2014-07-28 08:22:31  (current)
[nix-shell:~]$ nix-env --switch-generation 4 
switching from generation 10 to 4
[nix-shell:~]$ which python3 # based on gen 4
/usr/bin/python3
[nix-shell:~]$ nix-env --switch-generation 10
switching from generation 4 to 10
[nix-shell:~]$ nix-collect-garbage -d 
removing old generations of profile /nix/var/nix/profiles/default
removing generation 1
.
.
removing generation 9
removing old generations of profile /nix/var/nix/profiles/per-user/root/channels\nfinding garbage collector roots...
deleting garbage...
875 store paths deleted, 552.07 MiB freed
[nix-shell:~]$ nix-env --list-generations  
10   2014-07-28 08:22:31   (current)
[nix-shell:~]$ exit
brian@rhodecode:~/nix-project#
</code></pre>

<h4 id="uninstallingwithnix">Uninstalling with Nix</h4>

<p>To remove a package with Nix, use the <code>-e</code> flag. For example:</p>

<pre><code>nix-env -e package-name
</code></pre>

<p>Nix will gracefully handle the uninstall and also remove any symlinks created to support the package:</p>

<pre><code>brian@rhodecode:~# nix-env -e git
uninstalling `git-2.0.2'\nbuilding path(s) `/nix/store/vz37m6k23r7j5mnvmij92bnym6j16cbl-user-environment'
created 6 symlinks in user environment
</code></pre>

<h3 id="settingupanisolatedenvironment">Setting Up an Isolated Environment</h3>

<p>The <code>default.nix</code> file is used to define an environment. Each system can have multiple <code>default.nix</code> files which create independant work areas. This enables multiple different package versions to be installed and run on the same machine without introducing dependency conflicts.</p>

<p>Additionally, this allows very easy environment sharing because you can share your <code>default.nix</code> file, and colleagues will have an exact copy of your setup. </p>

<h4 id="configuringdefaultnix">Configuring <code>default.nix</code></h4>

<p>Configuring a <code>default.nix</code> file requires declaring your setup within the file. This is why it is called a <strong><a href="http://nixos.org/nixos/about.html">declarative setup</a></strong>. </p>

<p>Every time you run <code>nix-shell</code>, Nix will ensure that you get a consistent set of binaries corresponding to your specification.</p>

<p>For specific projects you should install the packages you need in a project folder that also contains a <code>default.nix</code> file. This way project specific packages do not confllict with system packages.</p>

<p>To create a project specific work area use the following steps: </p>

<ol>
<li>Create a new folder <code>mkdir new-project</code>  </li>
<li><p>Navigate to that folder and create a  <code>default.nix</code> file. Within this file you must specify the particular packages for that work environment. Use the following examples to create your own <code>default.nix</code> file. This example <code>default.nix</code> file specifies the required packages in the <code>buildInputs</code> section. </p></li>
<li><p>In this example, the <code>rhodecode-docs</code> project requires:</p>

<pre><code>{ system ? builtins.currentSystem
}:
let
pkgs = import &lt;nixpkgs&gt; { inherit system; };
inherit (pkgs) fetchurl fetchgit;
buildPythonPackage = pkgs.python27Packages.buildPythonPackage;
python = pkgs.python27Packages.python;


Jinja2 = buildPythonPackage rec {
  name = "Jinja2-2.7.3";
  src = fetchurl {
  url = "http://pypi.python.org/packages/source/J/Jinja2/${name}.tar.gz";
  md5 = "b9dffd2f3b43d673802fe857c8445b1a";
  };    
  propagatedBuildInputs = [ MarkupSafe ];  
};


MarkupSafe = buildPythonPackage rec {
  name = "MarkupSafe-0.19";
  src = fetchurl {      
  url = "https://pypi.python.org/packages/source/M/MarkupSafe/${name}.tar.gz";
  md5 = "ccb3f746c807c5500850987006854a6d";
  };  
};


Pygments = buildPythonPackage rec {
  name = "Pygments-1.6";
  src = fetchurl {      
  url = "https://pypi.python.org/packages/source/P/Pygments/${name}.tar.gz";      
  md5 = "a18feedf6ffd0b0cc8c8b0fbdb2027b1";
  };
 };


Sphinx = buildPythonPackage (rec {    
  name = "Sphinx-1.2.2";   
  src = fetchurl {      
  url = "http://pypi.python.org/packages/source/S/Sphinx/${name}.tar.gz";      
  md5 = "3dc73ccaa8d0bfb2d62fb671b1f7e8a4";    
  };
propagatedBuildInputs = [ docutils Jinja2 Pygments ];
});


docutils = buildPythonPackage rec {   
  name = "docutils-0.8.1";    
  src = fetchurl {      
  url = "https://pypi.python.org/packages/source/d/docutils/${name}.tar.gz";
  md5 = "2ecf8ba3ece1be1ed666150a80c838c8";
  };  
};


in python.buildEnv.override {
inherit python;  
extraLibs = [ Sphinx ];
}
</code></pre></li>
</ol>

<h4 id="usingnixshellfunctionality">Using <code>nix-shell</code> Functionality</h4>

<p>Once your environment is declared in the <code>default.nix</code> file you can use the <code>nix-shell</code> functionality to create your isolated development environments. Both of the following examples carry out the same function of creating a new Sphinx installation.</p>

<ul>
<li><p>To issue a single command from the <code>nix-shell</code> you can issue it like this:</p>

<pre><code>brian$ nix-shell --command=sphinx-quickstart
</code></pre></li>
<li><p>To develop within the <code>nix-shell</code>, switch into it and execute the specific environment commands from within.</p>

<pre><code>brian@rhodecode:~/nix-project# vi default.nix
brian@rhodecode:~/nix-project# nix-shell
these paths will be fetched (2.59 MiB download, 14.76 MiB unpacked):
/nix/store/0nh2bmaf0d3h0m16mggw2ipji2symb9n-python2.7-markupsafe-0.15
Downloading `http://cache.nixos.org/nar/0xhnlcz9f1wak7dhhrnznbgbjxqimkk0wip7q9w38xnllw7dmhgn.nar.xz’ to ‘/nix/store/q486ypcjr6kgkw8c62574dqp97sgh9d0-python2.7-Sphinx-1.2’...
[nix-shell:~/nix-project]$ sphinx-quickstart
Welcome to the Sphinx 1.2 quickstart utility
.
.
.
[nix-shell:~/nix-project]$ exit
brian@rhodecode:~/nix-project# 
</code></pre></li>
<li><p><strong>Note:</strong> You need to navigate to where you have the <code>default.nix</code> file stored. </p></li>
</ul>

<h4 id="conclusion">Conclusion</h4>

<p>Once you have carried out these steps you will be able to manage your environments much more easily. </p>]]></content:encoded></item><item><title><![CDATA[Moving to Berlin]]></title><description><![CDATA[<p>If you are just about to move to Berlin, here are some tips that should help you get through those Germanic  "ordnung" idiosyncrasies.   </p>

<h4 id="planahead">Plan Ahead</h4>

<p>Unlike moving to Argentina, Spain, or even Austria, moving to Germany isn't really a make it up as you go along thing. The information contained</p>]]></description><link>http://blog.errright.com/moving-to-berlin/</link><guid isPermaLink="false">fc1336ba-4bee-4db0-9703-0c08a1255957</guid><category><![CDATA[Berlin]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Sun, 15 Jun 2014 08:13:00 GMT</pubDate><content:encoded><![CDATA[<p>If you are just about to move to Berlin, here are some tips that should help you get through those Germanic  "ordnung" idiosyncrasies.   </p>

<h4 id="planahead">Plan Ahead</h4>

<p>Unlike moving to Argentina, Spain, or even Austria, moving to Germany isn't really a make it up as you go along thing. The information contained in this article should help you do that.   </p>

<h4 id="happeningneighbourhoods">Happening Neighbourhoods</h4>

<p>If you want to have a good time, lots of interesting pubs, cool clubs, great restaurants, frequent and varied <a href="http://www.meetup.com/">meet ups</a>, and a constant stream of level 7 hipsters with some questionably placed facial tatoos walking by, then you should try these neighbourhoods.  </p>

<ul>
<li>Kreuzberg </li>
<li>Mitte </li>
<li>Friedrichshain </li>
<li>Prenzlauer Berg </li>
</ul>

<h4 id="findinganapartment">Finding an apartment</h4>

<p>Apartment hunting is a nightmare at the moment, because Berlin is the capital city of the only country in Europe that is currently not trying to <a href="http://www.theguardian.com/uk-news/2014/jun/16/london-water-cannon-bargain">water cannon</a> young people off the streets to make way for, ironically enough, <a href="http://www.independent.ie/irish-news/meters-removed-by-irish-water-after-three-week-standoff-in-housing-estate-30274126.html">water meters</a>! </p>

<ul>
<li><p>Tip 1. <strong>Don't Use Craigslist</strong> Here is an example of the  "Nigerian Price " style scams going on</p>

<blockquote>
  <p>I will want you to go to the nearest store near you and make the payment via western union to me.When you get there you tell them you want to send money via western union and they would give you a form to fill and then you fill my  information below...I will be heading to DHL Office to arrange for the shipment of a package to you next day delivery. i will be sending to you(KEYS AND DOCUMENTS) </p>
</blockquote></li>
<li><p>Tip 2. <a href="https://en.wikipedia.org/wiki/Schufa">schufa</a> <br>It is basically proof that you have an income that can support your rent. This means without a schufa you pay a premium on your rent as you are not  "schufa'd ". Of course, only a German income counts, so it'll be a while before you have a schufa rating. Catch 22 stuff. </p></li>
<li><p>Tip 3. Start looking here, and if you are lucky you may get a place without too much trouble. Stay strong, and expect many to not even reply to your inquiry.  </p></li>
<li><a href="http://www.coming-home.org/">Coming Home</a> </li>
<li><a href="http://www.berlin99.com/">Berlin99</a> </li>
<li><a href="http://www.wg-gesucht.de/">WG-Gersucht</a> </li>
<li><a href="https://www.dreamflat.com/wg-berlin/">Dreamflat</a> </li>
</ul>

<h4 id="getregisteredwiththebrgeramtasap">Get Registered with the Bürgeramt ASAP</h4>

<p>Once you have found a place the fun only gets better. First things first, you have to register with the <a href="http://www.berlin.de/buergeramt/">Bürgeramt</a> so that you are on the system as living in your new apartment. Once on the system you are almost a good German. </p>

<p>Each area or suburb has it's own Bürgeramt and you must register at your local one. They normally open from <a href="http://www.berlin.de/ba-friedrichshain-kreuzberg/verwaltung/org/buergeramt/oeffnungszeiten.html">08:00-13:00</a>, and the queues are ridiculous. Get there early, I went there for 7:45am and was still the 50th or so in the queue. </p>

<p><strong>Note:</strong> If need be you can register your address at a hostel or some other temporary abode. </p>

<h4 id="gethealthinsuranceasap">Get Health Insurance ASAP</h4>

<p>By German law everyone must have health insurance and your employers need some proof of it for your monthly tax deductions. Health insurance must be from a German health insurance company, or from a foreign one that passes a certain standard. You have 3 options: </p>

<ol>
<li>Private health insurance.  </li>
<li>Public health insurance.  </li>
<li>Foreign health insurance.</li>
</ol>

<p>To make a very long and uninteresting story short. Unless you <strong>really really really</strong> like jumping through hoops to save a few euros. Call a <a href="http://www.tk.de/tk/english/610312">public health insurance</a> company and you will be sorted in a few days. Then you will be a more improved German.</p>

<h4 id="getyourtaxid">Get Your Tax ID</h4>

<p>When you register at the Bürgeramt you also get a tax ID. Your employer will need this. Of course, giving it to you then and there would save you time and be efficient. So, just to make sure there is none of that nonsense you are again faced with choices: </p>

<ul>
<li>You can wait approximately 6 weeks for it to arrive in the post, during which time you will be taxed at the maximum non-refundable rate.  </li>
<li>You can go and queue at the Finanzamt and get it. </li>
</ul>

<p>Luckily for you the queues are not so big at the finanzamt, as it appears people are not as into registering to pay tax as they are into registering where their bills should arrive. </p>

<p>Once you take care that, you should be on the system. It's an enjoyable adventure and you'll also find that those working in that system are very happy, with big smiley faces, and lots of motivation to do a good job. You never feel like just another number in a giant pointless game of paper pushing pedantry! </p>

<p>You will now be registered, paying taxes, and insured. A proper German. You'll also probably be heavily drinking bier from glass bottle as you walk around town. </p>

<p>I'll continue updating this post as I go through all these processes.  </p>

<p>Happy queuing! </p>]]></content:encoded></item><item><title><![CDATA[Bitcoin Starter Advice]]></title><description><![CDATA[<p>Bitcoin keeps growing, the name gets more recognition, and the price movements light up the greed in people who seek riches. But money is only a proxy for freedom. The focus on just a number will mean you will never be sated, you probably won't even understand the meaning of</p>]]></description><link>http://blog.errright.com/bitcoin-start-advice-2/</link><guid isPermaLink="false">c85d0ae3-7e6c-41c3-b3bd-a2a2b587b9a6</guid><category><![CDATA[Economics]]></category><category><![CDATA[Bitcoin]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Mon, 19 May 2014 16:22:00 GMT</pubDate><content:encoded><![CDATA[<p>Bitcoin keeps growing, the name gets more recognition, and the price movements light up the greed in people who seek riches. But money is only a proxy for freedom. The focus on just a number will mean you will never be sated, you probably won't even understand the meaning of the number, and you will forever stay chasing more. If I was to suggest one approach to the bitcoin novice it would be this. </p>

<p>Pick a number [i.e. €500] and invest it under the assumption you will lose it. But while losing it you will use the process to learn. </p>

<ul>
<li>You will learn what trading is really all about. </li>
<li>You will learn about bitcoin properly </li>
<li>You will learn about other crypto-currencies </li>
<li>You will learn about researching stocks on a bitcoin stock exchange </li>
<li>You will learn how to avoid frauds, scams and ponzi schemes </li>
<li>You will learn about pump and dumps </li>
<li>You will learn how to hedge and speculate and take your profits at the right time </li>
<li>You will learn how little you really need a bank to be financially secure</li>
<li>You will learn how there is no such thing as security outside of being responsible for yourself in all matters</li>
<li>You will learn how you don't need a financial advisor or a ratings agency to carry out this research for yourself and that it is not a complicated field. It is simply buying, selling and speculating in ideas!</li>
<li>You will only learn these things by making every poor, ill thought out, novice, dreamer, get rich quick hope, idiot mistake with up that €500.</li>
</ul>

<p>In the end perhaps you will learn that you would rather someone else take on the stress of doing that job for you, but you will at least know enough so that that person cannot blind you with bullshit in the future.</p>

<p>You would pay a whole pile more to do some night school college course into all of those things, and yet none of them will ever teach you like you will learn when you are losing your own money. None of them ever give you the chance to make more in return either!</p>

<p>Nothing sharpens the mind like having skin in the game, and for a 500€ experiment you will gain a lot of education, fun, ups, downs, exposure to a whole new field, and a rollercoaster of emotions along the way.</p>

<p>Some days you will feel wise yet surrounded by fools, other days you'll be the biggest idiot alive who hasn't a clue about what is going on and wonder how you made such a stupid mistake! </p>

<p>Simply sitting in a classroom listening to half assed theories from people who never tried any of them can never teach you like doing it yourself.</p>

<p>By Christmas if the €500 is gone, so be it, you'll be a lot wiser. If it is worth €5,000 then enjoy it, buy a nice suit and good shoes, and start on a whole new learning curve next year. That curve will be built on all the lessons of this year. It will surely take you higher and you will be a few more degrees freer, but maybe not richer!</p>]]></content:encoded></item><item><title><![CDATA[Adding muut comments to a ghost blog]]></title><description><![CDATA[<p>After upgrading to ghost 0.4.3 over the weekend and finding that a few of my custom configurations got zapped...well, I should have backed up the <code>post.hbs</code> and the <code>default.hbs</code> files, shouldn't I!</p>

<p>The below steps will get a <a href="https://muut.com/">muut</a> comments section up and running on</p>]]></description><link>http://blog.errright.com/adding-muut-comments-to-a-ghost-blog/</link><guid isPermaLink="false">b67baf0b-7219-4db4-b7e0-efa718f57a09</guid><category><![CDATA[Ghost]]></category><category><![CDATA[Computing]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Mon, 12 May 2014 05:48:00 GMT</pubDate><content:encoded><![CDATA[<p>After upgrading to ghost 0.4.3 over the weekend and finding that a few of my custom configurations got zapped...well, I should have backed up the <code>post.hbs</code> and the <code>default.hbs</code> files, shouldn't I!</p>

<p>The below steps will get a <a href="https://muut.com/">muut</a> comments section up and running on your site, but before you do that you might need to <a href="https://muut.com/setup/">set up a muut account</a>.</p>

<p>Once you have your muut details, to embed them into ghost simply do the following. </p>

<ul>
<li><p>Configure the <code>default.hbs</code> file to pick up the muut stylesheet and the comments section plug in:</p>

<ol><li>Open the <code>~/ghost/content/themes/casper/default.hbs</code> file. </li>
<li>Insert the following CSS stylesheet link into the <code>{{! Styles'n'Scripts }}</code> section of the file: <code>&lt;link rel="stylesheet" type="text/css" href="//cdn.muut.com/latest/moot.css"&gt;</code> </li>
<li>Insert the following muut JavaScript link into <code>{{! The main JavaScript file for Casper }}</code> section of the file. <code>&lt;script src="//cdn.muut.com/1/moot.min.js"&gt;&lt;/script&gt;</code> </li>
<li>Save and exit. Here are screenshots of my configuration.
<img src="http://blog.errright.com/content/images/2014/May/muut_css_cfg.png" alt="embed css shot" title=""><img src="http://blog.errright.com/content/images/2014/May/muut_js_cfg.png" alt="embed js shot" title=""></li></ol></li>
<li><p>Configure the <code>post.hbs</code> file to insert the comments section at the bottom of each article you write. <br><strong>Note:</strong> Before you continue here, make sure you have your muut information. You should be able to get it, using this link as an example<br> <code>https://muut.com/YOUR_FORUM_NAME#embed</code>. Once you have that, use the following steps:</p>

<ol><li>Open the <code>~/ghost/content/themes/casper/post.hbs</code> file. </li>
<li>Add your muut forum code under the footer section of the file.</li>
<li>Save and exit. </li></ol>

<p>Here is a screenshot of my configuration.</p>

<p><img src="http://blog.errright.com/content/images/2014/May/Screen-Shot-2014-05-12-at-09-39-08.png" alt="embed blog shot" title=""></p></li>
</ul>

<p>Finally, restart ghost to pick up the changes: <br>
<code>service ghost restart</code></p>

<p>Or, if like me you are using the <a href="https://github.com/nodejitsu/forever">forever command</a>.</p>

<ul>
<li>Stop the running ghost instance and start it again
<pre>cd ~/var/www/ghost/
forever stop index.js
NODE_ENV=production forever start index.js</pre></li>
</ul>

<p><strong>Note:</strong> Using the <code>forever restart</code> option does not pick up file changes for me, perhaps it's a bug with ghost, or forever, or me! That is why I have to stop/start it. And, below is the comments section that prove this works!</p>]]></content:encoded></item><item><title><![CDATA[Health Care Reform Suggestion]]></title><description><![CDATA[<h4 id="overview">Overview</h4>

<p>This post aims to suggest a complete overhaul of two aspects of Irish society for the possible benefit of anyone who needs a body, which is currently everyone except a few people working on the Calico project at <a href="https://plus.google.com/+LarryPage/posts/Lh8SKC6sED1">Google</a>. </p>

<p>The general idea is to propose the creation of a</p>]]></description><link>http://blog.errright.com/health-care-reform-suggestion/</link><guid isPermaLink="false">49ad3546-69ed-44aa-a289-c063bf09528c</guid><category><![CDATA[Economics]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Wed, 30 Apr 2014 10:22:00 GMT</pubDate><content:encoded><![CDATA[<h4 id="overview">Overview</h4>

<p>This post aims to suggest a complete overhaul of two aspects of Irish society for the possible benefit of anyone who needs a body, which is currently everyone except a few people working on the Calico project at <a href="https://plus.google.com/+LarryPage/posts/Lh8SKC6sED1">Google</a>. </p>

<p>The general idea is to propose the creation of a virtuous circle that creates a positive feedback loop for all participants within the system. </p>

<h5 id="firsttheeconomicsofhealthcare">First the economics of health care.</h5>

<p>When people are young and healthy they are cheap to insure, do not need hospital care and pay far more every year through insurance premiums, and added health taxes, than they need. This surplus washes through the system and allows health executives and quangos lead an enjoyable life. Nurses and doctors do get some benefits, like pay and timetables, and some patients benefit, occassionally. </p>

<p>When people are sick or old, they are expensive to insure, so nobody wants to insure them. <strong>What would be the point of insuring someone if you actually had to pay out?</strong> When these higher risk people become patients, they generally spend a load of time sleeping on a trolley in a waiting room, and they burn through quite a bit of the money collected in their name, mostly through taxes or idiots wearing hats and selling stickers at Christmas.</p>

<p>This leaves a lot less surplus to top up those executive pension funds, think tank conflabs, international conference travel expense accounts, and advertising campaigns. Nurses and doctors do get some benefit from this, mostly pens from pharmaceutical companies, presentations from investment firms about topping up their their AVCs, and the occasional clipboard from an equipment supplier. Some patients do benefit, but accidently.</p>

<p>So the economics of medicine are that; it is expensive for healthy people with no return, more expensive for sick people with little return, and fabulous if you have a cushy number on a health board. </p>

<p><strong>Note:</strong> If you don't understand insurance, or hold <strong>the common and completely wrong</strong> view that paying more insurance when younger is necessary because you will use more when older, go and learn <a href="http://en.wikipedia.org/wiki/Insurance">what insurance is</a> before continuing.</p>

<h5 id="howtofixthis">How to fix this?</h5>

<p>Firstly, the economics of health cannot be changed. There is no magic wand. So, what needs to be creatively thought about is a funding process that gives back more than a trolley in a waiting room, minimises corruption, and becomes a virtuous circle that positively benefits all those within the system, thus giving them reason to partake in it. <br> <strong>Note: The creation of any virtuous circle requires burning out all malignancies!</strong> <br>Bear this in mind when the inner voice starts telling you <strong>"It's not possible"</strong>. That inner voice is a reflection of your conditioning!</p>

<h4 id="theproposedsystem">The proposed system</h4>

<p>Many people consider the GAA a crown jewel within Irish society, so why not polish it up, and use it for something more than a load of round-robin, back-door, Pat Spillane bashed, play-off games in mid-summer, that result in 1000s of lads sitting around doing nothing for weeks on end because 15 players on a county team need to be wrapped in cotton wool.</p>

<blockquote>
  <p>I might add that in my opinion the intercounty championship is dull and boring, and the real action is at club level. </p>
</blockquote>

<p>So, I suggest the adoption of a system somewhat like this: </p>

<ol>
<li>All county boards and newly created 'county health boards' come together with the local GAA, soccer, rugby and whatever else people pay money to go and watch, and create a viable business model that sends a percentage of the revenue generated into the county health budget.  </li>
<li>Each of these sports, or events, would be properly <br>
calendared so that a year round series of high quality events was available for the county to get out, enjoy and to  keep revenue pouring into the particular sport, and the county health fund. <strong>Once again, don't listen to that inner voice of conditioned helplessness saying it could never happen</strong>  </li>
<li>Each county would have to become self-sufficient in providing it's own health care. Of course counties may merge and other counties may form co-operatives to purchase equipment in bulk. The minor details of this people can add to in a million and seven different ways. That is the purpose of making it as local and decentralised as possible.  </li>
<li>Create lasting value in the provision of these local events by making sure leagues, championships or whatever else, are run in a professional and competent manner that gets big crowds in the gates or watching on TV.  </li>
<li>It is imperitive that the county health boards cede from the centralised bureacracy that a body like the HSE has become. This requires rejecting outside interference in local management, and complete rejection of an overlord authority. Particularly anything calling itself a Minister for Health! <br> The application of 26 different counties, using 26 different methodologies, in an attempt to solve their own diverse health care issues would lead to some outstanding innovation and allow a much wider range of possible solutions to be tried. It would not take long for the successful ideas to win out and gain acceptance in other counties, except Cork. Everyone knows Cork really wants to be Texas!  </li>
<li>The main focus of the monies collected through a system like this would be to cover the costs of capital expenditure in the form of hospitals, care centres, rehab centres, medical equipment, the people outside the insurance sweetspot, the handicapped, and in general the worst off within society.  </li>
<li>The creation of a competitive insurance market for those in the "insurance sweetspot" would keep premiums down on those who generally do not need it. </li>
</ol>

<p>This insurance market would cover the cost of paying the salaries of those working in the healthcare business; doctors, nurses, phyios, etc. as it would pay them for services rendered.</p>

<p>The separation of funding for facility costs from service costs would allow the competitive pricing of one without the drag of the other, and the reduction of costs to the average person in turn frees up more capital to be put towards useful purposes within society.</p>

<ol>
<li><p>In short, I propose that those who can get insurance, buy insurance on the free market, thus covering their own bills. This system is all based around the goal of providing quality health care. <br>The public health / private health care issue is a false dilemma caused by government interference. The private individual pays for all that, and it costs everyone money.</p></li>
<li><p>In this system it is up to the county health board to decide how to use the money generated by the system, and utilise that as a public health issue. Each county would then have to come up with innovative ways of dealing with the \"Medical card\" issue. Essentially those who can't or won't insure themselves and rely on charity. The medical card is charity, no matter how it is dressed up</p></li>
</ol>

<blockquote>
  <p>Just as aside about 'rights', particularly regarding anything that prepends 'free' to it. <br>If you think anything is your right; 'free' health care, 'free' education, freedom, 'free' speech you are automatically making it the responsibility of someone else to provide you with that right. Should you wish to sit back and enjoy your 'rights', you will lose them if you don't take personal responsibilty for them!  </p>
</blockquote>

<h5 id="thecreationofhealthcaremarketexchanges">The creation of health care market exchanges</h5>

<p>Markets are vitally important, and facilitate the provision of everything you have in life. Even a \"meat market\" disco-bar probably provided the world with you, after a deal was done after a whiskey too many.</p>

<p>But one of the most important market functions is <strong>price signal!</strong> Without a competitive marketplace on healthcare provision, the price of healthcare cannot be known. </p>

<p>This means that the county health boards need to compete for patients. Meaning all procedures, medicines, consultations and surgeries would have to be priced and traded on an exchange, in much the same way as the building and equipment costs are priced on a market. Not only would this allow patients to choose the best option for them, because premium vs lower end care will always exist, but it would also expedite their decision making process when care is needed, as patients and insurance companies would be able budget appropriately with what funds they have available. </p>

<p>To illustrate the point, imagine the following decision making chart for a Coronary Artery Bypass:</p>

<ul>
<li>Clinic A built and funded by the Limerick County Board.<br>Heart surgery team Clinic A | Experienced team with 300 surgeries | outstanding reputaton | good follow up care unit | cost €75,000</li>
<li>Clinic B built and funded by the Cork County Board.<br>Heart surgery team Clinic B | Young team 11 successful surgeries | limited repuation | good follow up care unit | cost €23,000</li>
</ul>

<p>This competition would also translate into certain boards specialising, thus paying more for certain doctors and nurses, making sure the best in a particular field ended up gravitating towards working with each other. This is good. If you think it is not, then imagine being treated by the medical equivalent of Real Madrid, or being treated by the equivalent of your average club hurling team who happen to have one outstanding player. No matter how good he or she is, someone not so good on that team will probably drop a sponge in you during surgery!</p>

<p>This ying and yang of competition and co-operation requires a little bit of thinking about, but everyone understands it almost instinctively. It comes pretty close to the internal conflict of being a human within all societies; to look after #1, or think of some greater good!</p>

<h5 id="minimisingcorruptiontheblockchain">Minimising corruption: The Blockchain</h5>

<p>Let me introduce you to the potential star in an endevour like this. A health care crypto-currency. The minimisation of corruption can only be brought about by complete openness, and a crypto-currency allows for complete openness while still allowing privacy to those interacting with it. </p>

<p>By making "SportHealthCoin" [<em>someone else think of a better name</em>] the payment mechanism for everything within this system it would create a demand for that coin.</p>

<ul>
<li>Insurance companies would need to hold, hedge and trade it to pay for bills. </li>
<li>People would need it to interact with their local events</li>
<li>Those working in the health system could be paid in it.</li>
<li>Heathcare exchanges would be priced in it. </li>
<li>The health county boards would pay for equipment in it. </li>
</ul>

<p>So long as the whole system used it to settle accounts, and the flow of value through it was large enough, and it was easily tradeable against other cryptocurrencies, FIAT currencies, commodities and had a futures and options market, the price of the crypto-currency would stabilise. That is one of the functions of capital markets.</p>

<p>One of the additional benefits of a crypto-currency backing the health system is that mining pools could be formed. Everyone within the system would be able to partake in the generation of the coin that the system needs. Boards, clubs, individuals, hospitals, players,  patients and anyone else would be able to use the process of mining and validating transactions on the system to generate their own income. </p>

<p>The creation of public wallets, such as the fund for cancer equipment, the fund for down syndrome care, the fund for whatever, would allow the money sent to those wallets to be accounted for in a completely transparent fashion. </p>

<h5 id="bonususage">Bonus usage</h5>

<p>Now imagine the added demand and price stability brought to this cryptocurrency if energy costs were also priced in it; petrol, electricity, gas, water!</p>

<p>This would mean that the power needed to run the network would be backing the currency, as well as the health care system, and a large chunk of the sports entertaiment available. </p>

<p>People understand the general idea of a currency backed by something tangible. The gold standard or the petrodollar, both of which generally result in certain oil or gas rich countries needing to be liberated. </p>

<p>Why is this this backing important? <br>
Because power, and health are always necessary. You can't live without either for too long, so by backing a currency with tangible assets that cannot be \"invaded or confiscated\" you sow the seeds of a virtuous circle, and reduce the governments ability to expropriate these assets for their \"favours and handouts for votes\" system. </p>

<p>The final piece of the jigsaw would be a completely open and tradeable energy unit exchange, allowing everyone to upload and download power onto the national grid as needed, and by backing this with the cryptocurrency would allow power generators to essentially make their own money. That should also open up the flood gates of creativity and see 1000s of new and individual ideas attempted at cracking the power dilemma which may be looming in the future, if you believe in peak oil and or limited resources. This of course would need a whole separate post of it's own and does not fall within the scope of this article.</p>

<h5 id="conclusion">Conclusion</h5>

<p>This is a general outline for a system that aims to generate revenue in as many imaginative and useful ways as possible, to eliminate as much corruption as possible, and to allow as wide a range of possible solutions to health care provision problems. </p>

<p>There is always enough money, it is simply a question of creating flows of value. The idea is to create a system generating value so great that it can support the underlying costs. </p>

<p>After that, it is up to the actors in the game to start upping their skills! </p>

<h5 id="thelikelihoodofsomethinglikethiseverhappening">The likelihood of something like this ever happening</h5>

<p>Maybe when the health situation reaches two patients per trolley!</p>

<h5 id="furtherreading">Further reading</h5>

<p>The idea is to enable swarm intelligence and decentralise decision making to overcome the problems facing society, and to enable maximum personal freedom and particpation, while guaranteeing the creation of "public good" infrastructure. If you cannot get your head around those ideas I recommend these three articles:</p>

<ul>
<li><a href="http://falkvinge.net/2011/08/01/swarmwise-what-is-a-swarm/">Swarmwise-what is swarm</a></li>
<li><a href="http://www.ariannasimpson.com/game-theory-assurance-contracts/">Assurance contracts for the creation of 'public good' infrastructure</a></li>
<li><a href="http://charleshughsmith.blogspot.com.ar/2014/02/the-impossible-but-inevitable-solution.html">The "Impossible" But Inevitable Solution: Decentralization</a></li>
<li><a href="http://www.testosteronepit.com/home/2014/4/23/doctors-perspective-perils-and-pitfalls-of-corporatized-medi.html">Why the split between facility costs and service costs makes a big difference</a></li>
</ul>]]></content:encoded></item><item><title><![CDATA[How to Install Wordpress with Nginx on an Ubuntu 12.04  VPS]]></title><description><![CDATA[<h4 id="overview">Overview</h4>

<p>The following list of tasks is a general outline of what needs to be done to get WordPress up and running on your VPS:</p>

<ul>
<li>Set up an Ubuntu 12.04 VPS (virtual private server)</li>
<li>Install and configure Nginx as your web server </li>
<li>Install and configure PHP5-FPM as PHP5 support</li></ul>]]></description><link>http://blog.errright.com/how-to-install-wordpress-with-nginx-on-an-ubuntu-12-04-vps/</link><guid isPermaLink="false">d2257024-3bb5-4a20-a328-3f088c871dfd</guid><category><![CDATA[Tech]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Tue, 29 Apr 2014 16:22:00 GMT</pubDate><content:encoded><![CDATA[<h4 id="overview">Overview</h4>

<p>The following list of tasks is a general outline of what needs to be done to get WordPress up and running on your VPS:</p>

<ul>
<li>Set up an Ubuntu 12.04 VPS (virtual private server)</li>
<li>Install and configure Nginx as your web server </li>
<li>Install and configure PHP5-FPM as PHP5 support</li>
<li>Install and configure MySQL as a database to store your WordPress content </li>
<li>Install and configure WordPress as your blogging platform</li>
</ul>

<h4 id="setupanubuntu1204vps">Set up an Ubuntu 12.04 VPS</h4>

<ol>
<li><p>Go to <a href="https://www.digitalocean.com/">Digital Ocean</a> and sign up for a new VPS. </p></li>
<li><p>Select an Ubuntu 12.04 droplet.Digital Ocean will email you the IP address and password to your new VPS. When you receive those, sign into your new server using the following command:<br> <code>ssh root@<i>ip-address</i></code> with the <em>password</em> provided.Once you access the server, you need to configure a number of settings.</p></li>
<li><p>Change the <code>root</code> password.<br>To set a new password for the <code>root</code> user, enter the <code>passwd</code> command and follow the instructions on screen.</p></li>
<li><p>Create a new user with <code>sudo</code> permissions.<br> You need to create a user with <code>sudo</code> permissions because running all services as <code>root</code> is a security risk, and bad practice. To create a new user with <code>sudo</code> permissions and a home directory, use the following example: * Create a new user with a home directory and bash shell: </p></li>
</ol>

<p><br><code>useradd -m -s /bin/bash -d <i>/home/user</i> -U <i>username</i></code>  </p>

<ul>
<li>Give the user <code>sudo</code> permissions:<br><code>sudo usermod -a -G sudo <em>username</em> </code> * Set the new user password:<br><code>passwd <i>username</i></code></li>
</ul>

<h4 id="updatingyourvpsandinstallingwordpressnginxmysqlandphp">Updating your VPS and installing WordPress, Nginx, MySQL, and PHP</h4>

<p>Now that you have set up a VPS with a new user, you need to run the following commands to begin setting up your system for a WordPress installation.</p>

<ul>
<li><p>Download the latest version of system packages and install them on your VPS: <br><code>sudo apt-get update&amp;&amp;sudo apt-get dist-upgrade</code></p></li>
<li><p>Install Nginx: <br><code>sudo apt-get install nginx</code>* Install WordPress:  - Change to the home directory of the new user:<br> <code>cd <i>/home/user</i></code>  - Install and extract the latest WordPress release:<br> <code>sudo wget http://wordpress.org/latest.tar.gz &amp;&amp; sudo tar -xzvf latest.tar.gz</code>* Install PHP5-FPM:<br><code>sudo apt-get install php5-common php5-mysqlnd php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-imap php5-mcrypt</code>* Install MySQL: <br><code>sudo apt-get install mysql-server php5-mysql</code> * You will be asked to set the <code>root</code> password. Don't forget it, you will need it soon.  Now that you have all the necessary packages installed, you need to configure them so that you can get WordPress running. #### Configure PHP5-FPM##### Increase the security of PHP5-FPM.To prevent PHP-FHM from serving close matches when requested files cannot be found, set the value of the <strong>cgi.fix<em>pathinfo</em></strong> parameter to <strong>1</strong>. This parameter is set in the following file: <code>/etc/php5/fpm/php.ini</code> ##### <strong>Tip</strong>: <code>php.ini</code> is a big file. To help find this parameter, use the following command to show the line of the file on which it is set:<br><code>cat /etc/php5/fpm/php.ini | grep -nie cgi.fix_pathinfo</code> <strong>-n</strong>: shows line number | <strong>-i</strong>: make search case insensitive | <strong>-e</strong>: search for following stringTo change the value of the <strong>cgi.fixpathinfo</strong> property, use the following steps:1. Open the <code>php.ini</code> file and change the value of <code>cgi.fix_pathinfo=0</code> to <code>cgi.fix_pathinfo=1</code>:<br><code>sudo nano -c /etc/php5/fpm/php.ini</code>2. Save and exit.##### Configure PHP5-FHM to use UNIX sockets instead of TCP sockets.UNIX domain sockets should be faster than communication by loopback localhost connections because you have less TCP overhead.To set PHP5-FPM to use UNIX sockets, use the following steps:1. Open the <code>www.conf</code> file:<br><code>sudo nano /etc/php5/fpm/pool.d/www.conf</code>2. Change the <code>listen</code> parameter line: * From : <code>listen = 127.0.0.1:9000</code> * To : <code>listen = /var/run/php5-fpm.sock</code>3. Save and exit.#### Configure a MySQL databaseTo create and configure a database to store your WordPress content, use the following steps:1. Activate the MySQL install:<br><code>sudo mysql_install_db</code>2. Secure and optimize your MySQL database.<br>To do this, use the following command:<br><code>sudo /usr/bin/mysql_secure_installation</code> * After answering the password prompts, you can enter "yes" to all the options. This secures your MySQL installation against some vulnerabilities such as anonymous users and someone guessing your root login.Now that you have activated your MySQL installation you need to set up a MySQL database. To do this, use the following steps:1. Login to the MySQL shell:<br><code>mysql -u root -p</code><strong>Note: All SQL commands end with a semi-colon ;</strong>2. Create a database for your WordPress installation:<br><code>CREATE DATABASE wordpress;</code> * where <em>wordpress</em> is the name of the database created.3. Create the database user:<br><code>CREATE USER wpuser@localhost;</code> * Where <em>wpuser</em> can be any user name you wish.4. Set a password for the new user: <br><code>SET PASSWORD FOR 'wpuser'@'localhost'= PASSWORD("user_password");</code>5. Grant all privileges to the new user:<br><code>GRANT ALL PRIVILEGES ON wordpress.* TO wpuser@localhost IDENTIFIED BY 'user_password';</code>6. Refresh MySQL:<br><code>FLUSH PRIVILEGES;</code>7. Exit MySQL<br><code>EXIT</code>#### Configure WordPress To configure WordPress, change to the WordPress install directory.* <code>su <i>username</i></code> : switches to the new user * <code>cd ~/wordpress</code><br>In this directory you will see a file called <code>wp-config-sample.php</code>. You can use this file to create the <code>wp-config.php</code> file that WordPress needs to run. Once you create the <code>wp-config.php</code> file, you must configure it to access the MySQL database you just created. To do this, use the following commands:1. Copy the sample file to create the configuration file:<br><code>sudo cp wp-config-sample.php wp-config.php</code>2. Open the <code>wp-config.php</code> file: <br><code>sudo nano wp-config.php</code>3. Within this file set the following parameters: * Set the <code>database_name_here</code> variable to the name of the MySQL database you created.  * Set the <code>username_here</code> variable to your database user name.  * Set the <code>password_here</code> variable to your user database password4. Reduce the size of your WordPress database.<br>WordPress autosaves posts while writing, which remain even after the post is saved in the wordpress database. To disable this function add the following line to the <code>wp-config.php</code> file:<br><code>define('WP_POST_REVISIONS', false );</code>5. Save and exitNow that you have configured WordPress, you need to allow Nginx access the files. Nginx runs on the VPS with the user name <code>www-data</code>, therefore to allow Nginx to serve files to the internet you must change the ownership of those files to <code>www-data</code>. To change your WordPress file owner settings, use the following steps: 1. Change directory to one level above your WordPress installation:<br><code>cd ~</code>2. Use the following command to change the ownership of all files and subdirectories in the <code>wordpress</code> directory:<br><code>sudo chown -R www-data:www-data wordpress</code>#### Configure NginxConfiguring Nginx is two separate stages.* Configuring Nginx to be more efficient * Configuring Nginx to serve your WordPress content##### Configuring Nginx to be more effecientTo configure Nginx to work optimally with your VPS, you need to make changes to the <code>nginx.conf</code> file located in <code>/etc/nginx</code>.Open the <code>nginx.conf</code> file with the following command:<br><code>sudo nano /etc/nginx/nginx.conf</code>Once opened, change or enable the parameter settings within the file as outlined in the following steps. Some of these settings are already in the file but are commented out. To enable these parameters, remove the '#' preceeding the parameter.1. Adjust the number of <code>worker_processes</code> to match the number of CPUs that you have available. This allows Nginx to use all available CPUs.  Check the number of CPUs available with the following command: * <code>cat /proc/cpuinfo | grep processor</code><br>Using a server with 16 CPUs as an example:<br> <code>worker_processes 16;</code>2. Increase the number of <code>worker_connections</code> if your site has high traffic. Theoretically, Nginx can handle <br> <em>max clients = worker_processes * worker_connections</em> * <code>worker_connections 10240;</code>3. Change the default <code>keepalive_timeout</code> setting so that inactive connections are closed.   * <code>keepalive_timeout 30 15;</code><br>These settings are in seconds. The first parameter closes connections after 30 seconds of inactivity. The optional second parameter assigns the time value in the header <code>Keep-Alive: timeout=time</code> of the response. This header can convince some browsers to close the connection, so that the server does not have to. 4. Enable compression using <code>gzip on;</code>, this is a filter that compresses responses using the gzip method. To enable compression, uncomment or configure the following parameters:<code>gzip on;</code><br><code>gzip_disable "msie6";</code><br><code>gzip_comp_level 2;</code><br><code>gzip_buffers 4 8k;</code><br><code>gzip_http_version 1.1;``gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;</code>5. Disable <code>server_tokens</code>. This prevents nginx from displaying server information. * <code>server_tokens off;</code>6. If you have a very long domain name, set the <code>server_names_hash_bucket_size</code> to a multiple of 64. * <code>server_names_hash_bucket_size 256;</code>##### Configuring Nginx to serve your WordPress contentTo configure Nginx to serve your content to the web, you need to get an Nginx virtual hosts file to point to your content. In this installation the WordPress content is located in <code>~/wordpress</code>, where <code>~</code> represents the home directory of the user created at the beginning of the installation.To configure Nginx to serve your content, use the following steps:1. Change to the Nginx <code>sites-available</code> directory:<br><code>cd /etc/nginx/sites-available</code>2. To create the new file use the following command: <br><code>sudo nano wordpress.conf</code>3. Use the sample virtual hosts file below to create your own file. This example already contains the configuration for browser cache functionality, and FastCGI with PHP FPM. <br>Ensure that you set the following parameters in it:  * Set the <code>root</code> file path to your WordPress directory location. * Set the <code>server_name</code> address to you domain name or IP address.4. When you have set the parameters, save and exit the file.</p></li>
</ul>

<p><pre>server {# Set Nginx to listen for incoming HTTP requests      listen   80; root <b>/home/user/wordpress;</b>index index.html index.php index.htm;server<em>name <b>your.ip.address your.website.com</b>;location / {try</em>files $uri $uri/ /index.html;}location /doc/ {alias /usr/share/doc/;autoindex on;allow 127.0.0.1;deny all;}error<em>page 404 /404.html;    error</em>page 500 502 503 504 /50x.html;location = /50x.html {root /usr/share/nginx/www;}    # Set up browser caching for the following files    # .php .jpg .jpeg .png .css .ico .js .giflocation ~* .(jpg|jpeg|gif|css|png|js|ico|html)$ {    access<em>log off;    expires max;  }    location ~* .php$ {    try</em>files $uri =404;    fastcgi<em>split</em>path<em>info ^(.+.php)(/.+)$;fastcgi</em>pass unix:/var/run/php5-fpm.sock;fastcgi<em>index index.php;fastcgi</em>param SCRIPT<em>FILENAME $document</em>root$fastcgi<em>script</em>name;include fastcgi_params;}}</pre><br>To enable Nginx to access this virtual hosts file, you must add a symbolic link in the <code>sites-enabled</code> directory. You should also remove the <code>default</code> symbolic link.1. Change to the <code>sites-enabled</code> directory:<br><code>cd /etc/nginx/sites-enabled</code>2. Remove the default symbolic link:<br><code>sudo rm default</code>3. Create a symbolic link to the <code>wordpress.conf</code> file you just created.<br><code>sudo ln -s /etc/nginx/sites-available/wordpress.conf /etc/nginx/sites-enabled/wordpress.conf</code>This means that to remove your content from the web, you need only delete the symbolic link.Nginx is now configured to serve your web content. To get your site up and running, use the following commands:* Restart PHP5-FPM:<br><code>sudo service php5-fpm restart</code>* Restart nginx:<br><code>sudo service nginx restart</code>To access your WordPress site, use this link example<strong>your.website.com/wp-admin/install.php</strong>"</p>]]></content:encoded></item><item><title><![CDATA[Some CSS snippets]]></title><description><![CDATA[<p>This week I have been mostly messing around in CSS while remaking my website. Below are some bits of the code that have made various revisions of the site work. Not all will make it into the final cut, but they may be useful in someone elses. \n\n</p>

<h4 id="getyourfootertostayputn">Get</h4>]]></description><link>http://blog.errright.com/some-css-snippets/</link><guid isPermaLink="false">25d9d920-fdaf-498f-a1ed-2768127b6620</guid><category><![CDATA[Tech]]></category><category><![CDATA[CSS]]></category><dc:creator><![CDATA[Brian Butler]]></dc:creator><pubDate>Tue, 29 Apr 2014 16:22:00 GMT</pubDate><content:encoded><![CDATA[<p>This week I have been mostly messing around in CSS while remaking my website. Below are some bits of the code that have made various revisions of the site work. Not all will make it into the final cut, but they may be useful in someone elses. \n\n</p>

<h4 id="getyourfootertostayputn">Get your footer to stay put!\n</h4>

<p>This section of code plants the footer at the bottom of your page, and it'll stay there.</p>

<pre><code>/* Create the site footer */
#site-footer {
position: absolute;
font-size: 16px;
bottom: 0px;
color: grey;
background: white;
height: 30px;
width: 100%;
text-align: center;
}
</code></pre>

<h4 id="showonhover">Show on hover</h4>

<p>This bit of code can be used to enable hover to expand a menu or simply expose an undisplayed div.</p>

<pre><code>.showme{ opacity: 0;}
.showhim:hover 
.showme{opacity : 1;}
</code></pre>

<h5 id="parralleldivs">Parrallel divs</h5>

<p>This piece of code will keep 3 divs parrallel, and while it won't make the final cut it is definitely something useful to know.</p>

<p>Create a holder for both feeds to come into the page</p>

<pre><code>#wrapper {
width: 800px; 
height: 500px; 
align: center;
margin: 0 auto;
top: 215px; 
overflow: auto;
top: 20.5%; 
}
</code></pre>

<p>get the tweet and blog feed positioned side by side */\n\n</p>

<pre><code>#tweetfeed, #expression, #blog-feed {
border: none;\n    
min-height: 500px;\n
}
</code></pre>

<p>place a div between the two feeds:</p>

<pre><code>#expression {
float: left;
width: 200px;
height: 500px;
}
</code></pre>

<p>Get the tweet feed positioned */\n\n</p>

<pre><code>#tweetfeed{
float: left;
width: 300px;
height: 500px;\n
}
</code></pre>

<p>get the blog feed positioned */\n\n</p>

<pre><code>#blog-feed{
float: left; 
width: 300px;
height: 500px;
overflow: hidden;}
</code></pre>

<p>Here is how that looks in action. </p>

<ul>
<li>Left div = Twitter feed</li>
<li>Middle div = Space filled with background. Originally meant to contain a logo</li>
<li>Right div = Blog feed</li>
</ul>

<p><img src="http://i.imgur.com/7r6YOsD.png" alt="three parrallel divs"></p>]]></content:encoded></item></channel></rss>