<?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:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Timmy on Medium]]></title>
        <description><![CDATA[Stories by Timmy on Medium]]></description>
        <link>https://medium.com/@timmywil?source=rss-a7ced7eeac67------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HnUjk7-iyAZo8oyz.jpeg</url>
            <title>Stories by Timmy on Medium</title>
            <link>https://medium.com/@timmywil?source=rss-a7ced7eeac67------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 11:55:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@timmywil/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[I’ve moved off Medium to a static blog]]></title>
            <link>https://medium.com/@timmywil/ive-moved-off-medium-to-a-static-blog-be8618afe317?source=rss-a7ced7eeac67------2</link>
            <guid isPermaLink="false">https://medium.com/p/be8618afe317</guid>
            <dc:creator><![CDATA[Timmy]]></dc:creator>
            <pubDate>Wed, 15 May 2019 14:17:25 GMT</pubDate>
            <atom:updated>2019-05-15T14:17:25.272Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://timmywil.com/">Write more, build more</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be8618afe317" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Virtue of Open Source]]></title>
            <link>https://medium.com/@timmywil/the-virtue-of-open-source-fa32e46a32a8?source=rss-a7ced7eeac67------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa32e46a32a8</guid>
            <dc:creator><![CDATA[Timmy]]></dc:creator>
            <pubDate>Thu, 13 Oct 2016 13:01:02 GMT</pubDate>
            <atom:updated>2016-10-13T13:01:02.566Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>“It’s not just companies driving [technology] forward anymore, it’s anyone or everyone.”</blockquote><blockquote>— Chris Wanstrath, CEO of GitHub</blockquote><p>What is the virtue of open source? Or, <a href="http://www.tubechop.com/watch/8430831">why is it good</a>?</p><p>I’ve been thinking about this question for years. I am perpetually overwhelmed by the benefits of open source software (OSS). It’s easy to fall into a pattern of work and never stop to appreciate what it is you’re doing. I’ve always believed in open source, but never really put into words why open source is good. So I want to take a step back, express the “why”; without the “why”, the “what” loses all meaning.</p><p>Some articles have been written about the benefits from <a href="http://www.pcworld.com/article/209891/10_reasons_open_source_is_good_for_business.html">the</a> <a href="http://open-source.gbdirect.co.uk/migration/benefit.html">perspective</a> of the <a href="http://www.computerworld.com/article/2486991/app-development-4-reasons-companies-say-yes-to-open-source.html">user</a>, and others have touched on the benefits of <a href="https://opensource.com/life/14/5/true-value-of-open-source">being</a> an <a href="https://www.mobomo.com/2011/04/you-should-be-an-open-source-developer/">open source</a> <a href="http://www.businessinsider.com/why-developers-contribute-to-open-source-projects-2015-6">contributor</a>. This article is an attempt at bringing them all together.</p><h3>The User</h3><p>The user is anyone involved in making the decision to use an open source project, not just the developer including it. Many need permission first, which is why all open source projects should come with a license. There are several established licenses in open source, the most popular of which is <a href="https://opensource.org/licenses/MIT">MIT</a>. The common element in these licenses is the provision that the software is free to use, modify, publish, and distribute. And that is probably the most obvious benefit to using open source: it’s <em>free</em>.</p><h4>You Can’t Beat the Price</h4><p>While donations are sometimes encouraged, OSS usually costs nothing to use. And there is no need to account for multiple copies of software like with proprietary software, which reduces administration costs.</p><p>But cost is not just about the initial price of the software. Companies that make use of open source do not need to constantly reinvent the wheel. They can use existing platforms, libraries, and plugins to build their projects. They get the Lego blocks for free, saving an inestimable amount of time.</p><p>Those Lego blocks can be swapped. The needs of a particular project can be volatile; the ability to swap out components is an incredible, cost-saving advantage.</p><p>And here’s the biggest one: free support.</p><h4>Support</h4><p>There are vast communities behind successful OSS that are there to drive its continued success. Your company does not need to carry that burden, but you also get to contribute and improve it as you use it — something that isn’t possible with software from vendors. Gone are the days where you would be at the mercy of a proprietor’s timeline. Vendors can halt support at any time, but support in open source is not limited to the project authors. Anyone willing to dig into the code and understand it can take it on. This means that OSS is generally <em>more</em> secure than its counterpart (more on this later).</p><p>Not all OSS has equal levels of support. It’s up to you to make sure the community behind a project is lively and determined. One of the first things I look at when choosing a package is the latest commit date. If it’s been a year since the last commit, I move on. Things change quickly in our line of work, and if a project isn’t actively supported, its repudiation is all but guaranteed. The nice thing is, if the problem the project was solving is still applicable, there’s often another project out there with better support. The <em>best</em> solution can be chosen in place of the <em>only</em> solution.</p><p>However, sometimes software has undergone the test of time and proven itself consistently reliable. Support becomes a non-issue when considering whether to use it. OSS such as Apache, MySQL, and others are widely considered safe-to-use because of their vast networks of supporters and cemented dependability.</p><h4>Quality &amp; Security</h4><p>OSS projects that ignore testing, documentation, or maintainability inevitably fail. They’re quickly rejected and largely ignored. Open source has an advantage here. Bugs get fixed faster, and the same new features that might be implemented later in proprietary software are available sooner.</p><p>It’s true. Bugs get fixed faster. First of all, you get more bug reports. Whereas a plethora of bugs in closed software remain obscure, open source is subject to constant, public scrutiny. This leads to a slew of bug reports that would never have been filed otherwise. Rather than trust that software is as secure as it says it is, you get to audit it yourself.</p><p>Secondly, severe defects and security issues can potentially get fixed within hours of their being detected. Contrast that with closed source. When a usually-ambiguous bug report is filed, there’s a delay while the vendor determines its validity. The bug may or may not get fixed, and you have to wait until the next release to find out.</p><p>In terms of new features, developers are continually spawning new projects that have no real goal other than exploration and research. It is this kind of ambition that has lead to groundbreaking advancements in the scientific community, and the same is true here. OSS developers are the first ones to the shiny and new, and commercial organizations just do their best to keep up.</p><p>As specifications such as <a href="http://www.ecma-international.org/ecma-262/7.0/index.html">EcmaScript</a> and <a href="https://html.spec.whatwg.org/multipage/">HTML</a> are developed, open source developers build projects that conform to and make use of those specifications before anyone else. This means that new features that will soon become available get experimented with almost immediately.</p><p>In the end, open source gets closest to what users want because the users have a hand in making it that way. It can have technical superiority because it is not subject to a vendor’s priorities or requirements. Oftentimes when a company releases their own open source project, the community improves it in ways the company never would have thought of on its own.</p><h3>The Contributor</h3><p>You may wonder about the benefits of contributing to open source, or why an employer would want to allocate time for their employees to contribute to open source. There are many benefits, and I might get weepy on you. I’ll save the best one for the end, but I’ll start with the most commonly iterated.</p><h4>Separating the Chaff</h4><p>If you’re a developer that’s just starting out, contributing to an open source project looks good on a résumé. Most companies that attract good talent will look at your open source contributions, most likely on GitHub.</p><p>If you’re a manager interested in recruiting good developers, you’re going to have a hard time grabbing the attention of motivated developers if you work for a company with a poor open source presence. The ninjas of the developer world are pretty much the same people as the ninjas of the open source world, where quality is prioritized over number of features and there’s no sales department dictating what to build next. OSS developers solve real problems that benefit a larger audience, making everyone’s job easier.</p><h4>Self-improvement Clause</h4><p>The fact is, contributing to open source makes you a better developer. When your code is available for anyone to view, it encourages you to avoid hacks and write your best code. The open source community demands clean, tested, maintainable code with proper documentation. You usually can’t get away with less.</p><p>Also, releasing your own open source projects on a regular basis cultivates a mindset that enables you to find ways to modularize parts of an existing architecture and maximize reusability. Even if those pieces don’t get released as open source projects, it greatly increases how much is shared within your company and elevates the standards you feel you must meet when sharing it. That makes your colleagues’ jobs easier.</p><h3>The Community</h3><p>It all comes down to this. The number one reason for contributing to open source is the community. Who are these open source people? Well, they are volunteers. They are people giving up their time to contribute something back to the community. Open source is a place where “Pay it forward” is a common adage. So many people who have benefited from open source have already learned the advantages and think it only fair to contribute something back. It’s a place where the most common reason for doing something is to help someone else.</p><p>If you think you’re not good enough to work on open source, you’re wrong. Even if your code sucks, people will often give you constructive feedback on how to improve it. You’ll be amazed at how quickly you progress as a developer. You get to learn, and you get to develop relationships with people knowing that there’s one thing you already have in common: generosity.</p><p>So, thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa32e46a32a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[On Attention Spans and HTML5 Games]]></title>
            <link>https://medium.com/@timmywil/on-attention-spans-and-html5-games-ae8de10f9e1d?source=rss-a7ced7eeac67------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae8de10f9e1d</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[attention-span]]></category>
            <category><![CDATA[html5-games]]></category>
            <dc:creator><![CDATA[Timmy]]></dc:creator>
            <pubDate>Tue, 11 Oct 2016 16:13:43 GMT</pubDate>
            <atom:updated>2016-10-11T16:13:43.076Z</atom:updated>
            <content:encoded><![CDATA[<p><em>This is something I wrote years ago that I’d like to share again on Medium. I think most of it still applies today.</em></p><p>It wouldn’t give anyone a heart attack if I said that we live in a digital age. With so much information at our fingertips, content is expected to be engaging, but short and precise. You’ve probably heard that the average attention span has dropped by some significant amount in the past decade. It is almost considered rude to publish something that causes someone to scroll too far. The truth is, our brains are not trained to maintain focus like they used to be.</p><p>A friend once told me an anecdote involving Steve Jobs. Some pitiable sap had sent him an email, a somewhat lengthy treatise in itself consisting of points, counterpoints, and meticulous explanations. Without inspection, Steve promptly replied with a single word: <em>“Shorter.”</em></p><p>The nature of the internet is brevity. Old-timers can remember an age before the internet, when people were invariably forced to enlighten themselves through careful and prolonged study of the written word…poor bastards. Daily, plonked into my RSS reader and Reddit homepage, there lives a colorful amalgam of tutorials, tips, roundups, and general musings ready for my consumption. Some of these articles are even prefaced with a section labeled <a href="http://en.wikipedia.org/wiki/Wikipedia:Too_long;_didn&#39;t_read">tl;dr</a>; I’m sure those experienced interlocutors felt that their contributions were too demanding for some readers.</p><p>First of all, I encourage you to do something: breathe. Remove yourself from the bombardment of baubles and read something longer every day. Our brains need constant exercise, and it’s not a workout unless you <a href="http://www.youtube.com/watch?v=KzI-UQ-JsaQ">feel the pump</a>. Train yourself to hold attention. There is value in guzzling 10 concepts in 10 minutes, but it is inestimably rewarding to calmly savor the golden prose of an author you enjoy. Forgive them a superfluous word or two.</p><p>Secondly, there is something we do online that can be left undisturbed by our lithe attention spans. In fact, it has the often-tapped potential to captivate users as they quarter the vast fields of web plantations. Games. They sit protected, like a sequestered artist working away in her studio.</p><p>It is then unfortunate that only short HTML5 games are ubiquitous. For years game developers have been deterred by the limited capabilities of modern browsers, but this troublesome drawback is quickly becoming inconsequential. If you are a developer, don’t let the statistics concerning attention spans attenuate your resolve to create elaborate, astronomical online games. The time is ripe for longer games, and this phase in digital history is propitiously primed to welcome them. You’d certainly have <em>my</em> attention.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae8de10f9e1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[webpagetest and you: Automating Load Performance Testing in Node (Part 1)]]></title>
            <link>https://medium.com/@timmywil/webpagetest-and-you-automating-load-performance-testing-in-node-part-1-941bd79e07e7?source=rss-a7ced7eeac67------2</link>
            <guid isPermaLink="false">https://medium.com/p/941bd79e07e7</guid>
            <category><![CDATA[gulp]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[grunt]]></category>
            <dc:creator><![CDATA[Timmy]]></dc:creator>
            <pubDate>Wed, 13 Jul 2016 13:01:03 GMT</pubDate>
            <atom:updated>2016-07-13T17:30:22.843Z</atom:updated>
            <content:encoded><![CDATA[<p>At OpenTable, we are working to improve load performance across all of our products. However, the first step when improving anything is measuring. webpagest.org is <strong>the</strong> load performance testing tool of our age, but it can be daunting to hook up automated test runs. Unfortunately, I do not have a one-click solution for you, but I can share how we set up automated load performance testing in our applications. Over the course of this series, we’ll go through every step from retrieving an API key to logging results to another service like logstash or statsd. Part 1 is dedicated to retrieving an API key for the public webpagetest.org API and getting a test running using the webpagetest node module.</p><h4>Getting your API key</h4><p>You might expect something fancy here, but it’s as high-tech as sending an email. In fact, that’s it. You send an email through <a href="http://www.webpagetest.org/getkey.php">this web form</a>. As it points out, users are limited to 200 page loads. And yes, a repeat view counts as a second page load. If you need more than that, the next step is setting up a private instance of webpagetest. But don’t start there. I suggest getting up and running with the public instance before switching it over to a private one. That’s another project in itself, with <a href="https://sites.google.com/a/webpagetest.org/docs/private-instances">too many steps to describe in a blog post</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*ZoiWIpIw1xFZoWhQTo1dxw.png" /></figure><p>It doesn’t happen instantaneously, but you should soon receive a response with instructions on how to retrieve your API key. Once you have your key, move on to the following step.</p><h4>Getting a test running with gulp or grunt</h4><p>In a future article, we’ll go over how to test pages behind login. For now, let’s set up a test for a public website. For our example, we’ll use the bespoke namesake example.com.</p><h4>gulp</h4><p>First, let’s use <a href="https://github.com/gulpjs/gulp">gulp</a> to start the task. I know this is technically taboo since we’re not taking advantage of streams, but whether the gulp creators like it or not, it’s convenient. At OpenTable, we wrote a little module to help with logging the results of a webpagetest run to logstash, statsd, and hipchat. We’ll use that here instead of using the webpagetest node module directly.</p><pre>$ npm install --save-dev ot-wpt</pre><p>Then in your gulpfile.js…</p><pre>var wpt = require(&#39;ot-wpt&#39;);<br>gulp.task(&#39;webpagetest&#39;, function(done) {<br>  wpt({<br>    testUrl: &#39;www.example.com&#39;,<br>    apiKey: &#39;&lt;API_KEY_HERE&gt;<br>  }, done);<br>});</pre><p>Then run <strong>gulp webpagetest</strong>.</p><h4>grunt</h4><pre>$ npm install --save-dev grunt-ot-webpagetest</pre><p>In your Gruntfile.js…</p><pre>grunt.initConfig({<br>  ot-webpagetest: {<br>    example: {<br>      options: {<br>        testUrl: &#39;www.example.com&#39;,<br>        apiKey: &#39;&lt;API_KEY_HERE&gt;&#39;<br>      }<br>    }<br>  }<br>});</pre><p>Then run <strong>grunt ot-webpagetest</strong>.</p><p>Whether you use gulp or grunt, both of these options will run a test on webpagetest.org and will provide a link to view the results when completed. Much like this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*x_TQhuNZZwVIP49CAkp4kA.png" /><figcaption>Example result: <a href="http://www.webpagetest.org/result/160711_P8_159N/">http://www.webpagetest.org/result/160711_P8_159N/</a></figcaption></figure><p>You can view the test results directly on webpagetest.org by following that webpagetest link. It looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*dJl-NQ7Q2YR7586FYkd54A.png" /><figcaption>WebPageTest Results for example.com</figcaption></figure><p>We’ve already gotten pretty far. We’ve covered how to get your API key for webpagetest.org and how to get up and running with load testing from the command line.</p><p>In Part 2, we’ll cover logging the results to statsd and logstash and setting up your task to automatically run in Continuous Integration tools like Travis CI, TeamCity, or Jenkins. The real fun begins when you start testing pages behind login, or testing the load performance of certain user interactions–such as searching. But dessert comes after the meal.</p><p>– Timmy</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=941bd79e07e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sign your commits on GitHub with GPG]]></title>
            <link>https://medium.com/@timmywil/sign-your-commits-on-github-with-gpg-566f07762a43?source=rss-a7ced7eeac67------2</link>
            <guid isPermaLink="false">https://medium.com/p/566f07762a43</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[gnu]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[mac]]></category>
            <dc:creator><![CDATA[Timmy]]></dc:creator>
            <pubDate>Fri, 01 Jul 2016 13:01:03 GMT</pubDate>
            <atom:updated>2017-08-24T19:19:41.961Z</atom:updated>
            <content:encoded><![CDATA[<p>Last April, <a href="https://github.com/blog/2144-gpg-signature-verification">GitHub added support</a> for validating commits signed using GPG. As knowledge of this security feature grows, more and more developers are recommending it. However, setting it up can be confusing. In this article, I’ll cover how to set up signing commits with GPG and verifying those signatures on GitHub.</p><h4>What is GPG?</h4><p><a href="https://www.gnupg.org/">GPG</a> stands for GNU Privacy Guard. It is a form of encryption much like SSH–in fact, GNUPG version 2 includes support for SSH. It can be used to verify the identify of a sender–in this case, committer.</p><h4>Install the necessary tools</h4><p>You’ll need some way to manage GPG keys. GitHub recommends some GUIs (<a href="https://gpgtools.org/">GUI Suite</a> for Mac; <a href="https://www.gpg4win.org/">Gpg4win</a> for Windows). I recommend the GUI for windows, but the command line for Mac. According to the <a href="https://www.gnupg.org/download/supported_systems.html">GPG website</a>, the download didn’t work for a while on Windows 64-bit. It’s probably fine now, but Gpg4win might be less of a headache for you.</p><p>I’ll be providing instructions for <strong>Mac</strong> in the subsequent sections. The overall steps should be the same, but if you’re using Windows, consult the <a href="https://www.gpg4win.org/documentation.html">Gpg4win documentation</a> on how to generate the necessary keys. On the plus side, saving your passphrase should be easier on Windows using Gpg4win. On a Mac, the gpg-agent doesn’t automatically integrate with the OSX keychain, so more work is required. Not to worry, though. We’ll cover that too!</p><p>Sorry Linux users, but you probably know how to do this stuff already.</p><h4>Installing on a Mac</h4><pre>$ brew install gnupg gpg-agent pinentry-mac</pre><h4>Generate a GPG key</h4><pre>$ gpg --gen-key</pre><p>This asks a series of questions. It’s okay to use the defaults, with no expiration. When asked for an email, it is important to use the <em>same email</em> as the one on your GitHub profile–which should also be the same as the one used for Git. If these three emails do not match, <strong>verification will fail</strong>.</p><p>The last question asks for a passphrase. A passphrase is a sequence of words, not necessarily a sentence. For instance, “bunny butt triple canopy” or “Trump Hair Wild Raccoon Inebriated” are perfectly fine. Unfortunately, you can’t use those now, but you get the idea. It should be something you can remember–at least until you’ve got it saved in your keychain.</p><h4>Add the public key to your git config</h4><pre>$ gpg --list-keys<br>/Users/home/.gnupg/pubring.gpg<br>-------------------------------<br>pub   1537P/[PUBKEY] 2016-06-30<br>uid                  Your Name &lt;youremail@example.com&gt;<br>sub   1537P/[SUBKEY] 2016-06-29</pre><p>Note that “PUBKEY” is the key you want to copy to clipboard (the right side of the slash).</p><pre>$ git config --global user.signingkey &lt;PUBKEY&gt;</pre><h4>Add the key to GitHub</h4><p>Print your key in ASCII armor format…</p><pre>$ gpg --armor --export &lt;PUBKEY&gt;</pre><p>Then copy your GPG key, beginning with — — -BEGIN PGP PUBLIC KEY BLOCK — — — and ending with — — -END PGP PUBLIC KEY BLOCK — — -.</p><p><a href="https://help.github.com/articles/adding-a-new-gpg-key-to-your-github-account/">GitHub’s instructions</a> on where to paste this are plain enough…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*91lnuMBwf5lYX2V0kycSxA.png" /></figure><h4>Sign your commits</h4><p>You can sign individual commits or set a global git option to sign all commits. To sign an individual commit, add the -S option…</p><pre>$ git commit -S -m &quot;Signed commit&quot;</pre><p>Or, to sign all commits, set the option in your global git config…</p><pre>$ git config --global commit.gpgsign true</pre><p>After pushing to GitHub, you should see a nice “Verified” badge on the commit…</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*BOmd1_w59nK-aQS5b4hXQQ.png" /></figure><h4>Saving your passphrase</h4><p>If you don’t want to have to enter your passphrase every time you sign a commit, there are a few steps to get that working. Otherwise, you can stop here.</p><p>There are three config files to edit: “~/.gnupg/gpg.conf”, “~/.gnupg/gpg-agent.conf”, and your “~/.bash_profile” or “~/.zshrc”–depending on whether you use bash or zsh.</p><h4>gpg.conf</h4><pre># Uncomment within config (or add this line)<br># This tells gpg to use the gpg-agent<br>use-agent<br><br># Silences the &quot;you need a passphrase&quot; message<br># This is a potential source of issues, but I haven&#39;t noticed any<br>batch</pre><h4>gpg-agent.conf</h4><pre># Enables GPG to find gpg-agent<br>use-standard-socket<br><br># Connects gpg-agent to the OSX keychain via the brew-installed<br># pinentry program from GPGtools. This is the OSX &#39;magic sauce&#39;,<br># allowing the gpg key&#39;s passphrase to be stored in the login<br># keychain, enabling automatic key signing.<br>pinentry-program /usr/local/bin/pinentry-mac</pre><h4>.bash_profile or .zshrc</h4><pre># In order for gpg to find gpg-agent, gpg-agent must be running,<br># and there must be an env variable pointing GPG to the gpg-agent socket.<br># This little script, which must be sourced<br># in your shell&#39;s init script (ie, .bash_profile, .zshrc, whatever),<br># will either start gpg-agent or set up the<br># GPG_AGENT_INFO variable if it&#39;s already running.<br><br># Add the following<br>if [ -f ~/.gnupg/.gpg-agent-info ] &amp;&amp; [ -n &quot;$(pgrep gpg-agent)&quot; ]; then<br>    source ~/.gnupg/.gpg-agent-info<br>    export GPG_AGENT_INFO<br>else<br>    eval $(gpg-agent --daemon --write-env-file ~/.gnupg/.gpg-agent-info)<br>fi</pre><p><em>This information has been relayed from a </em><a href="https://gist.github.com/bmhatfield/cc21ec0a3a2df963bffa3c1f884b676b"><em>helpful gist</em></a><em> by </em><a href="https://gist.github.com/bmhatfield"><em>Brian Hatfield</em></a><em>.</em></p><p>Open a new shell and check that GPG_AGENT_INFO is set…</p><pre>$ echo $GPG_AGENT_INFO<br>&gt; /Users/home/.gnupg/agent-location</pre><p>The first time you sign a commit, the pinentry program will ask for permission. It shouldn’t ask again after that.</p><p><strong>Edit: Saving your passphrase on Windows</strong></p><p>I went through this flow myself on Windows and found that gpg4win was not quite enough to save the passphrase so I didn’t have to enter it on every commit. Fortunately, there’s a simple fix. Assuming you are using Git for Windows (formerly called Git Bash), you can add the following to your .bash_profile, .bashrc, or .profile:</p><pre>env=~/.ssh/agent.env<br><br>agent_load_env () { test -f &quot;$env&quot; &amp;&amp; . &quot;$env&quot; &gt;| /dev/null ; }<br><br>agent_start () {<br>    (umask 077; ssh-agent &gt;| &quot;$env&quot;)<br>    . &quot;$env&quot; &gt;| /dev/null ; }<br><br>agent_load_env<br><br># agent_run_state: 0=agent running w/ key; 1=agent w/o key; 2= agent not running<br>agent_run_state=$(ssh-add -l &gt;| /dev/null 2&gt;&amp;1; echo $?)<br><br>if [ ! &quot;$SSH_AUTH_SOCK&quot; ] || [ $agent_run_state = 2 ]; then<br>    agent_start<br>    ssh-add<br>elif [ &quot;$SSH_AUTH_SOCK&quot; ] &amp;&amp; [ $agent_run_state = 1 ]; then<br>    ssh-add<br>fi<br><br>unset env</pre><p>That will auto-launch ssh-agent on Windows, effectively saving the passphrase. See <a href="https://help.github.com/articles/working-with-ssh-key-passphrases/#auto-launching-ssh-agent-on-git-for-windows">GitHub Help</a> for more info.</p><p>And that’s it! Your setup is complete. Please feel free to ask questions in the comments, and let me know how I might improve this guide for future readers.</p><h4>Reference Material</h4><ul><li><a href="https://help.github.com/categories/gpg/">GitHub’s documentation on how to use GPG</a></li><li><a href="https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work">Git GPG documentation</a></li><li><a href="https://www.gnupg.org/index.html">GPG Homepage</a></li><li><a href="https://gist.github.com/bmhatfield/cc21ec0a3a2df963bffa3c1f884b676b">Brian Hatfield’s gist</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=566f07762a43" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>