<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    
    <title>Gary Rowe's personal blog</title>
    
    
    <description>A collection of personal blog articles by Gary Rowe</description>
    
    <link>http://gary-rowe.com/</link>
    <atom:link href="http://gary-rowe.com/feed.xml" rel="self" type="application/rss+xml" />
    
    
      <item>
        <title>How to set up an HTTPS server on OS X</title>
        <description>
          
          Every so often I find myself needing to run up an HTTPS server locally for development. Here are the steps for doing on OS X, assuming you’ve already installed Homebrew: brew install mkcert brew install nss brew install http-server mkcert -install &amp;lt;Enter root password for CA store to be imported&amp;gt; cd &amp;lt;project website root&amp;gt; mkcert localhost http-server -S -C localhost.pem -K localhost-key.pem Check activity on https://localhost:8080 The mkcert tool creates a local certificate authority (CA) that is then added to the local trust store (that’s why you need the root password) so that it can be trusted by the system....
        </description>
        <pubDate>Sat, 26 Sep 2020 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2020-09-26-how-to-setup-https-on-osx/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2020-09-26-how-to-setup-https-on-osx/</guid>
      </item>
    
      <item>
        <title>Building a retirement fund using Ethereum</title>
        <description>
          
          Disclaimer: The content below is for informational purposes only, you should not construe any such information or other material as legal, tax, investment, financial, or other advice. The content below is provided for educational purposes only, and not indicative of future performance. You should do your own research and consult a regulated financial advisor in matters of personal investment. Why have a retirement fund? The idea of a retirement fund is to have some kind of income when you are no longer able to work or have decided to retire. The larger the fund the more you can spend during...
        </description>
        <pubDate>Wed, 22 Jan 2020 00:00:00 +0000</pubDate>
        <link>http://gary-rowe.com/2020-01-22-building-a-retirement-fund-using-ethereum/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2020-01-22-building-a-retirement-fund-using-ethereum/</guid>
      </item>
    
      <item>
        <title>How to set up Dropwizard and nginx on EC2</title>
        <description>
          
          It’s been a while since I’ve added any articles to this blog. This has been due to working flat out on MultiBit HD - a Bitcoin startup project. As part of that work I needed to add a Dropwizard project to an EC2 box fronted by nginx. As usual I wanted full automation so the whole build and deploy process was to take place on the server (it’s only a small build) in response to a git push. I reviewed my earlier work but found that it didn’t give a complete set of instructions for setting up on a bare...
        </description>
        <pubDate>Mon, 11 Aug 2014 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2014-08-11-how-to-setup-dropwizard-and-nginx-on-ec2/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2014-08-11-how-to-setup-dropwizard-and-nginx-on-ec2/</guid>
      </item>
    
      <item>
        <title>How to create a deterministic JAR</title>
        <description>
          
          The other day I needed to verify that my machine had built a JAR file correctly by comparing it to another build on a different machine. I noted the SHA1 hash of the original, built it again and the two were different. The source code was identical since the git commit fingerprint was the same. It turns out that JARs contain time-sensitive data that throws out the SHA1 signature. What I needed was a deterministic JAR. What is a deterministic JAR? This is a JAR that will build to a known SHA1 hash every time. It has all time- and...
        </description>
        <pubDate>Thu, 08 Aug 2013 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2013-08-08-how-to-create-a-deterministic-jar/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2013-08-08-how-to-create-a-deterministic-jar/</guid>
      </item>
    
      <item>
        <title>Preventing Dependency Chain Attacks in Maven</title>
        <description>
          
          As regular readers will be aware, I do a lot of work within the Bitcoin community contributing code wherever I can. Recently an interesting problem came up with the Bitcoinj library which has highlighted a particular weakness within Maven that I feel more developers should be aware of: the dependency-chain attack. What is a dependency-chain attack? Imagine that some malicious developer, Mallory, was able to gain write access to a Maven repository that you used as part of your development. Mallory knows from examining your pom.xml that you depend on several artifacts which are served from this repository and so...
        </description>
        <pubDate>Wed, 03 Jul 2013 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2013-07-03-preventing-dependency-chain-attacks-in-maven/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2013-07-03-preventing-dependency-chain-attacks-in-maven/</guid>
      </item>
    
      <item>
        <title>Simple Scaffolding</title>
        <description>
          
          One of my biggest problems with day to day Java coding is a lack of easy code generation. Frequently I find myself working on a new project and having to set up all the same boilerplate code. Obviously I’ll try to minimise the effort involved by first reaching for a Maven archetype or, more recently, a git repository with a standard set of starting code. In the past I even gave Spring Roo a try out, and Grails is pretty good if you’re allowed to use Groovy where you work. Unfortunately, all of the above come with drawbacks. Maven archetypes...
        </description>
        <pubDate>Sun, 19 May 2013 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2013-05-19-simple-scaffolding/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2013-05-19-simple-scaffolding/</guid>
      </item>
    
      <item>
        <title>Dropwizard with Ember Data demo</title>
        <description>
          
          In this tutorial I’m going to create a reasonably complex demonstrator of Ember Data against a Dropwizard RESTful API. It is intended to demonstrate the workflows associated with creating a self-contained Ember.js front-end served by a Dropwizard back end. Thus you will see how to use Grunt.js as a kind of Maven for the front-end, and the role of Dropwizard in both serving the JavaScript application and handling the REST queries that subsequently come from the user interaction. It will demonstrate creating a simple display of some blog posts presented in a paginated list with a link to see the...
        </description>
        <pubDate>Sat, 11 May 2013 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2013-05-11-dropwizard-with-ember-data/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2013-05-11-dropwizard-with-ember-data/</guid>
      </item>
    
      <item>
        <title>How to deploy dynamic sites with git</title>
        <description>
          
          Automation is everything. The more you can get to occur without any effort from you the more time you have available to do other more important work (and there is less chance of an important step being missed due to manual error). So the other day I set myself the task of building a git hook script that would automatically update a Dropwizard application simply by means of a git push. Yes, this is the logical next step from the static site deployment that I covered in an earlier article. At this point you will probably want to refer to...
        </description>
        <pubDate>Thu, 14 Feb 2013 00:00:00 +0000</pubDate>
        <link>http://gary-rowe.com/2013-02-14-how-to-deploy-dynamic-sites-with-git/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2013-02-14-how-to-deploy-dynamic-sites-with-git/</guid>
      </item>
    
      <item>
        <title>An nginx configuration file for Dropwizard with static content</title>
        <description>
          
          I often find myself having to fiddle about with nginx configuration settings to get it to work with a Dropwizard application and static content. Of course, it would also work with any Java application container (such as Jetty, JBoss, Glassfish or Tomcat): Here is what works for me: # Site (port 80 -&amp;gt; 9090) server { listen 80; # Listen on port 80 for IPv4 requests server_name localhost; access_log /var/log/nginx/site_access.log; error_log /var/log/nginx/site_error.log; # Set the root of the static content root /usr/share/nginx/html; # Redirect server error pages to the static page /50x.html error_page 500 502 503 504 /50x.html; location =...
        </description>
        <pubDate>Wed, 13 Feb 2013 00:00:00 +0000</pubDate>
        <link>http://gary-rowe.com/2013-02-13-an-nginx-config-file-for-dropwizard-with-static-content/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2013-02-13-an-nginx-config-file-for-dropwizard-with-static-content/</guid>
      </item>
    
      <item>
        <title>How Bitcoin can contribute to a resilient community</title>
        <description>
          
          I normally write about technical subjects on this blog, but for this article I’m going off this well-beaten path and into the realms of Bitcoin and resilient communities. I’m doing this because I’d like to step up to the challenge offered by John Michael Greer in his recent Archdruid Report “A Wishlist for Krampus”. In the article, which has little to do with Druidism and much more to do with attempting to prepare people for a world with reduced access to natural resources, JMG asks his readers to come up with solutions to problems that are likely to cause hardship...
        </description>
        <pubDate>Sun, 13 Jan 2013 00:00:00 +0000</pubDate>
        <link>http://gary-rowe.com/2013-01-13-how-bitcoin-can-contribute-to-a-resilient-community/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2013-01-13-how-bitcoin-can-contribute-to-a-resilient-community/</guid>
      </item>
    
      <item>
        <title>How to deploy static sites with git</title>
        <description>
          
          As part of my contribution to a recent Random Hacks of Kindness event, I needed to put together a simple deployment mechanism for the static part of the site. The idea was to use a simple git push to trigger a deployment to production. There was a lot of documentation out here on the web about this, but there were many pitfalls along the way that I thought I’d document here to help others attempting to do the same. So if you want to deploy static files to an EC2 instance using git and have a rollback archive to go...
        </description>
        <pubDate>Fri, 14 Dec 2012 00:00:00 +0000</pubDate>
        <link>http://gary-rowe.com/2012-12-14-how-to-deploy-static-sites-with-git/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-12-14-how-to-deploy-static-sites-with-git/</guid>
      </item>
    
      <item>
        <title>Dropwizard with OpenID</title>
        <description>
          
          Dropwizard is an excellent framework to create lightweight web services with. Out of the box it comes with a wide range of useful features that just make developing web services a pleasure. In particular, support for Basic authentication and OAuth2 are pretty much required for any web service that is public facing these days - and why aren’t you employing secure web services internally? Criticism aside, one common authentication technique appears to be missing: OpenID. Just gimme the code! What is the difference between OpenId and OAuth? Many people get confused about the difference between OpenID and OAuth so I’ll...
        </description>
        <pubDate>Wed, 12 Dec 2012 00:00:00 +0000</pubDate>
        <link>http://gary-rowe.com/2012-12-12-dropwizard-with-openid/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-12-12-dropwizard-with-openid/</guid>
      </item>
    
      <item>
        <title>How to include Markdown with Freemarker in Dropwizard</title>
        <description>
          
          One common problem that web developers face is the elegant handling of rich text received from their users which should be rendered as HTML. Obviously, accepting raw HTML from unknown sources is a major security risk. Fortunately, this problem has been solved through the use of Markdown which requires only an easily readable text document from your users. If you’re looking for a portable rich text solution for documentation and requirements specifications then Markdown is a great solution. In order to include Markdown into your own projects you need only use a suitable Markdown parser, and an easy to use...
        </description>
        <pubDate>Mon, 05 Nov 2012 00:00:00 +0000</pubDate>
        <link>http://gary-rowe.com/2012-11-05-how-to-include-markdown-with-freemarker-in-dropwizard/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-11-05-how-to-include-markdown-with-freemarker-in-dropwizard/</guid>
      </item>
    
      <item>
        <title>MultiBit Merchant - Implementing HMAC authentication in Dropwizard</title>
        <description>
          
          As part of my ongoing open source project MultiBit Merchant (MBM) I am keeping a journal of my discoveries and thoughts along the way. This one deals with how I implemented HMAC authentication for Dropwizard as part of the security for the MBM RESTful API. There is a lot of ground to cover so this is going to be a long one. I’ve added lots of code examples but these will drift out of date so I’d recommend reviewing the source code of the MBM project to get the latest implementations. I’m in a hurry where can I just get...
        </description>
        <pubDate>Tue, 23 Oct 2012 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2012-10-23-multibit-merchant-implementing-hmac-authentication-in-dropwizard/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-10-23-multibit-merchant-implementing-hmac-authentication-in-dropwizard/</guid>
      </item>
    
      <item>
        <title>How to implement a RuntimeExceptionMapper for Dropwizard</title>
        <description>
          
          One common problem that web developers face is the elegant handling of exceptions in their applications. You want to give the browser the correct response code (e.g. 404 or 500), but you also want to ensure that the user experience of that failure maintains the style of the overall site. The default Dropwizard behaviour is rather minimal in this area (by design) and so I thought I’d post up an implementation to act as a starting point for others to use: import com.yammer.dropwizard.logging.Log; import org.multibit.store.views.PublicFreemarkerView; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; /** * &amp;lt;p&amp;gt;Provider to provide the following...
        </description>
        <pubDate>Tue, 23 Oct 2012 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2012-10-23-how-to-implement-a-runtimeexceptionmapper-for-dropwizard/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-10-23-how-to-implement-a-runtimeexceptionmapper-for-dropwizard/</guid>
      </item>
    
      <item>
        <title>A .gitignore file for Intellij and Eclipse with Maven</title>
        <description>
          
          I often find myself having to fiddle about with ignore settings in various IDEs, so I thought I’d put together a simple general purpose solution that will ignore all the usual suspects for Intellij and Eclipse within a Maven reactor build (even works on a Mac). Here it is: # Eclipse .classpath .project .settings/ # Intellij .idea/ *.iml *.iws # Mac .DS_Store # Maven log/ target/ If you place this in .gitignore the root directory of your project, the ignore settings will be applied to all sub-directories automatically. Finally, no more accidental commits of /target into the repo. You may...
        </description>
        <pubDate>Fri, 12 Oct 2012 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2012-10-12-a-gitignore-file-for-intellij-and-eclipse-with-maven/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-10-12-a-gitignore-file-for-intellij-and-eclipse-with-maven/</guid>
      </item>
    
      <item>
        <title>How to deploy a Dropwizard project to Heroku</title>
        <description>
          
          The other day I needed to deploy MultiBit Merchant (a Dropwizard project) on to Heroku. This is all part of my continuous deployment strategy and I thought it would be helpful to others if I posted how I managed to get it is all to work. Core concepts For those not aware of Heroku, here is a quick summary of what it is all about from a Java perspective. With Heroku you don’t think of deployment in terms of a target cluster, instead you just treat it as a fully automatic deployment script triggered from a git push. If you...
        </description>
        <pubDate>Tue, 09 Oct 2012 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2012-10-09-how-to-deploy-a-dropwizard-project-to-heroku/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-10-09-how-to-deploy-a-dropwizard-project-to-heroku/</guid>
      </item>
    
      <item>
        <title>MultiBit Merchant - Cheaper in bitcoins</title>
        <description>
          
          As part of my ongoing open source project MultiBit Merchant (MBM) I am keeping a journal of my discoveries and thoughts along the way. This one deals with why Bitcoin offers merchants the highest profit margins for their sales by removing fraud from the payment process. Fraud and its impact Merchants operating online have to deal with fraud as part of their daily routine. This is because the current mechanisms for making payments are heavily biased to supporting the customer rather than the merchant. If a customer is unhappy with their purchase they are able to issue a chargeback and...
        </description>
        <pubDate>Tue, 04 Sep 2012 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2012-09-04-multibit-merchant-cheaper-in-bitcoins/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-09-04-multibit-merchant-cheaper-in-bitcoins/</guid>
      </item>
    
      <item>
        <title>How to recover your bitcoins from a failed hard drive</title>
        <description>
          
          It happens to all of us eventually. You’re working along quite merrily and then suddenly everything freezes up. You try switching it off and on again and the machine fails to boot up. In short, your hard drive has failed and you now face a serious interruption to your day. And slowly it dawns on your that you had a Bitcoin wallet on that disk. And that it is worth a lot of money. You must get that file back no matter what. Here is a set of instructions that will allow you to do exactly that, depending on the...
        </description>
        <pubDate>Fri, 17 Aug 2012 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2012-08-17-how-to-recover-your-bitcoins-from-a-failed-hard-drive/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-08-17-how-to-recover-your-bitcoins-from-a-failed-hard-drive/</guid>
      </item>
    
      <item>
        <title>Deprecate with Prejudice</title>
        <description>
          
          When developing an application or library it is important to recognise the importance of deprecation. Without it, dead code hangs around building up technical debt. The problem is that developers are often reluctant to remove this dead code because they fear that it will break downstream users of the code. The idea is that by preserving the public API they will keep their users happier. Unfortunately, that path leads to more technical debt. When a developer spots that the design of an API is wrong, then they are not alone. Most likely the users of the API have spotted that...
        </description>
        <pubDate>Tue, 17 Jul 2012 00:00:00 +0100</pubDate>
        <link>http://gary-rowe.com/2012-07-17-deprecate-with-prejudice/</link>
        <guid isPermaLink="true">http://gary-rowe.com/2012-07-17-deprecate-with-prejudice/</guid>
      </item>
    
  </channel>
</rss>
