<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>William Brawner</title><link href="https://wbrawner.com/" rel="alternate"/><link href="https://wbrawner.com/feed" rel="self"/><id>https://wbrawner.com/</id><updated>2026-07-10T20:18:00-06:00</updated><entry><title>Simple Made Easy</title><link href="https://wbrawner.com/2026/07/10/simple-made-easy/" rel="alternate"/><published>2026-07-10T20:18:00-06:00</published><updated>2026-07-10T20:18:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2026-07-10:/2026/07/10/simple-made-easy/</id><summary type="html">&lt;p&gt;&lt;em&gt;Simple Made Easy&lt;/em&gt;, a talk by Rich Hickey, is one of my favorite talks. I've watched it a few times since stumbling upon it and continue to enjoy it very much. If you haven't already, I highly recommend checking it out:&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/SxdOUGdseq4?si=KrpfMeDb2lx_mmAp" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;Another similar video I enjoy is the Clojure Documentary …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;Simple Made Easy&lt;/em&gt;, a talk by Rich Hickey, is one of my favorite talks. I've watched it a few times since stumbling upon it and continue to enjoy it very much. If you haven't already, I highly recommend checking it out:&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/SxdOUGdseq4?si=KrpfMeDb2lx_mmAp" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen&gt;&lt;/iframe&gt;

&lt;p&gt;Another similar video I enjoy is the Clojure Documentary. It goes into the history of how and why Rich Hickey created Clojure, and I found it to be both fascinating and entertaining:&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/Y24vK_QDLFg?si=lKfcsA49YnebyJIv" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen&gt;&lt;/iframe&gt;</content><category term="Resources"/><category term="programming"/><category term="functional programming"/></entry><entry><title>adb: more than one device/emulator</title><link href="https://wbrawner.com/2026/06/16/adb-more-than-one-device-emulator/" rel="alternate"/><published>2026-06-16T20:37:00-06:00</published><updated>2026-06-16T20:37:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2026-06-16:/2026/06/16/adb-more-than-one-device-emulator/</id><summary type="html">&lt;p&gt;I may be the odd one out here but when it comes to Android development, I often find myself in the terminal, which usually involves invoking &lt;code&gt;adb&lt;/code&gt; (Android's universal tool for interacting with devices). I've written several shell aliases and functions to make this more pleasant, but unfortunately they tend …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I may be the odd one out here but when it comes to Android development, I often find myself in the terminal, which usually involves invoking &lt;code&gt;adb&lt;/code&gt; (Android's universal tool for interacting with devices). I've written several shell aliases and functions to make this more pleasant, but unfortunately they tend to fall apart once I have more than one device connected (which I frequently do). Anyone else who finds themselves in a similar situation is probably all too familiar with the error message &lt;code&gt;adb&lt;/code&gt; displays under such circumstances: &lt;code&gt;adb: more than one device/emulator&lt;/code&gt;. I got so fed up of this that I decided to write a little wrapper script around &lt;code&gt;adb&lt;/code&gt; to intercept this error message and then prompt me to select a device to re-run the same command on once more. I give you &lt;a href="https://git.wbrawner.com/wbrawner/adb"&gt;&lt;code&gt;adb&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I didn't want to go rewriting all of my scripts/functions/aliases so the intention here is to install this little tool on your &lt;code&gt;PATH&lt;/code&gt;, somewhere before the actual &lt;code&gt;adb&lt;/code&gt; command. With that in place, a simple command like &lt;code&gt;adb shell pm list packages&lt;/code&gt; goes from this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;adb&lt;span class="w"&gt; &lt;/span&gt;shell&lt;span class="w"&gt; &lt;/span&gt;pm&lt;span class="w"&gt; &lt;/span&gt;list&lt;span class="w"&gt; &lt;/span&gt;packages
adb:&lt;span class="w"&gt; &lt;/span&gt;more&lt;span class="w"&gt; &lt;/span&gt;than&lt;span class="w"&gt; &lt;/span&gt;one&lt;span class="w"&gt; &lt;/span&gt;device/emulator
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;adb&lt;span class="w"&gt; &lt;/span&gt;shell&lt;span class="w"&gt; &lt;/span&gt;pm&lt;span class="w"&gt; &lt;/span&gt;list&lt;span class="w"&gt; &lt;/span&gt;packages
&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Pixel&lt;span class="w"&gt; &lt;/span&gt;3a
&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Pixel&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Pro&lt;span class="w"&gt; &lt;/span&gt;XL
Select&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;device&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;on:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
package:com.android.systemui.auto_generated_rro_vendor__
...
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You &lt;em&gt;could&lt;/em&gt; also just run &lt;code&gt;adb devices&lt;/code&gt; to get the serial number, then re-run your command with the &lt;code&gt;-s&lt;/code&gt; flag (which is all my wrapper does). Be my guest! I can never remember the serial numbers for my devices though, so I find having the actual device name to be more useful. Additionally, emulator serial numbers aren't consistent, so depending on the order in which you launch them, they might have different serial numbers from day to day. Once you add emulators in the mix, you'll also get to choose them by the name you've given them in Android Studio as opposed to something generic like &lt;code&gt;emulator-5554&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;adb&lt;span class="w"&gt; &lt;/span&gt;shell&lt;span class="w"&gt; &lt;/span&gt;pm&lt;span class="w"&gt; &lt;/span&gt;list&lt;span class="w"&gt; &lt;/span&gt;packages
&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Medium_Phone
&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Pixel&lt;span class="w"&gt; &lt;/span&gt;3a
&lt;span class="m"&gt;2&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Pixel&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Pro&lt;span class="w"&gt; &lt;/span&gt;XL
Select&lt;span class="w"&gt; &lt;/span&gt;a&lt;span class="w"&gt; &lt;/span&gt;device&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;on:&lt;span class="w"&gt; &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It's still not a perfect solution (I've managed to break tab-complete for command completion) and I should probable try to detect if &lt;code&gt;stdout&lt;/code&gt; is interactive or not (like when piping to a pager), but it works well enough to relieve some of my frustration. If you're interested in using it yourself, installation instructions (and some release artifacts) are available in the git repo. If you'd like to contribute, please write the code yourself (no LLMs please) and send me a patch via email.&lt;/p&gt;
&lt;p&gt;As an aside, I decided to write this in Clojure, since that's the newest language in my toolbox. I figured it would be a good choice since Android developers almost always have Java installed and it would allow me to build something pretty simply. I'm rather pleased with the result, but I did end up relying on GraalVM to get the execution time back in the milliseconds range (as opposed to ~1 second without it) on Linux. On my Mac at work, the startup performance is good enough that I don't really feel the need for GraalVM. In all fairness to Clojure though, that's more on the JVM than anything else.&lt;/p&gt;</content><category term="Tools"/><category term="android"/><category term="clojure"/><category term="adb"/><category term="tooling"/></entry><entry><title>Learning Clojure</title><link href="https://wbrawner.com/2026/05/22/cmdfreq/" rel="alternate"/><published>2026-05-22T21:07:00-06:00</published><updated>2026-05-22T21:07:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2026-05-22:/2026/05/22/cmdfreq/</id><summary type="html">&lt;p&gt;A couple weeks back, I had a random thought: what are the commands I run the
most frequently, and how frequently do I run them? Naturally, I had to scratch
this itch, and since I've been exploring Clojure lately, it seemed like the
perfect opportunity to put it to use …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A couple weeks back, I had a random thought: what are the commands I run the
most frequently, and how frequently do I run them? Naturally, I had to scratch
this itch, and since I've been exploring Clojure lately, it seemed like the
perfect opportunity to put it to use. I'm no stranger to functional programming,
having first been exposed to its concepts in Kotlin and solidyfing my comfort
with it in Haskell, so I actually found it pretty easy to express my ideas in
Clojure and get to a working solution pretty quickly. I did fumble around a bit
with the lisp syntax though. Like Rich Hickey joked in his talk &lt;em&gt;Simple Made
Easy&lt;/em&gt;&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;, "I've seen parens before but never on &lt;em&gt;that&lt;/em&gt; side of the function name".
Coming from Kotlin, I found the compiler errors in Clojure to be rather
unhelpful in most cases, because usually I was just forgetting to wrap my
functions in parens or something silly that I would think would have been an
obvious syntax error that the compiler would easily point out. This was not the
case, however, and in some cases I could even get the program to compile and run
but just not do anything, which confused me even further. I imagine that basic
syntax errors are things I could easily spot with more experience though so that
probably wouldn't be an issue in the long run. I also found myself getting used
to the lisp syntax pretty quickly. I actually appreciate some aspects of it and
maybe it's just the novelty of it but I could see myself coming around to
actually preferring it.&lt;/p&gt;
&lt;p&gt;Once I got my idea translated into code and running, I was pretty disappointed
with the run time, at just around a second for a pretty basic loop over just
1000 of my most recent shell commands. I knew this had to be mostly because of
the JVM, so I made the effort to build it with GraalVM and sure enough, the run
time came down to 4ms, much more in line with my expectations. 1 second is
really not a huge deal but even slower scripting languages can usually perform
similar tasks in sub-second times so it felt unreasonably slow. I don't love
needing to lean on GraalVM to get better performance like this though, so I
ended up rewriting it in Haskell.&lt;/p&gt;
&lt;p&gt;My experience with the Haskell rewrite was surprisingly not much better, despite
having far more experience with Haskell than with Clojure. I've been writing
Haskell off and on for nearly a year at this point, and yet I found myself
stumbling through the implementation, mostly getting tripped up on the IO monad
and getting my type definitions just right. If you were to ask me, I'd say that
I vastly prefer strongly-typed programming languages and even hold Haskell's
purity in high regard, but in practice I'm no longer sure how true that is.
Ultimately what it comes down to is I find myself having less and less time to
work on personal projects the older I get, and in the past I tended to stick
with languages that I used at work because I was far more productive in them.
Unfortunately for me, that would mean doing everything in Kotlin, which all but
necessitates that I use IntelliJ, which I'm not a huge fan of. So, when looking
at Haskell code, even Haskell code that I wrote myself a few months back, I find
it somewhat difficult to understand what's going on. Maybe it's because I've
spent the past decade in the JVM world where verbosity is the norm, but Haskell
is maybe a bit &lt;em&gt;too&lt;/em&gt; concise for my taste. To Haskell's credit though, my
reimplementation ran in 2ms with no extra optimization work on my part. Like I
wrote previously&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt; though, I doubt I'll see myself becoming a Haskeller because
the language just doesn't quite sit well with me. I think it's far too complex
for my needs.&lt;/p&gt;
&lt;p&gt;Some time later, I ran across &lt;a href="https://github.com/babashka/babashka"&gt;babashka&lt;/a&gt;, a script-like runtime for Clojure that
has instant startup time. Babashka unfortunately seems to welcome AI
contributions, so I'm not thrilled about that, though I suppose I could always
just stick with an older version of it. With babashka, I can get my small
Clojure program to run as a script in 20ms, which is perfectly acceptable to me.
Curiously enough, despite Clojure having much of the same drawbacks that I wrote
about Haskell in my previous post &lt;sup id="fnref2:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;, I do actually see myself writing more of
it. The AI landscape has changed my opinion on the employability of using a
programming language, and Clojure gives me access to the JVM, so I can cheat and
use mutable data structures as an escape hatch if I find that the pure
functional approach is too cumbersome or slow. Above all though I really
appreciate Clojure's simplicity. It feels like the Go of the functional world,
another language I greatly admire and enjoy using because of its simplicity.
Simple software is just easier to maintain, and using simple languages
facilitates writing simple code.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;https://www.youtube.com/watch?v=SxdOUGdseq4&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;https://wbrawner.com/2025/06/22/learning-haskell/&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;a class="footnote-backref" href="#fnref2:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="Programming"/><category term="clojure"/><category term="functional programming"/></entry><entry><title>Reviewing Pull Requests Locally</title><link href="https://wbrawner.com/2026/04/25/reviewing-pull-requests-locally/" rel="alternate"/><published>2026-04-25T20:38:00-06:00</published><updated>2026-04-25T20:38:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2026-04-25:/2026/04/25/reviewing-pull-requests-locally/</id><summary type="html">&lt;p&gt;When reviewing a pull request, I often like to pull the code and actually run
it, because sometimes code that &lt;em&gt;looks&lt;/em&gt; fine at first glance doesn't actually
work. If you're reviewing PRs on GitHub, then you can use the GitHub CLI to
quickly check out a PR locally, but that …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When reviewing a pull request, I often like to pull the code and actually run
it, because sometimes code that &lt;em&gt;looks&lt;/em&gt; fine at first glance doesn't actually
work. If you're reviewing PRs on GitHub, then you can use the GitHub CLI to
quickly check out a PR locally, but that doesn't really help out for
Codeberg/Forgejo. It turns out there's a special ref created for PRs:
&lt;code&gt;refs/pull/&amp;lt;PR&amp;gt;/head&lt;/code&gt;, where &lt;code&gt;&amp;lt;PR&amp;gt;&lt;/code&gt; is the actual number of the PR you want to
checkout. To make use of it, you just have to &lt;code&gt;fetch&lt;/code&gt; it first:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git fetch origin refs/pull/123/head:pr-review&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;In this example, I'm assuming &lt;code&gt;origin&lt;/code&gt; is the remote for Codeberg/Forgejo, &lt;code&gt;123&lt;/code&gt;
is the number of the PR in question, and &lt;code&gt;pr-review&lt;/code&gt; is the name of the local
branch where you'd like to inspect the code. Once you've fetched it, you just
have to switch over to it:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git checkout pr-review&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This trick also works on GitHub, so you don't &lt;em&gt;have&lt;/em&gt; to install the CLI if you
don't want to, at least not for this functionality.&lt;/p&gt;</content><category term="Tutorials"/><category term="programming"/><category term="code review"/><category term="git"/></entry><entry><title>SimpleMarkdown Updates</title><link href="https://wbrawner.com/2026/04/21/simplemarkdown-updates/" rel="alternate"/><published>2026-04-21T21:17:00-06:00</published><updated>2026-04-21T21:17:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2026-04-21:/2026/04/21/simplemarkdown-updates/</id><summary type="html">&lt;p&gt;I've been doing a bit more work on &lt;a href="https://github.com/wbrawner/SimpleMarkdown/"&gt;SimpleMarkdown&lt;/a&gt; lately that seemed worthy of
sharing. I've also got a couple of calls to action to accompany these updates,
which is what motivated this blog post.&lt;/p&gt;
&lt;h2&gt;Translations&lt;/h2&gt;
&lt;p&gt;Firstly, SimpleMarkdown is now available in Spanish and French! This is possible
thanks to …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been doing a bit more work on &lt;a href="https://github.com/wbrawner/SimpleMarkdown/"&gt;SimpleMarkdown&lt;/a&gt; lately that seemed worthy of
sharing. I've also got a couple of calls to action to accompany these updates,
which is what motivated this blog post.&lt;/p&gt;
&lt;h2&gt;Translations&lt;/h2&gt;
&lt;p&gt;Firstly, SimpleMarkdown is now available in Spanish and French! This is possible
thanks to &lt;a href="https://weblate.org/"&gt;Weblate&lt;/a&gt;, and multilingual community members like cwpute, who
contributed the French translations. I contributed the Spanish translations
myself, and (Mexican) Spanish is my second language, so please feel free to
correct me there if something sounds odd, or &lt;a href="https://hosted.weblate.org/engage/simplemarkdown"&gt;contribute new translations&lt;/a&gt; in your
own language if you'd like to use the app in your preferred language.&lt;/p&gt;
&lt;h2&gt;AI Policy&lt;/h2&gt;
&lt;p&gt;SimpleMarkdown now has a &lt;a href="https://github.com/wbrawner/SimpleMarkdown#ai-usage"&gt;no AI policy&lt;/a&gt;. From its conception, SimpleMarkdown has
been a way for me to explore Android development and have fun building something
useful for myself. I want to invite others to join me in using it and learning
with it, but LLMs are antithetical to those goals. I respectfully ask that any
contributions be strictly made by a human, because I have very limited time to
work on the project and want to make sure that any interactions I have with the
community serve to build up the community and not just serve as more training
data for the machines that are threatening to render my craft and my passion
obsolete.&lt;/p&gt;
&lt;h2&gt;Financial Support&lt;/h2&gt;
&lt;p&gt;For a few years now I've had in-app purchases as an option to support my work.
Many of you have donated, for which I am extremely grateful! Unfortunately the
donations have been nowhere near enough for me to consider leaving my fulltime
job or even reducing my hours to have more time to work on open source projects.
To that end, I've created profiles on &lt;a href="https://github.com/sponsors/wbrawner"&gt;GitHub Sponsors&lt;/a&gt;, &lt;a href="https://patreon.com/wbrawner"&gt;Patreon&lt;/a&gt;, and
&lt;a href="https://liberapay.com/wbrawner"&gt;Liberapay&lt;/a&gt;. SimpleMarkdown has been an ongoing project of mine for the past 9
years and I intend to continue working on it for as long as I feasibly can. If
you find it valuable and are in a position to do so, I would greatly appreciate
your support!&lt;/p&gt;
&lt;h2&gt;Migration from GitHub&lt;/h2&gt;
&lt;p&gt;If it isn't already apparent, I'm a huge fan of not just open source software
but free software. GitHub is neither, and that hasn't sat well with me for quite
a while now. Admittedly, GitHub is just a mirror for SimpleMarkdown, and the
primary home for it is actually on my self-hosted Forgejo instance over at
&lt;a href="https://git.wbrawner.com/wbrawner/SimpleMarkdown"&gt;https://git.wbrawner.com/wbrawner/SimpleMarkdown&lt;/a&gt;. I don't want to ask people to
create accounts over there, nor do I want to be responsible for personal
information, spam, etc, but I do want to move away from GitHub. The two forges
I'm considering adopting are &lt;a href="https://codeberg.org/"&gt;Codeberg&lt;/a&gt; and &lt;a href="https://sr.ht/"&gt;Sourcehut&lt;/a&gt;, though I've yet to make
a decision on which one I'll go with. If you would like to voice your opinion on
the matter, I'd be happy to hear it!&lt;/p&gt;</content><category term="Updates"/><category term="SimpleMarkdown"/><category term="Android"/><category term="open source"/></entry><entry><title>Learning Haskell</title><link href="https://wbrawner.com/2025/06/22/learning-haskell/" rel="alternate"/><published>2025-06-22T11:47:00-06:00</published><updated>2025-06-22T11:47:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2025-06-22:/2025/06/22/learning-haskell/</id><summary type="html">&lt;p&gt;A few years back, a colleague of mine commented to me that he really liked
Haskell, and that he thought more developers should adopt functional programming
in their work. At the time, I didn't really think much about it, since I work as
an Android developer. For native Android development …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A few years back, a colleague of mine commented to me that he really liked
Haskell, and that he thought more developers should adopt functional programming
in their work. At the time, I didn't really think much about it, since I work as
an Android developer. For native Android development, the only real choices in
programming languages are Java or Kotlin. Over the past few years though, I've
watched functional programming concepts gain traction in Android development,
especially with the rise of Jetpack Compose&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;, and as such I have slowly been
adopting a more functional approach to my work. With that in mind, I thought it
might be helpful to learn a functional programming language, and Haskell seems
to come up quite frequently in searches on functional programming. As a big fan
of strongly-typed langauges, it was immediately appealing to me.&lt;/p&gt;
&lt;p&gt;When it comes to learning a new language, I'm always hesitant to build something
I might actually care about later. I cringe when looking back at the first
projects I've made in the various programming languages I've tried, so I
wanted something to work on that I could basically throw away after the fact.
For better or for worse, I thought it might be a good idea to work on old
challenges from Advent of Code&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;&lt;sup id="fnref:3"&gt;&lt;a class="footnote-ref" href="#fn:3"&gt;3&lt;/a&gt;&lt;/sup&gt;. For the most part, it's been difficult
though quite fun and extremely satisfying to come up with concise, elegant
solutions to the problems, except where the solutions involve manipulating
arrays in-place, for which I just switch over to Go. I know Haskell has mutable
references and I should probably be using them as a learning exercise, but
sometimes the frustration wins out and I just want to solve the challenge and
move on. Gotta get those stars after all.&lt;/p&gt;
&lt;p&gt;This has me thinking though. Haskell doesn't have a thriving job market. I find
it hard to believe that will change anytime soon. It's also used to solve
similar problems as other languages I already use and like, so I'm not exactly
expanding my horizons into new problems to solve&lt;sup id="fnref:4"&gt;&lt;a class="footnote-ref" href="#fn:4"&gt;4&lt;/a&gt;&lt;/sup&gt;. In fact, for some problems
I feel like Haskell can lead to elegant solutions, though for others it makes
the problem even harder to solve. Overall, I find myself constantly questioning
my decision to learn Haskell, because aside from the fun and intellectual
challenge, there doesn't seem to be much upside to it. Even if you consider that
I am sharpening my skills as a developer, the skills and techniques I learn will
have to be used sparingly, because what good will it do me to write concise,
elegant code if none of my coworkers can confidently iterate on it because it's
so terse and hard to wrap their heads around?&lt;/p&gt;
&lt;p&gt;Still, I don't &lt;em&gt;want&lt;/em&gt; to give up on Haskell. There is still plenty for me to
learn about functional programming, and after I've beaten my head against the
wall for a few hours and slept on it, I can usually find a solution that works
and then I can clean it up a bit to make it something I'm happy with. The
satisfaction of that feeling is probably part of what keeps me coming back to
Haskell, along with the novelty of feeling like a junior developer all over
again, warts and all. If I'm being entirely honest with myself though, it's
hard to justify the effort put into getting a working Haskell program when I can
just bust it out in Go in a fraction of the time. In the end, I think I'd rather
spend my time working with a language that will open up new doors in software
development to me, like C, C++, Zig, Rust, etc.&lt;/p&gt;
&lt;p&gt;Am I saying Haskell is a terrible language and no one should bother learning it?
Absolutely not. It would probably benefit software engineering as a whole if
everyone dove into at least one functional programming language once in a while.
But I'm also not going to become a Haskeller myself, because I don't think that
going from extreme imperative programming to extreme functional programming is
necessarily better. I'm going to settle in here on the fence and say that taking
tools and techniques from both sides is probably the best approach, and so it's
good to be familiar with both sides. If you're a Haskeller for life, I'm happy
for you! If you've never touched Haskell, I think it's at least worth taking a
quick look at to understand how it's different.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Jetpack Compose is Google's declarative UI framework for native Android
app development.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;&lt;a href="https://adventofcode.com/"&gt;https://adventofcode.com/&lt;/a&gt;&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:3"&gt;
&lt;p&gt;Was this a good idea? Probably not. Would I recommend it to others
learning new languages? Also no. Would I recommend it to people who are just
looking to write some code in a language they're already familiar with?
Absolutely!&amp;#160;&lt;a class="footnote-backref" href="#fnref:3" title="Jump back to footnote 3 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:4"&gt;
&lt;p&gt;There are actually a lot of problems Haskell is probably better suited to
solving than languages I already know and use. The problem is, they're not
problems I'm particularly interested in, like problems related to
mathematics. Interesting stuff for sure, but not for me.&amp;#160;&lt;a class="footnote-backref" href="#fnref:4" title="Jump back to footnote 4 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="Programming"/><category term="haskell"/><category term="programming"/></entry><entry><title>Android WebView Crash in Jetpack Compose</title><link href="https://wbrawner.com/2024/08/28/android-webview-crash-in-jetpack-compose/" rel="alternate"/><published>2024-08-28T21:30:00-06:00</published><updated>2024-08-28T21:30:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2024-08-28:/2024/08/28/android-webview-crash-in-jetpack-compose/</id><summary type="html">&lt;p&gt;Recently I had &lt;a href="https://github.com/wbrawner/SimpleMarkdown/issues/88"&gt;an issue reported&lt;/a&gt; on an app of mine, &lt;a href="https://github.com/wbrawner/SimpleMarkdown"&gt;SimpleMarkdown&lt;/a&gt;, where
the app would crash when tapping on a menu item from the navigation drawer. I
unfortunately wasn't able to reproduce the issue on my personal device, a Pixel
7 at the time of writing, but I got …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently I had &lt;a href="https://github.com/wbrawner/SimpleMarkdown/issues/88"&gt;an issue reported&lt;/a&gt; on an app of mine, &lt;a href="https://github.com/wbrawner/SimpleMarkdown"&gt;SimpleMarkdown&lt;/a&gt;, where
the app would crash when tapping on a menu item from the navigation drawer. I
unfortunately wasn't able to reproduce the issue on my personal device, a Pixel
7 at the time of writing, but I got a couple of other reports on the same issue
and via the reviews on the Play Store&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;. I also wasn't seeing the crash in any
of my automated tests that run on Firebase Test Lab for each pull request. One
user affected by the crash asked if I was able to reproduce the issue in an
emulator, so I figured I'd give it a shot&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;, and sure enough, the app crashed.
Much to my dismay, the error message was entirely unhelpful though:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;Fatal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;signal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SIGSEGV&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SEGV_MAPERR&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fault&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;addr&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0x28&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12327&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;RenderThread&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12254&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lemarkdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;free&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;Cmdline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wbrawner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;simplemarkdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;free&lt;/span&gt;
&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12254&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12327&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;RenderThread&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wbrawner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;simplemarkdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;free&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Some kind of native crash (yay) and not a whole lot to work with. I was tempted
to just throw my hands up and say "maybe a future release of Android/Jetpack
Compose will solve this", but I didn't know how many users would be affected by
this and given that it was following a pretty major release, I figured I should
at least investigate a little. I needed some more information though, so I tried
removing the &lt;code&gt;package:mine&lt;/code&gt; filter from logcat in Android Studio, and there I
did in fact get some more information, though still not quite actionable:&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;The full native backtrace&lt;/summary&gt;


&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;***&lt;/span&gt;
&lt;span class="nx"&gt;Build&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fingerprint&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nx"&gt;google&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;sdk_gphone64_x86_64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;emu64xa&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;AP31&lt;/span&gt;&lt;span class="m m-Double"&gt;.240617.003&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;12088229&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;release&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;keys&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;
&lt;span class="nx"&gt;Revision&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sc"&gt;&amp;#39;0&amp;#39;&lt;/span&gt;
&lt;span class="nx"&gt;ABI&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nx"&gt;x86_64&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;
&lt;span class="nx"&gt;Timestamp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2024&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;08&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="m m-Double"&gt;05.474897959&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0600&lt;/span&gt;
&lt;span class="nx"&gt;Process&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;uptime&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;222&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;
&lt;span class="nx"&gt;Cmdline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wbrawner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;simplemarkdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;free&lt;/span&gt;
&lt;span class="nx"&gt;pid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12254&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;tid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;12327&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;RenderThread&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;wbrawner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;simplemarkdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;free&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;
&lt;span class="nx"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10251&lt;/span&gt;
&lt;span class="nx"&gt;signal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SIGSEGV&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SEGV_MAPERR&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fault&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;addr&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mh"&gt;0x0000000000000028&lt;/span&gt;
&lt;span class="nx"&gt;Cause&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;null&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pointer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;dereference&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;rax&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00007&lt;/span&gt;&lt;span class="nx"&gt;d21f6e2d4e0&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;rbx&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;rcx&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;rdx&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000002&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;r8&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mi"&gt;0000000000000001&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;r9&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;r10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;r11&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;r12&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00007&lt;/span&gt;&lt;span class="nx"&gt;d21f6e2d5c0&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;r13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;r14&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;r15&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00007&lt;/span&gt;&lt;span class="nx"&gt;d21f6e2d4e0&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;rdi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;rsi&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00007&lt;/span&gt;&lt;span class="nx"&gt;d21f6e2d2d8&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;rbp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000000000&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;rsp&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00007&lt;/span&gt;&lt;span class="nx"&gt;d21f6e2d3e8&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;rip&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00007&lt;/span&gt;&lt;span class="nx"&gt;d2514e24820&lt;/span&gt;
&lt;span class="mi"&gt;55&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;total&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;frames&lt;/span&gt;
&lt;span class="nx"&gt;backtrace&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;00&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000424820&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkSurface&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;getCanvas&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;01&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00000000002&lt;/span&gt;&lt;span class="nx"&gt;a2a90&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;GLFunctorDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;onDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1216&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;02&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;03&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000055&lt;/span&gt;&lt;span class="nx"&gt;af68&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;skgpu&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;ganesh&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;Device&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawDrawable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;392&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;04&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000289634&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nx"&gt;_37&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__invoke&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(.&lt;/span&gt;&lt;span class="nx"&gt;__uniq&lt;/span&gt;&lt;span class="m m-Double"&gt;.150848978645254602633048518174355561839&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;132&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;05&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;06&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;07&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;08&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;09&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;11&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;19&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;27&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;33&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;35&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;37&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;38&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;39&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000033&lt;/span&gt;&lt;span class="nx"&gt;a429&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;105&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;41&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000285&lt;/span&gt;&lt;span class="nx"&gt;b26&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DisplayListData&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;182&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000250&lt;/span&gt;&lt;span class="nx"&gt;eec&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;drawContent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1068&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;43&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000251774&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNodeDrawable&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;forceDraw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;SkCanvas&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;276&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;44&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000248&lt;/span&gt;&lt;span class="nx"&gt;e1a&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;SkiaPipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderLayerImpl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNode&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;Rect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;442&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00000000002&lt;/span&gt;&lt;span class="nx"&gt;a48e3&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;SkiaGpuPipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderLayersImpl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;LayerUpdateQueue&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;147&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000249&lt;/span&gt;&lt;span class="nx"&gt;a69&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;SkiaPipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;LayerUpdateQueue&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkRect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__1&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNode&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__1&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;allocator&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNode&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;Rect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;sk_sp&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;SkSurface&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkMatrix&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;601&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;47&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00000000002&lt;/span&gt;&lt;span class="nx"&gt;a925e&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;skiapipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;SkiaOpenGLPipeline&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderthread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;Frame&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkRect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;SkRect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;LightGeometry&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;LayerUpdateQueue&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;Rect&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;LightInfo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__1&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;vector&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNode&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__1&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;allocator&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;sp&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderNode&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;FrameInfoVisualizer&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderthread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;HardwareBufferRenderParams&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;const&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__1&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;mutex&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;830&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000256&lt;/span&gt;&lt;span class="nx"&gt;f03&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderthread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;CanvasContext&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;draw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;979&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;49&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000025&lt;/span&gt;&lt;span class="nx"&gt;a8dc&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__1&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__function&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__func&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderthread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DrawFrameTask&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;postAndWait&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nx"&gt;_0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;std&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;__1&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;allocator&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderthread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;DrawFrameTask&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;postAndWait&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="nx"&gt;_0&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;()&amp;gt;&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;operator&lt;/span&gt;&lt;span class="p"&gt;()()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(.&lt;/span&gt;&lt;span class="nx"&gt;__uniq&lt;/span&gt;&lt;span class="m m-Double"&gt;.264041412789356548918088680803242235290&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;c303f2d2360db58ed70a2d0ac7ed911b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;1548&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000026653&lt;/span&gt;&lt;span class="nx"&gt;e&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;WorkQueue&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;686&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;51&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;00000000002&lt;/span&gt;&lt;span class="nx"&gt;b43db&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libhwui&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;uirenderer&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;renderthread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;RenderThread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;threadLoop&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;475&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="nx"&gt;bfb5921a7aa43da3c2e07e65703d737&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;52&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000010562&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;system&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libutils&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;Thread&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nx"&gt;_threadLoop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;void&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;178&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="nx"&gt;a1cecdd149caf732e29843b6721becd&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;53&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;000000000006&lt;/span&gt;&lt;span class="nx"&gt;d62a&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;apex&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;bionic&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__pthread_start&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;void&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;58&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;eb58b4d427279994f00c0e1818477e4f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="err"&gt;#&lt;/span&gt;&lt;span class="mi"&gt;54&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pc&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0000000000060348&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;apex&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;android&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;lib64&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;bionic&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;libc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;so&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;__start_thread&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="mi"&gt;56&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;BuildId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;eb58b4d427279994f00c0e1818477e4f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;/details&gt;

&lt;p&gt;Luckily, this gave me enough to go searching for on the web, where I eventually
landed upon this &lt;a href="https://github.com/react-native-webview/react-native-webview/pull/2874"&gt;PR for React Native&lt;/a&gt; that proported to fix what appeared to be
the same issue I was running into. I had nothing to lose so I figured I'd adapt
the fix to my code and sure enough, the crash went away! You can see the
&lt;a href="https://git.wbrawner.com/wbrawner/SimpleMarkdown/commit/b42b949bdbe738052217a5f97a23f1a972f24c76"&gt;git diff&lt;/a&gt; for my fix in the repo, but the TL;DR of it all is, if you are
experiencing crashes when trying to use a &lt;code&gt;WebView&lt;/code&gt; in Jetpack Compose, try
wrapping your &lt;code&gt;AndroidView&lt;/code&gt; in a &lt;code&gt;FrameLayout&lt;/code&gt; and modifying your code
accordingly. Instead of this...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;AndroidView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;factory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;WebView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;apply&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;webView&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;... try this instead:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;private&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;val&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;WEBVIEW_TAG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;myWebViewTag&amp;quot;&lt;/span&gt;

&lt;span class="n"&gt;AndroidView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;factory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;FrameLayout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;apply&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;addView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="n"&gt;WebView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;apply&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="n"&gt;tag&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;WEBVIEW_TAG&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;frameLayout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;frameLayout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;findViewWithTag&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;WebView&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;WEBVIEW_TAG&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="na"&gt;apply&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;Leaving 1 or 2 star reviews for a bug/crash on a free and open source
  project is quite demoralizing by the way.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;I actually tend to do most of my development on physical devices since
  I've usually had the opposite experience, where the app seems to work just
  fine on an emulator but has some weird issue on a real device, or because I
  just want to interact with the app in the way that most users will.&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="28"/><category term="android"/><category term="jetpack compose"/><category term="bug fix"/><category term="crash"/></entry><entry><title>More GitHub Actions Adventures</title><link href="https://wbrawner.com/2024/03/21/more-github-actions-adventures/" rel="alternate"/><published>2024-03-21T21:49:00-06:00</published><updated>2024-03-21T21:49:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2024-03-21:/2024/03/21/more-github-actions-adventures/</id><summary type="html">&lt;p&gt;Recently I wrote a post about my GitHub Actions not being triggered on the
&lt;code&gt;main&lt;/code&gt; branch upon merging a PR&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;, the fix being to add a custom auth token as
a secret. At first, this appeared to have solved my issue, as the &lt;code&gt;main&lt;/code&gt; job was
once again triggering …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently I wrote a post about my GitHub Actions not being triggered on the
&lt;code&gt;main&lt;/code&gt; branch upon merging a PR&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;, the fix being to add a custom auth token as
a secret. At first, this appeared to have solved my issue, as the &lt;code&gt;main&lt;/code&gt; job was
once again triggering after I merged PRs. The problem was, it was only
succeeding for &lt;em&gt;my&lt;/em&gt; PRs, not PRs opened by dependabot. PRs opened by dependabot
failed with the following error message:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;gh&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;To&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;use&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GitHub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CLI&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GitHub&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Actions&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;workflow&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;set&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GH_TOKEN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;environment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variable&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Example&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;GH_TOKEN&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;$&lt;/span&gt;&lt;span class="o"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;github&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;token&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;At first, I was quite confused because I &lt;em&gt;had&lt;/em&gt; set the &lt;code&gt;GH_TOKEN&lt;/code&gt; environment
variable, and it worked just fine on PRs I opened myself. As it turns out
though, the token was in fact missing for PRs from dependabot, and this is also
by design&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;With the exception of &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;, secrets are not passed to the runner when a workflow is triggered from a forked repository. The &lt;code&gt;GITHUB_TOKEN&lt;/code&gt; has read-only permissions in pull requests from forked repositories. For more information, see "&lt;a href="https://docs.github.com/en/actions/security-guides/automatic-token-authentication"&gt;Automatic token authentication&lt;/a&gt;."&lt;/p&gt;
&lt;p&gt;…&lt;/p&gt;
&lt;p&gt;Note: Workflows triggered by Dependabot pull requests are treated as though they are from a forked repository, and are also subject to these restrictions.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The fix then was to use the &lt;code&gt;pull_request_target&lt;/code&gt; trigger instead of
&lt;code&gt;pull_request&lt;/code&gt;, like so:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;pull_request_target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;types&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;opened&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;reopened&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;edited&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;main&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With this, whenever a PR is opened, reopened, or edited on the &lt;code&gt;main&lt;/code&gt; branch,
the workflow to enable auto-merge will execute &lt;em&gt;and&lt;/em&gt; the secrets will be
present. Of note is that this workflow runs on the target branch, so in my case
the &lt;code&gt;main&lt;/code&gt; branch, which is in contrast to the &lt;code&gt;pull_request&lt;/code&gt; trigger that runs
on the base branch, or the branch that contains the proposed changes. This is
for security reasons, to prevent malicious workflows from extracting secrets.
For my purposes, this was fine, as I just split my auto-merge workflow out into
its own file, and kept my &lt;code&gt;pull_request&lt;/code&gt; workflow in another file so I could
still perform testing and validation on the new code without the security risks.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/2024/03/15/github-actions-not-triggering-on-pr-merge/"&gt;GitHub Actions Not Triggering on PR
  Merge&lt;/a&gt;&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;&lt;a href="https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull-request-events-for-forked-repositories-2"&gt;Pull request events for forked
  repositories&lt;/a&gt;&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="21"/><category term="CI"/><category term="GitHub Actions"/><category term="Actions"/></entry><entry><title>GitHub Actions Not Triggering on PR Merge</title><link href="https://wbrawner.com/2024/03/15/github-actions-not-triggering-on-pr-merge/" rel="alternate"/><published>2024-03-15T21:37:00-06:00</published><updated>2024-03-15T21:37:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2024-03-15:/2024/03/15/github-actions-not-triggering-on-pr-merge/</id><summary type="html">&lt;p&gt;Recently I've been playing around with GitHub Actions to familiarize myself more
with them. I also find it quite satisfying to maintain a certain level of
stability and reliability even on my own personal projects, especially given the
fact that the amount of free time I have to spend on …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently I've been playing around with GitHub Actions to familiarize myself more
with them. I also find it quite satisfying to maintain a certain level of
stability and reliability even on my own personal projects, especially given the
fact that the amount of free time I have to spend on them varies wildly from
week to week. Additionally, I've been exploring the use of &lt;a href="https://docs.github.com/en/code-security/dependabot"&gt;dependabot&lt;/a&gt; to help me
keep dependencies up-to-date, which is particularly useful for me given the
number of personal projects I have. So for each project, I've begun to introduce
a pull request workflow, that runs tests and ensures that the project builds
(usually an Android or JVM project), and the PR will be marked for auto-merge
if the author is myself or dependabot and all the required checks pass. Here's
an example of what that workflow looks like on one of my personal projects:&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;pull-request.yml&lt;/summary&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Pull request workflow&lt;/span&gt;
&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;pull_request&lt;/span&gt;

&lt;span class="nt"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;write&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;pull-requests&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;write&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;checks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;write&lt;/span&gt;

&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;test&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Build and Test&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;ubuntu-latest&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;actions/checkout@v3&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;actions/setup-java@v3&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;distribution&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;temurin&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;java-version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;17&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Validate Gradle Wrapper&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;gradle/wrapper-validation-action@v1&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Build with Gradle&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;gradle/gradle-build-action@v2&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;--stacktrace build&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Publish JUnit Results&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;dorny/test-reporter@v1&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;always()&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Unit Tests&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;*/build/test-results/test/*.xml&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;reporter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;java-junit&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;fail-on-error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;automerge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Enable automerge&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;ubuntu-latest&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;if&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{ github.actor == &amp;#39;wbrawner&amp;#39; || github.actor == &amp;#39;dependabot[bot]&amp;#39; }}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Enable auto-merge&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;gh pr merge --auto --rebase &amp;quot;$PR_URL&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;PR_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{github.event.pull_request.html_url}}&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;GH_TOKEN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{secrets.GH_TOKEN}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;/details&gt;

&lt;p&gt;Nothing particularly interesting, except that if you look closely, you'll notice
that I'm using a different authentication token to enable auto-merge:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;GH_TOKEN&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{secrets.GH_TOKEN}}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In most cases, when having GitHub Actions execute API calls, you'd use the
standard &lt;code&gt;GITHUB_TOKEN&lt;/code&gt; provided for authentication with GitHub's APIs from a
GitHub Action&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;. If you do that however, you'll soon realize that none of your
other actions will be triggered. Take, for instance, this other action that I
have configured to run on pushes to my &lt;code&gt;main&lt;/code&gt; branch:&lt;/p&gt;
&lt;details&gt;
&lt;summary&gt;main.yml&lt;/summary&gt;

&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Publish Docker image&lt;/span&gt;
&lt;span class="nt"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;push&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="nt"&gt;branches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;main&lt;/span&gt;

&lt;span class="nt"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nt"&gt;push_to_registry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Push Docker image to GitHub Packages&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;ubuntu-latest&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Check out the repo&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;actions/checkout@v2&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Docker meta&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;meta&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;docker/metadata-action@v4&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;images&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p p-Indicator"&gt;|&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;ghcr.io/wbrawner/twigs&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p p-Indicator"&gt;|&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;type=schedule&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;type=ref,event=branch&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;type=ref,event=pr&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;type=semver,pattern={{version}}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;type=semver,pattern={{major}}.{{minor}}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;type=semver,pattern={{major}}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="no"&gt;type=sha&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Set up QEMU&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;docker/setup-qemu-action@v2&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Set up Docker Buildx&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;docker/setup-buildx-action@v2&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Login to GitHub Container Registry&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;docker/login-action@v2&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;registry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;ghcr.io&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;username&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{ github.actor }}&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;Build and push&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;docker/build-push-action@v3&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nt"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;.&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;platforms&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;linux/amd64,linux/arm64&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;push&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;true&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;tags&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{ steps.meta.outputs.tags }}&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nt"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;${{ steps.meta.outputs.labels }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;/details&gt;

&lt;p&gt;This workflow just builds and publishes the docker image for my project on each
push to &lt;code&gt;main&lt;/code&gt;, be it a direct push or as a result of merging a pull request. I
was quite confused as to why this job was triggering when I pushed directly to
&lt;code&gt;main&lt;/code&gt;, and when I manually merged PRs, but not when PRs were automatically
merged by the GitHub bot. Turns out I just needed to slow down a little and read
the manual&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;When you use the repository's &lt;code&gt;GITHUB_TOKEN&lt;/code&gt; to perform tasks, events triggered by the &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;, with the exception of &lt;code&gt;workflow_dispatch&lt;/code&gt; and &lt;code&gt;repository_dispatch&lt;/code&gt;, will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs. For example, if a workflow run pushes code using the repository's &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;, a new workflow will not run even when the repository contains a workflow configured to run when &lt;code&gt;push&lt;/code&gt; events occur. For more information, see "&lt;a href="https://docs.github.com/en/actions/security-guides/automatic-token-authentication"&gt;Automatic token authentication&lt;/a&gt;."&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, if you find yourself in a situation where your GitHub Actions are not being
triggered when you auto-merge the PR (or perform some other interaction with
GitHub's API) from another GitHub Action, the trick is to just create a token
for your own user (or your own bot user with read/write access to the repo) and
use that token instead of the default &lt;code&gt;GITHUB_TOKEN&lt;/code&gt;. Happy coding!&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://docs.github.com/en/actions/security-guides/automatic-token-authentication"&gt;Automatic token authentication&lt;/a&gt;&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;&lt;a href="https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow"&gt;Triggering a workflow from a workflow&lt;/a&gt;&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="15"/><category term="GitHub Actions"/><category term="CI"/></entry><entry><title>Breakout</title><link href="https://wbrawner.com/2024/01/08/breakout/" rel="alternate"/><published>2024-01-08T09:10:00-07:00</published><updated>2024-01-08T09:10:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2024-01-08:/2024/01/08/breakout/</id><summary type="html">&lt;p&gt;&lt;img alt="An animated image of breakout gameplay" src="https://wbrawner.com/2024/01/06/breakout.gif"&gt;&lt;/p&gt;
&lt;p&gt;Continuing with the &lt;a href="https://20_games_challenge.gitlab.io/"&gt;20 Games Challenge&lt;/a&gt;, I've implemented &lt;a href="https://en.wikipedia.org/wiki/Breakout_(video_game)"&gt;breakout&lt;/a&gt; as a
PICO-8 game. I found it was quite similar to pong, the previous game I wrote,
though I ran into some new troubles. Notably, the ball is supposed to increase
in speed as you break bricks. The way I'm handling …&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;img alt="An animated image of breakout gameplay" src="https://wbrawner.com/2024/01/06/breakout.gif"&gt;&lt;/p&gt;
&lt;p&gt;Continuing with the &lt;a href="https://20_games_challenge.gitlab.io/"&gt;20 Games Challenge&lt;/a&gt;, I've implemented &lt;a href="https://en.wikipedia.org/wiki/Breakout_(video_game)"&gt;breakout&lt;/a&gt; as a
PICO-8 game. I found it was quite similar to pong, the previous game I wrote,
though I ran into some new troubles. Notably, the ball is supposed to increase
in speed as you break bricks. The way I'm handling the movement of the ball is
by increasing or decreasing the x and y position by the x and y speeds,
respectively. This broke my collision detection when the y position for the ball
skipped over the y position for a block or paddle, in which case the ball would
simply pass through the object instead of colliding with it. Initially I thought
I could work around this by keeping track of the ball's previous and next y
positions, then checking if the y position of the paddle or block were in
between those two points, in which case a collision would have occurred, but I
decided this would be too complex to maintain as the ball's speed could grow to
be too large and lead to janky movement where it would detect a collision and
reverse direction before it even appeared to touch the object it collided with.
So, instead I opted for the simpler solution of just putting a max limit on the
ball's speed that ensured it never moved two entire pixels in one
frame, that way it would never skip over another object's y position. It's not
ideal, and if this were an actual project I intended to ship I'd spend far more
time on this to make it better, but this is just a learning exercise and not a
game I'm  particularly interested in spending a ton of time on. Feel free to
play my implementation if you're so inclined to do so!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/files/breakout.html"&gt;&lt;img alt="A PICO-8 cartridge for my implementation of breakout. Click to play!" src="https://wbrawner.com/2024/01/06/breakout.p8.png"&gt;&lt;/a&gt;&lt;/p&gt;</content><category term="06"/><category term="pico-8"/><category term="game development"/><category term="game dev"/><category term="gaming"/></entry><entry><title>Pong</title><link href="https://wbrawner.com/2023/12/27/pong/" rel="alternate"/><published>2023-12-27T15:02:00-07:00</published><updated>2023-12-27T15:02:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2023-12-27:/2023/12/27/pong/</id><summary type="html">&lt;p&gt;After looking through the tutorials I referenced in my &lt;a href="https://wbrawner.com/2023/11/11/pico-8-game-development/"&gt;previous post&lt;/a&gt; on PICO-8
game development, I decided I needed to get a little more practice with less
guidance to really learn how to make games on PICO-8. Luckily for me, someone
shared the so-called &lt;a href="https://20_games_challenge.gitlab.io/"&gt;20 Games Challenge&lt;/a&gt; on a Discord …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After looking through the tutorials I referenced in my &lt;a href="https://wbrawner.com/2023/11/11/pico-8-game-development/"&gt;previous post&lt;/a&gt; on PICO-8
game development, I decided I needed to get a little more practice with less
guidance to really learn how to make games on PICO-8. Luckily for me, someone
shared the so-called &lt;a href="https://20_games_challenge.gitlab.io/"&gt;20 Games Challenge&lt;/a&gt; on a Discord server I'm in, which
provides some inspiration for how to build up your skills without spelling
everything out for you. This was exactly what I wanted, a little pointer without
the hand-holding to get me going in the right direction. The &lt;a href="https://20_games_challenge.gitlab.io/challenge/#1"&gt;first challenge&lt;/a&gt;
in the list offers a couple of different options for a simple game to build to
get familiar with the libraries and frameworks you've chosen, along with game
development in general. I chose to build &lt;a href="https://en.wikipedia.org/wiki/Pong"&gt;pong&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/files/pong.html"&gt;&lt;img alt="A PICO-8 cartridge for my implementation of pong" src="https://wbrawner.com/2023/12/27/pong.p8.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My implementation is overly
simple, and not quite fully built, but it's enough for me to feel like I've
learned what I can from this simple example and I'm ready to move on to more
difficult games to build. Next up: &lt;a href="https://en.wikipedia.org/wiki/Breakout_(video_game)"&gt;breakout&lt;/a&gt;.&lt;/p&gt;</content><category term="27"/><category term="pico-8"/><category term="game development"/><category term="game dev"/><category term="gaming"/></entry><entry><title>Compiling Lua on Windows</title><link href="https://wbrawner.com/2023/12/05/compiling-lua-on-windows/" rel="alternate"/><published>2023-12-05T23:10:00-07:00</published><updated>2023-12-05T23:10:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2023-12-05:/2023/12/05/compiling-lua-on-windows/</id><summary type="html">&lt;p&gt;Thanks to PICO-8, I've been writing Lua lately, and I've rather enjoyed it. I'm
particularly interested in it given it's designed to be used as a language
embedded in other projects to enable extensibility. Anyways, I found myself
wanting to use it on my Windows computer, but winget didn't offer …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Thanks to PICO-8, I've been writing Lua lately, and I've rather enjoyed it. I'm
particularly interested in it given it's designed to be used as a language
embedded in other projects to enable extensibility. Anyways, I found myself
wanting to use it on my Windows computer, but winget didn't offer a simple Lua
package I could install like on Linux&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;, so I took a look at how difficult it
would be to get it compiled myself. It turns out it's trivial. The &lt;a href="https://www.lua.org/faq.html#1.2"&gt;Lua FAQ&lt;/a&gt;
page has a pretty good guide for how to do it. I took a look at the book they
referenced, which contains a batch script you can use to build the source
yourself. It references a &lt;code&gt;print.o&lt;/code&gt; file that doesn't exist though, so I had to
modify it to get it to compile &lt;code&gt;luac&lt;/code&gt; correctly:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;cl /MD /O2 /W3 /c /DLUA_BUILD_AS_DLL *.c
&lt;span class="k"&gt;del&lt;/span&gt; *.o
&lt;span class="k"&gt;ren&lt;/span&gt; lua.obj lua.o
&lt;span class="k"&gt;ren&lt;/span&gt; luac.obj luac.o
&lt;span class="k"&gt;ren&lt;/span&gt; print.obj print.o
link /DLL /IMPLIB:lua5.1.lib /OUT:lua5.1.dll *.obj
link /OUT:lua.exe lua.o lua5.1.lib
lib /out:lua5.1-static.lib *.obj
link /OUT:luac.exe luac.o lua5.1-static.lib
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I didn't bother to update the version numbers even though I built Lua 5.4
because I'm not super concerned about it for now, but you could additionally do
that if you so desired.&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;There are some pre-packaged installers that include a bunch of other things I'm not really interested in but I just wanted the interpreter and compiler.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="05"/><category term="lua"/><category term="windows"/></entry><entry><title>Advent of Code</title><link href="https://wbrawner.com/2023/12/03/advent-of-code/" rel="alternate"/><published>2023-12-03T22:59:00-07:00</published><updated>2023-12-03T22:59:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2023-12-03:/2023/12/03/advent-of-code/</id><summary type="html">&lt;p&gt;Last year I learned about the &lt;a href="https://adventofcode.com/"&gt;Advent of Code&lt;/a&gt;, a series of holiday-themed programming challenges that are released similarly to an advent calendar. So, each day at 12am EST, a new challenge is unlocked and you can earn points based on how quickly you solve the challenge. JetBrains offers up …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Last year I learned about the &lt;a href="https://adventofcode.com/"&gt;Advent of Code&lt;/a&gt;, a series of holiday-themed programming challenges that are released similarly to an advent calendar. So, each day at 12am EST, a new challenge is unlocked and you can earn points based on how quickly you solve the challenge. JetBrains offers up prizes&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt; for participants who complete the challenge in Kotlin (or at least they did last year and are doing so again this year), and they have a &lt;a href="https://github.com/kotlin-hands-on/advent-of-code-kotlin-template"&gt;template&lt;/a&gt; you can use to get started with if you'd like to be entered to win one of their prizes. I'm not sure if they actually say what the prizes are, but I'd guess swag and/or licenses to their products. At any rate, I chose to use a variety of different languages &lt;a href="https://github.com/wbrawner/advent-of-code-2022"&gt;last year&lt;/a&gt;, starting with Kotlin but also trying out Python and Rust. I made it about a week in before I tapered off. I can't remember if I just found the challenges too difficult or went on vacation and forgot about it, but this year I'm hoping to make it at least two weeks in. I've also chosen Kotlin for my solutions for &lt;a href="https://github.com/wbrawner/aoc-2023"&gt;this year&lt;/a&gt;, though I don't think I'll branch out to other languages. I think it'll be easier to just stay focused and stick with a language I use every day, which I'm hoping helps me stay motivated to see this thing through, or at the very least make it further than I did last year. If you haven't already checked it out, I highly recommend it. It's a lot of fun and a great way for programmers to celebrate the holidays. Happy coding!&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;&lt;a href="https://blog.jetbrains.com/kotlin/2023/11/advent-of-code-2023-with-kotlin/"&gt;https://blog.jetbrains.com/kotlin/2023/11/advent-of-code-2023-with-kotlin/&lt;/a&gt;&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="03"/><category term="advent of code"/><category term="aoc"/><category term="programming"/></entry><entry><title>PICO-8 Game Development</title><link href="https://wbrawner.com/2023/11/11/pico-8-game-development/" rel="alternate"/><published>2023-11-11T21:47:00-07:00</published><updated>2023-11-11T21:47:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2023-11-11:/2023/11/11/pico-8-game-development/</id><summary type="html">&lt;p&gt;In my &lt;a href="https://wbrawner.com/2023/11/07/retro-gaming/"&gt;previous post&lt;/a&gt;, I mentioned how I recently stumbled upon the &lt;a href="https://www.lexaloffle.com/pico-8.php"&gt;PICO-8&lt;/a&gt;. I
also stumbled upon this &lt;a href="https://www.youtube.com/watch?v=K5RXMuH54iw"&gt;YouTube video&lt;/a&gt; that outlines game development on the
PICO-8, and it captured my curiosity and interest. It turns out that the creator
of the YouTube video put out a &lt;a href="https://mboffin.itch.io/gamedev-with-pico-8-issue1"&gt;72-page zine&lt;/a&gt; full …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In my &lt;a href="https://wbrawner.com/2023/11/07/retro-gaming/"&gt;previous post&lt;/a&gt;, I mentioned how I recently stumbled upon the &lt;a href="https://www.lexaloffle.com/pico-8.php"&gt;PICO-8&lt;/a&gt;. I
also stumbled upon this &lt;a href="https://www.youtube.com/watch?v=K5RXMuH54iw"&gt;YouTube video&lt;/a&gt; that outlines game development on the
PICO-8, and it captured my curiosity and interest. It turns out that the creator
of the YouTube video put out a &lt;a href="https://mboffin.itch.io/gamedev-with-pico-8-issue1"&gt;72-page zine&lt;/a&gt; full of tutorials for the basics
of the editors and commands you can run, along with full tutorials for
developing various games. The first game in the tutorials is called Cave Diver,
which is like a clone of &lt;a href="https://en.wikipedia.org/wiki/Flappy_Bird"&gt;Flappy Bird&lt;/a&gt;. One of the many cool things about PICO-8
is that you can try out the games right here in your browser. So, have a crack
at my implementation of it &lt;a href="https://wbrawner.com/files/cave-diver.html"&gt;right here&lt;/a&gt;! If you have a PICO-8, you can also save
the below cart image to your device and play it natively.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Cave Diver Cart Image" src="https://wbrawner.com/img/cave-diver.p8.png"&gt;&lt;/p&gt;
&lt;p&gt;Thus far I've been thoroughly enjoying game development on the PICO-8. In the
past I've attempted game development with LibGDX due to my familiarity with the
JVM and Android, and more recently with Godot, but for some reason they felt a
bit overwhelming to me. I suppose when I compare my work with typical games I'd
purchase on Steam or the Nintendo Switch, the delta between what I can make and
what I can buy is so great that I feel discouraged. With PICO-8 though, the
constraints imposed by the platform make that delta feel much smaller, and it
inspires me to want to continue. I don't foresee myself sticking with the PICO-8
in the long run as the only platform I develop for, but for now I am looking
forward to continuing the tutorials in the aforementioned zine and then building
a few games of my own!&lt;/p&gt;</content><category term="11"/><category term="pico8"/><category term="pico-8"/><category term="game dev"/><category term="game development"/></entry><entry><title>Retro Gaming</title><link href="https://wbrawner.com/2023/11/07/retro-gaming/" rel="alternate"/><published>2023-11-07T21:37:00-07:00</published><updated>2023-11-07T21:37:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2023-11-07:/2023/11/07/retro-gaming/</id><summary type="html">&lt;p&gt;A few years back I discovered emulation on Android, and was hooked. I thought it
was amazing I could play games from my childhood on modern hardware and have
dozens or hundreds of them without needing to swap cartridges or worry about
filling up my hard drive. Most of the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A few years back I discovered emulation on Android, and was hooked. I thought it
was amazing I could play games from my childhood on modern hardware and have
dozens or hundreds of them without needing to swap cartridges or worry about
filling up my hard drive. Most of the games I was emulating were no newer than
GameBoy Advance games, so file sizes are pretty small.I lost interest for a
little because I found playing these old games on a touch screen just wasn't
quite the same experience. Maybe a year or so ago I picked up a &lt;a href="https://www.gamesir.hk/collections/gamepads/products/gamesir-x2-2021"&gt;GameSir X2&lt;/a&gt; and
I found this definitely improved the experience, but now with more modern
hardware I've been emulating more modern consoles, up to Nintendo Switch&lt;sup id="fnref:1"&gt;&lt;a class="footnote-ref" href="#fn:1"&gt;1&lt;/a&gt;&lt;/sup&gt;,
which has considerably larger file sizes, so I've found myself looking for other
solutions.&lt;/p&gt;
&lt;p&gt;On a recent &lt;a href="https://linuxmatters.sh/12/"&gt;episode of Linux Matters&lt;/a&gt;, the hosts discussed using &lt;a href="http://retrodeck.net/"&gt;RetroDECK&lt;/a&gt; on
the Steam Deck in order to emulate retro consoles. I tried it and I'm completely
hooked! My appreciation for retro games has increased immensely since I can now
play all sorts of games from even before my childhood up to the Switch. In
addition to emulating retro consoles, I stumbled upon &lt;a href="https://www.lexaloffle.com/pico-8.php"&gt;PICO-8&lt;/a&gt;, a so-called
fantasy console&lt;sup id="fnref:2"&gt;&lt;a class="footnote-ref" href="#fn:2"&gt;2&lt;/a&gt;&lt;/sup&gt;. This has peaked my interest even more since the games are
mostly free, and you can view the source code for all of them! Learning game
development is something I've always wanted to do, so I may have found my foot
in the door. Stay tuned for more on this later!&lt;/p&gt;
&lt;div class="footnote"&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id="fn:1"&gt;
&lt;p&gt;I strongly discourage piracy, especially of modern consoles that are
currently for sale. &lt;a href="https://yuzu-emu.org/"&gt;Yuzu&lt;/a&gt; have an &lt;a href="https://yuzu-emu.org/help/quickstart/"&gt;excellent guide&lt;/a&gt; on their website on how
to extract your own games for enjoyment on other systems. I personally do
this to play on my Steam Deck because I mostly play in handheld mode, and
the Steam Deck is simply more comfortable to hold and has a larger screen
than my Switch.&amp;#160;&lt;a class="footnote-backref" href="#fnref:1" title="Jump back to footnote 1 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id="fn:2"&gt;
&lt;p&gt;From the &lt;a href="https://www.lexaloffle.com/pico-8.php?page=faq"&gt;FAQ&lt;/a&gt;: A fantasy console is like a regular console, but without
the inconvenience of  actual hardware.&amp;#160;&lt;a class="footnote-backref" href="#fnref:2" title="Jump back to footnote 2 in the text"&gt;&amp;#8617;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;</content><category term="07"/><category term="retro gaming"/><category term="gaming"/><category term="steam deck"/><category term="retrodeck"/></entry><entry><title>More Blogging</title><link href="https://wbrawner.com/2023/08/15/more-blogging/" rel="alternate"/><published>2023-08-15T14:43:00-06:00</published><updated>2023-08-15T14:43:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2023-08-15:/2023/08/15/more-blogging/</id><summary type="html">&lt;p&gt;As is apparent from the lack of new posts from yours truly over the course of
the past couple of years, I've fallen off the blogging wagon. I still read
others' blogs from time to time but I myself haven't found the time to sit down
and write new posts …&lt;/p&gt;</summary><content type="html">&lt;p&gt;As is apparent from the lack of new posts from yours truly over the course of
the past couple of years, I've fallen off the blogging wagon. I still read
others' blogs from time to time but I myself haven't found the time to sit down
and write new posts. I recently read Scott Hanselman's post entitled
&lt;a href="https://www.hanselman.com/blog/your-words-are-wasted"&gt;Your words are wasted&lt;/a&gt;
and it resonated with me. I'm not a huge social media user (though Mastodon is
my drug of choice for the curious), much less an active poster, but I've
certainly posted more frequently to Mastodon over the past few years than I have
to my own blog. I think part of the reason is that I felt like my blog posts
needed to be high-quality tutorials, with screenshots and sample code to
describe a solution to a problem I've recently faced. While that's certainly a
category I like to blog about, I don't think it necessarily needs to be the only
thing I blog about. I infrequently read John Gruber's blog,
&lt;a href="https://daringfireball.net/"&gt;Daring Fireball&lt;/a&gt;, and one thing I've noticed that
Gruber posts from time to time is simply a link to some other blog post, news
article, video, etc and add his two cents below, calling out particularly
notable snippets in quotes. I think that's something I would traditionally
share on social media, much like Mastodon, though in light of Hanselman's
great arguments, I would like to move such posts here. Ultimately I would just
like to produce more content and own it myself. So here's to more blogging!&lt;/p&gt;</content><category term="Quick Thoughts"/><category term="blogging"/></entry><entry><title>Mirroring My GitHub Repositories</title><link href="https://wbrawner.com/2022/05/30/mirroring-my-github-repositories/" rel="alternate"/><published>2022-05-30T21:26:00-06:00</published><updated>2022-05-30T21:26:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2022-05-30:/2022/05/30/mirroring-my-github-repositories/</id><summary type="html">&lt;p&gt;Once upon a time I distrusted all proprietary code, self-hosted everything (even
my email), and was generally fairly paranoid about the privacy and security of
my data. While I still run a server at home, it's mostly for the convenience of
having a local SMB share and a couple of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Once upon a time I distrusted all proprietary code, self-hosted everything (even
my email), and was generally fairly paranoid about the privacy and security of
my data. While I still run a server at home, it's mostly for the convenience of
having a local SMB share and a couple of test backends for app development. I
now push all of my code to GitHub, where I'm quite confident that it'll be safe
for the foreseeable future. This isn't a guarantee though, as GitHub has to
deal with a myriad of DMCA takedown requests all the time, legitimate or not.
One such case that comes to mind is when &lt;a href="https://www.engadget.com/github-youtube-downloaders-riaa-223558038.html"&gt;youtube-dl was taken down&lt;/a&gt;. To
GitHub's credit, they &lt;a href="https://www.bleepingcomputer.com/news/security/github-restores-popular-python-repo-hit-by-bogus-dmca-takedown/"&gt;reinstated youtube-dl&lt;/a&gt;, and then went as far as to
&lt;a href="https://github.blog/2020-11-16-standing-up-for-developers-youtube-dl-is-back/"&gt;fund a developer defense fund&lt;/a&gt; and &lt;a href="https://github.com/github/dmca"&gt;publicy share all of the DMCA takedown
notices&lt;/a&gt; that they receive. youtube-dl was a pretty high-visibility case
though, with wide coverage from various news outlets. If any of my repos were
to be erroneously taken down, I doubt I'd receive the same support. DMCA
takedown notices aren't the only concern either. &lt;a href="https://techcrunch.com/2017/02/01/gitlab-suffers-major-backup-failure-after-data-deletion-incident/"&gt;GitLab suffered a data loss
event&lt;/a&gt; a couple years back. Accidents happen, I get that. I just don't want
to risk them happening to &lt;em&gt;my&lt;/em&gt; code.&lt;/p&gt;
&lt;p&gt;Experience has taught me that hosts like GitHub and GitLab have far better backup
strategies and maintenance policies than I do though, not to mention teams of
people dedicated to safeguarding the data, so I am no longer interested in
avoiding them completely by running my own git server. I think a fair
compromise is to continue to push my code to GitHub and simply maintain a local
mirror. As such, I wrote a small Python script to do just that:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env python3&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;requests&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;os&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;getcwd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;chdir&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;os.path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;exists&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;subprocess&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt;

&lt;span class="n"&gt;repos&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;https://api.github.com/user/repos?per_page=200&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;repos&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;clone_url&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;dirname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;.git&amp;#39;&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;updating &amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;...&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;git remote update&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cwd&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;cloning &amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;...&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;git clone --mirror &amp;#39;&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It's quite simple, it just queries your repos, then for each one it'll check if
it's already cloned the repo, in which case it'll pull the latest changes,
otherwise it'll clone it for the first time. I'm relying on my &lt;code&gt;~/.netrc&lt;/code&gt; file
for authentication here, and I've set it up on a cron job to run once per hour.&lt;/p&gt;</content><category term="Quick Thoughts"/><category term="python"/><category term="scripting"/></entry><entry><title>xRDP Black Screen Issue</title><link href="https://wbrawner.com/2021/12/24/xrdp-black-screen-issue/" rel="alternate"/><published>2021-12-24T22:27:00-07:00</published><updated>2021-12-24T22:27:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-12-24:/2021/12/24/xrdp-black-screen-issue/</id><summary type="html">&lt;p&gt;Lately I've been doing a lot of work over RDP, even when connecting to Linux machines. In some cases though, I've been met with a black screen instead of the expected desktop environment, particularly when running Kali Linux as a virtual machine on Proxmox. I'm not quite sure why, but …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Lately I've been doing a lot of work over RDP, even when connecting to Linux machines. In some cases though, I've been met with a black screen instead of the expected desktop environment, particularly when running Kali Linux as a virtual machine on Proxmox. I'm not quite sure why, but I was able to solve the problem by installing a couple of additional packages, on top of &lt;code&gt;xrdp&lt;/code&gt; and &lt;code&gt;xrdp-sesman&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;apt&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;xorgxrdp&lt;span class="w"&gt; &lt;/span&gt;xserver-xorg-core&lt;span class="w"&gt; &lt;/span&gt;xserver-xorg-input-all
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I got the idea to install these packages from &lt;a href="https://c-nergy.be/blog/?p=13390"&gt;this article&lt;/a&gt;.&lt;/p&gt;</content><category term="Quick Thoughts"/><category term="linux"/><category term="rdp"/></entry><entry><title>SwiftUI TabView Double Tap Issue</title><link href="https://wbrawner.com/2021/10/13/swiftui-tabview-double-tap-issue/" rel="alternate"/><published>2021-10-13T06:48:00-06:00</published><updated>2021-10-13T06:48:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-10-13:/2021/10/13/swiftui-tabview-double-tap-issue/</id><summary type="html">&lt;p&gt;I recently ran into an issue while building an app with SwiftUI where I had a
&lt;code&gt;TabView&lt;/code&gt; that contained some views that modified their state in an &lt;code&gt;onAppear&lt;/code&gt;
block. I'm still not sure why, but this caused some strange behavior in that
tapping on a tab would immediately return the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I recently ran into an issue while building an app with SwiftUI where I had a
&lt;code&gt;TabView&lt;/code&gt; that contained some views that modified their state in an &lt;code&gt;onAppear&lt;/code&gt;
block. I'm still not sure why, but this caused some strange behavior in that
tapping on a tab would immediately return the user to the previous tab, but
tapping on the tab a second time would load correctly. Searching for solutions
to the problem got me nowhere, but I was able to work around this by making the
state changes outside of the &lt;code&gt;TabView&lt;/code&gt;'s children and passing in the final state
I wanted in the constructors, but this of course didn't scale and tightly
coupled my child views with the &lt;code&gt;TabView&lt;/code&gt;. Just today, I stumbled upon a snippet
of code that gave the &lt;code&gt;TabView&lt;/code&gt; a &lt;code&gt;Binding&lt;/code&gt; variable for the tab selection
instead of letting it manage that state internally, and sure enough that solved
my issue. You just have to tag the child views with the same data type as the
selection variable, like so:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="n"&gt;State&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;tabViewSelection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="n"&gt;TabView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;selection&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;tabViewSelection&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Child&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tabItem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Child&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tabItem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;…&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here's the &lt;a href="https://github.com/wbrawner/twigs-ios/commit/39d227af49ab69a86ae5e8c74c16b2ac4fcce3b0"&gt;git commit&lt;/a&gt; in my own project where I fixed the issue. If you know
of a better way to handle this, please &lt;a href="mailto:me@wbrawner.com"&gt;let me know&lt;/a&gt;!&lt;/p&gt;</content><category term="Development"/><category term="SwiftUI"/><category term="TabView"/><category term="Swift"/><category term="iOS"/><category term="MacOS"/></entry><entry><title>Adding New WireGuard Clients</title><link href="https://wbrawner.com/2021/09/20/adding-new-wireguard-clients/" rel="alternate"/><published>2021-09-20T17:38:00-06:00</published><updated>2021-09-20T17:38:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-09-20:/2021/09/20/adding-new-wireguard-clients/</id><summary type="html">&lt;p&gt;I like to run a few things from home, like a Nextcloud server and a Bitwarden
server, for example. I also like for my home infrastructure to be secure though,
so I don't allow access to these services from outside of my LAN. This can be a
problem if I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I like to run a few things from home, like a Nextcloud server and a Bitwarden
server, for example. I also like for my home infrastructure to be secure though,
so I don't allow access to these services from outside of my LAN. This can be a
problem if I need something from one of my self-hosted services and am away from
home, however, so in order to provide myself with secure access, I've got a
WireGuard server running, which serves as the sole point of entry to my LAN from
the outside world. This works great, except I can never remember quite how to
grant additional clients access to my WireGuard server, seeing as it's not
exactly something I do everyday. As such, this seemed like just the thing to
automate away with a script so that I only need to remember a single command in
the future. The script assumes a configuration directory as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;wireguard&lt;/span&gt;
&lt;span class="err"&gt;├──&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;wg0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt;
&lt;span class="err"&gt;└──&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;clients&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="err"&gt;├──&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;client0&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="err"&gt;└──&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;client1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;conf&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Below is the script, though note that you'll need to modify lines 22 and 24 to
use the correct information for your WireGuard server.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env python3&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;subprocess&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;PIPE&lt;/span&gt;

&lt;span class="c1"&gt;# 10.0.0.1 is the server, so we want num clients + 2 to get an available IP&lt;/span&gt;
&lt;span class="c1"&gt;# address&lt;/span&gt;
&lt;span class="n"&gt;clients&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;listdir&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;clients&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;

&lt;span class="n"&gt;client_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Enter a name for the new client: &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;client_conf_file&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;clients&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&lt;/span&gt;&lt;span class="si"&gt;{}&lt;/span&gt;&lt;span class="s1"&gt;.conf&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="n"&gt;private_key_result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;wg&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;genkey&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PIPE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PIPE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;private_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;private_key_result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;client_config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;&amp;#39;&amp;#39;[Interface] # &lt;/span&gt;&lt;span class="si"&gt;{client_name}&lt;/span&gt;
&lt;span class="s1"&gt;PrivateKey = &lt;/span&gt;&lt;span class="si"&gt;{private_key}&lt;/span&gt;
&lt;span class="s1"&gt;Address = 10.0.0.&lt;/span&gt;&lt;span class="si"&gt;{clients}&lt;/span&gt;&lt;span class="s1"&gt;/24&lt;/span&gt;
&lt;span class="s1"&gt;#DNS = 192.168.86.48 # Uncomment this line to use your own DNS server&lt;/span&gt;

&lt;span class="s1"&gt;[Peer]&lt;/span&gt;
&lt;span class="s1"&gt;PublicKey = # Add your WireGuard server&amp;#39;s public key here&lt;/span&gt;
&lt;span class="s1"&gt;AllowedIPs = 0.0.0.0/0&lt;/span&gt;
&lt;span class="s1"&gt;Endpoint = # Add your WireGuard server&amp;#39;s public IP address and port here&lt;/span&gt;

&lt;span class="s1"&gt;&amp;#39;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;client_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;private_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;private_key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;clients&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_conf_file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;w+&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Scan the following barcode with your phone to import the client config:&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;qrencode&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;-t&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;ansiutf8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;-r&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;client_conf_file&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PIPE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PIPE&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf=8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;Alternatively, you can enter the config manually using this file:&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;public_key_result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;wg&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;pubkey&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;private_key_result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PIPE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;stderr&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;PIPE&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;public_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;public_key_result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stdout&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;utf-8&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;wg0.conf&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;a&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;conf&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;#39;&amp;#39;[Peer] # &lt;/span&gt;&lt;span class="si"&gt;{client_name}&lt;/span&gt;
&lt;span class="s1"&gt;PublicKey = &lt;/span&gt;&lt;span class="si"&gt;{public_key}&lt;/span&gt;
&lt;span class="s1"&gt;AllowedIPs = 10.0.0.&lt;/span&gt;&lt;span class="si"&gt;{clients}&lt;/span&gt;&lt;span class="s1"&gt;/32&lt;/span&gt;

&lt;span class="s1"&gt;&amp;#39;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;client_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;client_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;public_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;public_key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;clients&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;clients&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In addition to automatically creating the client config and appending the
corresponding info to the server's config, line 33 will also print out a QR
code to easily import the config into a mobile app, and line 40 will print the
config if you prefer to just copy/paste the data into the app. Line 28 will
persist the client config to disk for later retrieval, so if you don't want that
be sure to delete it. Hope that helps, and please reach out if you have
suggestions on how to improve it!&lt;/p&gt;</content><category term="20"/><category term="wireguard"/><category term="python"/><category term="automation"/></entry><entry><title>Goodbye, Podcasts</title><link href="https://wbrawner.com/2021/09/16/goodbye-podcasts/" rel="alternate"/><published>2021-09-16T13:03:00-06:00</published><updated>2021-09-16T13:03:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-09-16:/2021/09/16/goodbye-podcasts/</id><summary type="html">&lt;p&gt;Our time in life is very much finite, and our free time even more so, making
the decision for how to spend it nontrivial. It is with this in mind that I
have come to the conclusion that I’d like to stop listening to podcasts.
Between the direction the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Our time in life is very much finite, and our free time even more so, making
the decision for how to spend it nontrivial. It is with this in mind that I
have come to the conclusion that I’d like to stop listening to podcasts.
Between the direction the industry is heading in, my personal choice in
podcasts, and the alternatives out there to listening to podcasts, I feel my
time would be better spent elsewhere. Here are my thoughts on the matter.&lt;/p&gt;
&lt;p&gt;Looking back at the last couple of years in the podcasting industry, there are
some worrying trends. A startup called &lt;a href="https://www.theverge.com/2019/4/22/18510897/luminary-podcast-app-launch-the-daily-gimlet-media-spotify"&gt;Luminary came onto the
scene&lt;/a&gt;
offering original podcasts that are only accessible via a paid subscription to
their service. That same article references Spotify’s acquisition of several
podcast-related business, namely &lt;a href="https://investors.spotify.com/financials/press-release-details/2019/Spotify-Announces-Strategic-Acquisitions-to-Accelerate-Growth-in-Podcasting/default.aspx"&gt;Gimlet and
Anchor&lt;/a&gt;.
This was all back in 2019 though, and little had happened in the intervening
years (though the pandemic likely had something to do with that.) Earlier this
year, however, Apple announced that they too will &lt;a href="https://www.apple.com/newsroom/2021/04/apple-leads-the-next-chapter-of-podcasting-with-apple-podcasts-subscriptions/"&gt;begin offering podcasts
subscriptions&lt;/a&gt;,
though as far as I know they don’t offer any exclusive podcasts. &lt;a href="https://www.macrumors.com/2020/05/21/apple-exclusive-original-podcast-content/"&gt;Not yet, at
least&lt;/a&gt;.
The existence of Apple Arcade tells me that exclusive podcasts are likely soon
to follow. This is a far-cry from the historically open, RSS-driven podcasting
ecosystem I was welcomed with, and I unfortunately believe it’s only the
beginning. It would seem that Big Tech and venture capitalist money have
decided that podcasting is a largely untapped oil well that can’t continue to
be ignored. What do they have to gain from this? I’d guess targeted advertising
and yet another monthly subscription offering. Count me out. Luckily for me,
the types of podcasts I usually listen to are more independent, less produced,
and thus less likely to end up on some exclusive platform like these. After
all, blogging isn’t (yet) locked behind a small set of companies with
exclusivity and subscription fees, so perhaps there’s still hope for some
shows. The shows I tend to follow do tend to cause me other issues though.&lt;/p&gt;
&lt;p&gt;In an effort to avoid slandering them, I won’t name-drop any of the shows I
listen to. After all, you could easily argue that my next reasons for dropping
podcasts from my mental inventory of things to do are completely intrinsic and
have little-to-nothing to do with the podcasts themselves. I’ll vaguely
describe them though. Pretty much all of them are related to tech, though not
developer-focused podcasts like you might expect from reading the rest of my
blog. No, I tend to gravitate towards more consumer tech podcasts, the type of
podcasts that talk about the latest gadgets and news about the companies
creating them. The problem I have with these shows is that they promote
consumerism by constantly shoving the newest gadgets in your face, combined
with an unrelenting flow of “deals” to help you blow your money on expensive
tech that’s only marginally better than the stuff from last year or even the
year before. There’s certainly plenty of interesting information to be gleaned
from these podcasts as well, in their defense, but I think these types of shows
are best listened to for a couple of episodes at most every couple of years or
so, just to catch up on the current yay-or-nay’s of the tech world. Consistent
listening, as I have done, has only led me to be constantly discontent with
tech that is perfectly fine and functional, and waste hundreds of dollars in
the process. Instead of filling my head with the reviews of tech I’ll never own
or care about, I’ve found that there are other, better alternatives for me to
listen to.&lt;/p&gt;
&lt;p&gt;Going cold turkey on a habit you’d like to break without replacing it with
another is a recipe for failure. I almost always listen to podcasts while
driving or doing chores, so for these times, I’ve recently started listening to
audiobooks instead. While neither as free nor as open as podcasts, audiobooks
offer me far more meaningful content. I tend to gravitate towards psychology-,
leadership-, or computer science-related titles. I just finished listening to
&lt;a href="https://www.amazon.com/Subtle-Art-Not-Giving-Counterintuitive/dp/B01I29Y344/ref=tmm_aud_swatch_0?_encoding=UTF8&amp;amp;qid=&amp;amp;sr="&gt;The Subtle Art of Not Giving a F*ck&lt;/a&gt;,
by Mark Manson. I really enjoyed it (and recommend it if you haven’t
read/listened to it already), and feel like I got a lot more out of it than I
otherwise would have from the 5 or so consumer tech podcast episodes I would’ve
had to listen to in order to occupy the same amount of time. I signed up for a
monthly Audible subscription, so while I’m paying for the content instead of
getting it for free, I no longer have to deal with advertisements, and if for
whatever reason I decided I didn’t want to pay anymore but still wanted to keep
my books, there’s always &lt;a href="https://openaudible.org/"&gt;OpenAudible&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I’m not sure if this change will be permanent, or forever remain as extreme,
I’m content with the choice. There’s already an existing business model around
audiobooks, so I’m not too concerned about the future of them. I get better
content that’s likely had more preparation and research put into it, and is far
less likely to provoke consumeristic urges in me. The best part is, audiobooks
fill the hole in my routine that podcasts used to occupy, so I’m fairly
confident in believing that this change will last. Here’s to hoping that it’ll
be a change for the better.&lt;/p&gt;</content><category term="16"/><category term="podcasts"/><category term="entertainment"/><category term="audiobooks"/></entry><entry><title>Skerge</title><link href="https://wbrawner.com/2021/07/08/skerge/" rel="alternate"/><published>2021-07-08T11:53:00-06:00</published><updated>2021-07-08T11:53:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-07-08:/2021/07/08/skerge/</id><summary type="html">&lt;p&gt;I have an HP printer/scanner at home that my wife and I use surprisingly often,
certainly more often than we might think. For the most part it works just fine
and it gets the job done, but I do have a couple of complaints about it.  One
of the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have an HP printer/scanner at home that my wife and I use surprisingly often,
certainly more often than we might think. For the most part it works just fine
and it gets the job done, but I do have a couple of complaints about it.  One
of the bigger ones is that when scanning multiple pages of a single document, I
get one PDF per page and have no way of simply scanning in multiple pages to a
single file. I also have to use some ugly web interface that’s not very
accessible from my phone. In order to solve these problems, I made a small
Android app that would allow me to scan multiple pages and then share them as a
single PDF. Most of the time I want the scanned documents on my phone anyways
so that I can send them to someone via email or WhatsApp so it works out quite
nicely. I’ve tentatively called it Skerge (scan + merge + a "K" for Kotlin).
Here are some screenshots of the app in action:&lt;/p&gt;
&lt;p&gt;&lt;img alt="The main view of Skerge upon opening the app" src="https://wbrawner.com/img/skerge/main.png"&gt;&lt;/p&gt;
&lt;p&gt;Upon opening the app, you’re presented with a simple view with instructions on how to use the app.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A a pending scan in progress" src="https://wbrawner.com/img/skerge/scanning.png"&gt;&lt;/p&gt;
&lt;p&gt;Once you tap the “+” button, the app requests a scan from the printer, and waits for it to complete.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A preview of the scanned document" src="https://wbrawner.com/img/skerge/preview.png"&gt;&lt;/p&gt;
&lt;p&gt;When the scan is complete, a preview of the scanned image is displayed.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A second page of the document scan in progress" src="https://wbrawner.com/img/skerge/additional_scan.png"&gt;&lt;/p&gt;
&lt;p&gt;You can repeat the process multiple times to scan in additional pages.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Sharing the scanned document" src="https://wbrawner.com/img/skerge/share.png"&gt;&lt;/p&gt;
&lt;p&gt;When you’re finished scanning, you can tap the share button to merge the PDFs
from the scanner into a single file and send to your app of choice.&lt;/p&gt;
&lt;p&gt;There are still some issues and things to polish but for now at least it’s
working and making it much easier for me to scan documents and send them off.&lt;/p&gt;
&lt;h2&gt;Additional Notes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;I know HP has several apps for scanning, some of which might allow you to do this very thing. For some reason beyond me, however, they require you to create an account to use their apps. I’d like to not give away my data to companies that don’t need it.&lt;/li&gt;
&lt;li&gt;I haven’t yet implemented error dialogs, so if anything goes wrong, there’s a one minute timeout, after which the page is automatically removed.&lt;/li&gt;
&lt;li&gt;There’s no way to remove or reorder pages yet, so if you scan out of order or upside down or whatever, you have to start over.&lt;/li&gt;
&lt;li&gt;I’m still not sure why, but for some reason the merged PDF files are several times larger than they should be, based on the size of an individual scan. There also seems to be some quality loss. I’m sure there’s something I’m doing incorrectly with the merge, but I haven’t yet figured it out. This first edition doesn’t use any third-party libraries for the PDF interactions, only the built-in Android libraries, so I may need to look around for something a little more robust (and simpler to use).&lt;/li&gt;
&lt;li&gt;The entire codebase is written in Jetpack Compose 🚀&lt;/li&gt;
&lt;li&gt;I was able to reverse engineer the networking calls made by the web app to figure out the requests I would need to make in order to get the app to talk to the scanner. Once I knew what requests I needed to make, it was just a matter of trial and error to get the app to work.&lt;/li&gt;
&lt;li&gt;I actually did write a couple of tests, mostly for parsing/serializing the XML needed to talk to the printer, but also to ensure I was extracting the correct data from the headers in the responses.&lt;/li&gt;
&lt;li&gt;My home printer’s hostname is hard-coded for now, so if you’d like to contribute a fix to make that editable, that would be cool 😎&lt;/li&gt;
&lt;li&gt;I have no design skills whatsoever, so if you’d like to contribute an icon for the app, that would also be much appreciated 🙌&lt;/li&gt;
&lt;li&gt;I’m not planning on publishing the app to Google Play at this time since it’s far too niche and I don’t want to deal with the negative reviews like “it doesn’t work with my printer”. The code is up on &lt;a href="https://github.com/wbrawner/skerge"&gt;GitHub&lt;/a&gt; though, so feel free to check it out, use it if you also have an HP Envy 5000-series printer, or contribute fixes/support for your scanner!&lt;/li&gt;
&lt;/ul&gt;</content><category term="Projects"/><category term="Android"/><category term="Jetpack Compose"/><category term="Kotlin"/></entry><entry><title>SSH Server on Windows 10</title><link href="https://wbrawner.com/2021/07/07/ssh-server-on-windows-10/" rel="alternate"/><published>2021-07-07T11:47:00-06:00</published><updated>2021-07-07T11:47:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-07-07:/2021/07/07/ssh-server-on-windows-10/</id><summary type="html">&lt;p&gt;Unfortunately, getting an SSH server up and running on Windows 10 isn’t quite
as easy as it is on a Linux box. Fortunately for you, I’ve done a bit of
digging to figure it out and then write up a quick blog post on it. If you use …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Unfortunately, getting an SSH server up and running on Windows 10 isn’t quite
as easy as it is on a Linux box. Fortunately for you, I’ve done a bit of
digging to figure it out and then write up a quick blog post on it. If you use
your favorite search engine to try to find information on it, you’ll probably
come across this &lt;a href="https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse"&gt;Microsoft Docs&lt;/a&gt; page, that appears to have sound instructions
on how to get it up and running. In my experience, this not only doesn’t work
but also installs a super old version of the Win32-OpenSSH server. What you
&lt;em&gt;actually&lt;/em&gt; want to do, is grab the latest release from the
PowerShell/Win32-OpenSSH GitHub page, and then follow the
[installation instructions] from their wiki. I won’t copy/paste them here in
case they change, but I will throw in an additional tip. If you follow the
instructions and then look at &lt;code&gt;C:\Program Files\OpenSSH\sshd_config_default&lt;/code&gt;,
you’ll notice that the last few lines look something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Match Group administrators AuthorizedKeysFile
    __PROGRAMDATA__/ssh/administrators_authorized_keys
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you see this, and you want to be able to authenticate to your machine with
SSH keys instead of entering your password every time, you’ll need to place
your authorized keys file at &lt;code&gt;C:\ProgramData\ssh\administrators_authorized_keys&lt;/code&gt;
instead of the usual &lt;code&gt;$home\.ssh\authorized_keys&lt;/code&gt;. This seemed kind of strange
to me but it seems that the choice was made to &lt;a href="https://github.com/PowerShell/Win32-OpenSSH/issues/1324"&gt;avoid a local privilege escalation exploit&lt;/a&gt;.
Don’t forget to fix the permissions on the file afterwards, and also make sure
the file name is correct. If you create the file with notepad, it’ll probably
append a &lt;code&gt;.txt&lt;/code&gt; extension to it that you don’t want.&lt;/p&gt;</content><category term="07"/><category term="ssh"/><category term="Windows 10"/><category term="tips"/></entry><entry><title>Back to WordPress</title><link href="https://wbrawner.com/2021/06/25/back-to-wordpress/" rel="alternate"/><published>2021-06-25T11:40:00-06:00</published><updated>2021-06-25T11:40:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-06-25:/2021/06/25/back-to-wordpress/</id><summary type="html">&lt;p&gt;As you can see from the horrendous design of my site, I’m back on WordPress! The
horrendous design is my own fault, and I’ll get around to fixing it when I find
the time/motivation to do so, but I wanted to get back to WordPress sooner
rather …&lt;/p&gt;</summary><content type="html">&lt;p&gt;As you can see from the horrendous design of my site, I’m back on WordPress! The
horrendous design is my own fault, and I’ll get around to fixing it when I find
the time/motivation to do so, but I wanted to get back to WordPress sooner
rather than later so I decided to just put up with it for now. I’ve written
about the various blogging platforms I’ve used in the past and why I preferred
static site generators over CMSs like WordPress, but at the end of the day I
find that for me personally, managing a static site ends up feeling a lot like
work and not like blogging, as I can’t resist the urge to tinker with them and
thus spend more time playing around with the site and the generator than I spend
blogging. That pretty much defeats the purpose so I’ve come back to WordPress in
an effort to streamline the writing and publishing process and actually put a
bit of a barrier between myself and the code, so that it’s less tempting to mess
with my site and more encouraging to just write for it. Time will tell if this
strategy pans out for me!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update 2021-09:&lt;/em&gt; I've gone back and forth between WordPress and static site
generators, but ultimately I've come back to static sites because they're much
easier to maintain as far as security goes (no updates to apply, no brute-force
attacks to prevent, etc), and I don't have to use a stupid web interface just to
write content for my site. I'm not a huge fan of web interfaces so if I can
avoid them, I will. I'll keep my terminal, thank you.&lt;/p&gt;</content><category term="25"/><category term="blogging"/></entry><entry><title>Reducing the Memory Usage for my Spring Boot App</title><link href="https://wbrawner.com/2021/06/20/reducing-the-memory-usage-for-my-spring-boot-app/" rel="alternate"/><published>2021-06-20T08:55:00-06:00</published><updated>2021-06-20T08:55:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2021-06-20:/2021/06/20/reducing-the-memory-usage-for-my-spring-boot-app/</id><summary type="html">&lt;p&gt;For a couple of years now, I've been working on a self-hosted family budgeting
application called &lt;a href="https://github.com/wbrawner/twigs-server"&gt;Twigs&lt;/a&gt;.
Seeing as I'm an Android developer, I spend most of my days writing Java and
Kotlin. Thus, it seemed like a good idea to stick with the languages I'm most
comfortable with for …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For a couple of years now, I've been working on a self-hosted family budgeting
application called &lt;a href="https://github.com/wbrawner/twigs-server"&gt;Twigs&lt;/a&gt;.
Seeing as I'm an Android developer, I spend most of my days writing Java and
Kotlin. Thus, it seemed like a good idea to stick with the languages I'm most
comfortable with for my backend solution. After doing a little research, it
seemed to me like Spring Boot was quite popular, so I figured I'd also be doing
myself a favor by learning something I could possibly apply on the job someday.
Unfortunately, my simple app frequently occupies around 500MB of RAM on my
small VPS with only 2GB of RAM total, and it's not the only server I have
running there, so I've been quite discontent with this. I have been
considering rewriting the backend in Go or Rust to reduce the memory footprint
of the app, but even for such a small application, that's no small feat. In an
effort to save myself some time and energy rewriting the whole thing, I've been
looking around for ways to reduce the memory consumption of this app. Much to
my surprise I found quite a simple solution that had a massive impact. Here was
my &lt;code&gt;Dockerfile&lt;/code&gt; before, where the app would frequently idle at around 500MB of
RAM usage:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;openjdk:14-jdk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;builder&lt;/span&gt;
&lt;span class="k"&gt;MAINTAINER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;William Brawner &amp;lt;me@wbrawner.com&amp;gt;&lt;/span&gt;

&lt;span class="k"&gt;RUN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;groupadd&lt;span class="w"&gt; &lt;/span&gt;--system&lt;span class="w"&gt; &lt;/span&gt;--gid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;gradle&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;useradd&lt;span class="w"&gt; &lt;/span&gt;--system&lt;span class="w"&gt; &lt;/span&gt;--gid&lt;span class="w"&gt; &lt;/span&gt;gradle&lt;span class="w"&gt; &lt;/span&gt;--uid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--shell&lt;span class="w"&gt; &lt;/span&gt;/bin/bash&lt;span class="w"&gt; &lt;/span&gt;--create-home&lt;span class="w"&gt; &lt;/span&gt;gradle

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--chown&lt;span class="o"&gt;=&lt;/span&gt;gradle:gradle&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;/home/gradle/src
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/home/gradle/src&lt;/span&gt;
&lt;span class="k"&gt;RUN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/home/gradle/src/gradlew&lt;span class="w"&gt; &lt;/span&gt;--console&lt;span class="o"&gt;=&lt;/span&gt;plain&lt;span class="w"&gt; &lt;/span&gt;--no-daemon&lt;span class="w"&gt; &lt;/span&gt;bootJar

&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;openjdk:14-jdk-slim&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;8080&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--from&lt;span class="o"&gt;=&lt;/span&gt;builder&lt;span class="w"&gt; &lt;/span&gt;/home/gradle/src/api/build/libs/api.jar&lt;span class="w"&gt; &lt;/span&gt;twigs-api.jar
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/usr/local/openjdk-14/bin/java&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$JVM_ARGS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-jar&lt;span class="w"&gt; &lt;/span&gt;/twigs-api.jar
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Here's the updated &lt;code&gt;Dockerfile&lt;/code&gt; for the same app with &lt;em&gt;much&lt;/em&gt; less memory usage:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;openjdk:14-jdk&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;builder&lt;/span&gt;
&lt;span class="k"&gt;MAINTAINER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;William Brawner &amp;lt;me@wbrawner.com&amp;gt;&lt;/span&gt;

&lt;span class="k"&gt;RUN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;groupadd&lt;span class="w"&gt; &lt;/span&gt;--system&lt;span class="w"&gt; &lt;/span&gt;--gid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;gradle&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;useradd&lt;span class="w"&gt; &lt;/span&gt;--system&lt;span class="w"&gt; &lt;/span&gt;--gid&lt;span class="w"&gt; &lt;/span&gt;gradle&lt;span class="w"&gt; &lt;/span&gt;--uid&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1000&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--shell&lt;span class="w"&gt; &lt;/span&gt;/bin/bash&lt;span class="w"&gt; &lt;/span&gt;--create-home&lt;span class="w"&gt; &lt;/span&gt;gradle

&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--chown&lt;span class="o"&gt;=&lt;/span&gt;gradle:gradle&lt;span class="w"&gt; &lt;/span&gt;.&lt;span class="w"&gt; &lt;/span&gt;/home/gradle/src
&lt;span class="k"&gt;WORKDIR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;/home/gradle/src&lt;/span&gt;
&lt;span class="k"&gt;RUN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/home/gradle/src/gradlew&lt;span class="w"&gt; &lt;/span&gt;--console&lt;span class="o"&gt;=&lt;/span&gt;plain&lt;span class="w"&gt; &lt;/span&gt;--no-daemon&lt;span class="w"&gt; &lt;/span&gt;bootJar

&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;adoptopenjdk:openj9&lt;/span&gt;
&lt;span class="k"&gt;EXPOSE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;8080&lt;/span&gt;
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--from&lt;span class="o"&gt;=&lt;/span&gt;builder&lt;span class="w"&gt; &lt;/span&gt;/home/gradle/src/api/build/libs/api.jar&lt;span class="w"&gt; &lt;/span&gt;twigs-api.jar
&lt;span class="k"&gt;CMD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/opt/java/openjdk/bin/java&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$JVM_ARGS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-jar&lt;span class="w"&gt; &lt;/span&gt;/twigs-api.jar
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The change might be easy to miss, so here's the breakdown: I have two
containers involved in the build process: the first takes in the source code
and compiles it into a JAR file, then the second container copies that JAR file
out and simply executes it. The change I made to reduce the memory was simply
going from OpenJDK to OpenJ9, which brought my memory usage down from around
500MB while idle to around 150MB idle. While that's still a bit more than I'd
like for a super simple app, it's little enough that I can stop worrying about
it for the time being. I've had this running for a few days now without any
noticeable side-effects, so I'm hoping this will be a long-term solution for
me. Should anything come up though, I'll be sure to write a follow-up post in
the future.&lt;/p&gt;</content><category term="Tutorials"/><category term="spring boot"/><category term="jvm"/><category term="docker"/><category term="java"/></entry><entry><title>Writing Essays in Vim</title><link href="https://wbrawner.com/2020/12/15/writing-essays-in-vim/" rel="alternate"/><published>2020-12-15T12:07:00-07:00</published><updated>2020-12-15T12:07:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2020-12-15:/2020/12/15/writing-essays-in-vim/</id><summary type="html">&lt;p&gt;This month I went back to school, so I now find myself needing to write essays once again. It's been quite a few years since I last had to do homework like this, and I now find word processors to be rather clunky and inefficient compared to just using vim …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This month I went back to school, so I now find myself needing to write essays once again. It's been quite a few years since I last had to do homework like this, and I now find word processors to be rather clunky and inefficient compared to just using vim. The only thing I needed was to know how many words I had written to see if I had fulfilled the requirements yet. While I could have just used the &lt;code&gt;wc&lt;/code&gt; command, I did a little searching and it turns out that vim has word counting capabilities built in. Pressing &lt;code&gt;g&lt;/code&gt; followed by &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;G&lt;/code&gt; will show you a quick summary of your position in the document you're writing. Doing so on the file for this post for example looks something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Col 4 of 4; Line 11 of 11; Word 154 of 154; Byte 863 of 864
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note: You'll need to be in Normal mode (not Insert mode) for this to work.&lt;/p&gt;</content><category term="Tips &amp; Tricks"/><category term="writing"/><category term="vim"/><category term="tips"/></entry><entry><title>KringleCon</title><link href="https://wbrawner.com/2020/12/10/kringlecon/" rel="alternate"/><published>2020-12-10T17:55:00-07:00</published><updated>2020-12-10T17:55:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2020-12-10:/2020/12/10/kringlecon/</id><summary type="html">&lt;p&gt;This year I was tipped off to the &lt;a href="https://holidayhackchallenge.com/2020/"&gt;SANS Holiday Hack Challenge&lt;/a&gt; and holy smokes this is awesome. I just started earlier today and I've already made my way through a handful of objectives and learned a few new things. I highly recommend checking it out if you're interested in …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This year I was tipped off to the &lt;a href="https://holidayhackchallenge.com/2020/"&gt;SANS Holiday Hack Challenge&lt;/a&gt; and holy smokes this is awesome. I just started earlier today and I've already made my way through a handful of objectives and learned a few new things. I highly recommend checking it out if you're interested in cybersecurity, as it seems to be an excellent resource for beginners up to professionals. If you decide to jump in on it in the next couple of weeks, ping me on Discord (@wbrawner) and I'd be happy to help or work together on some of the challenges. Happy hacking!&lt;/p&gt;</content><category term="Updates"/><category term="infosec"/><category term="security"/></entry><entry><title>Dark Mode Aware Live Wallpaper</title><link href="https://wbrawner.com/2020/11/17/dark-mode-aware-live-wallpaper/" rel="alternate"/><published>2020-11-17T08:56:00-07:00</published><updated>2020-11-17T08:56:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2020-11-17:/2020/11/17/dark-mode-aware-live-wallpaper/</id><summary type="html">&lt;p&gt;Recently I’ve been playing around with an iOS device, and one of the things I found I really liked was the ability to set a wallpaper that would change depending on whether or not the device had dark mode enabled.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A screenshot from an iPhone showing some wallpaper options that change depending on whether or not dark mode is enabled." src="https://wbrawner.com/img/still-473x1024.jpg"&gt;&lt;/p&gt;
&lt;p&gt;I use a Pixel phone though, so this doesn …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently I’ve been playing around with an iOS device, and one of the things I found I really liked was the ability to set a wallpaper that would change depending on whether or not the device had dark mode enabled.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A screenshot from an iPhone showing some wallpaper options that change depending on whether or not dark mode is enabled." src="https://wbrawner.com/img/still-473x1024.jpg"&gt;&lt;/p&gt;
&lt;p&gt;I use a Pixel phone though, so this doesn’t help me very much. While Android has had the concept of live wallpapers since &lt;a href="https://android-developers.googleblog.com/2010/02/live-wallpapers.html"&gt;Android 2.1&lt;/a&gt; and a system-wide dark theme since &lt;a href="https://developer.android.com/guide/topics/ui/look-and-feel/darktheme"&gt;Android 10&lt;/a&gt;, I’m not aware of any apps that take advantage of dark mode like this to adapt the wallpaper accordingly (I’d be happy to be shown a few though!) I thought it might be fun to build out a simple app that does just this, so I’ve begun work on it as of today. This is of course a super early preview of what I’ve put together so far, but as you can see from the screenshots, I’ve been able to adapt the wallpaper color based on whether or not dark mode is enabled.&lt;/p&gt;
&lt;video autoplay="" loop="" muted="" src="https://wbrawner.com/img/materialive.mp4"&gt;&lt;/video&gt;

&lt;p&gt;Stay tuned for more news on this front!&lt;/p&gt;</content><category term="Projects &amp; Experiments"/><category term="Android"/></entry><entry><title>Cross Platform Apps The Hard Way - Part 3: Surrender</title><link href="https://wbrawner.com/2020/09/13/cross-platform-apps-the-hard-way-part-3-surrender/" rel="alternate"/><published>2020-09-13T16:09:00-06:00</published><updated>2020-09-13T16:09:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2020-09-13:/2020/09/13/cross-platform-apps-the-hard-way-part-3-surrender/</id><summary type="html">&lt;p&gt;I've been debating on whether or not to write this post for a few months now but I think it's time. I've decided to put the cross-platform apps with C development series on hold indefinitely. This year has of course been crazy with the covid-19 quarantine and social justice movements …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been debating on whether or not to write this post for a few months now but I think it's time. I've decided to put the cross-platform apps with C development series on hold indefinitely. This year has of course been crazy with the covid-19 quarantine and social justice movements, but I also moved to a different country with my wife and we have a new addition to the family! In light of all of this, I've had my priorities shift quite a bit, and with my reduced time and desire to work on this, I don't see it coming to the close I had imagined when I started. I'll give a quick rundown of what little progress I had made before closing this chapter however.&lt;/p&gt;
&lt;p&gt;I decided to use my &lt;a href="/2020/01/11/pihelper-a-native-companion-app-for-your-pi-hole/"&gt;Pi-helper&lt;/a&gt; app as a guinea pig of sorts since it's a fairly simple app to begin with. It takes in a server URL and password, saves them to disk, and then reads them to make network requests for a small set of predefined actions with little variability between each action. I originally wrote this app as a native app for both Android and iOS (you can read the details in the blog post I linked to above), so I have two different codebases to maintain now: one in Swift and one in Kotlin. As a result, I end up having to make any new changes twice: once in Swift and again in Kotlin. I thought it would be a lot easier to just share the logic for storing the connection details and making the network requests in C, so then I'd only have to worry about the UI and navigation for each platform in its native language. I started off by writing a &lt;a href="https://github.com/wbrawner/pihelper"&gt;C library with a simple command line interface&lt;/a&gt;, which allowed me to iterate on it quickly from my desktop. That ended up being quite helpful in the long run. With that in place, I actually did get a working implementation of this on Android, which you can see in the &lt;a href="https://github.com/wbrawner/pihelper-android/tree/libpihelper"&gt;libpihelper branch of the project&lt;/a&gt;. The hardest part wasn't getting my code to compile but actually getting the handful of dependencies I needed (curl, openssl, and json-c) to compile for the most popular Android architectures. I had to do a lot of digging around to find people who had worked on scripting the build process for curl and openssl, and while I regrettably don't have the sources to properly attribute those scripts that helped guide me to getting a working solution, I have the &lt;a href="https://github.com/wbrawner/pihelper/blob/master/scripts/build-android"&gt;script I ended up with&lt;/a&gt; in case it's useful to anyone else.&lt;/p&gt;
&lt;p&gt;Getting the code to compile on iOS was a different story though. I ran into lots of issues with signing the code to be able to package it up as a convenient library I could include in the &lt;a href="https://github.com/wbrawner/pihelper-ios"&gt;main project&lt;/a&gt;. I'm admittedly not very knowledgeable about Xcode nor its build process so I found this considerably more difficult than getting it to work on Android. Ultimately this is where I drew the line on how much time it was worth to invest in making it work. Perhaps if I had more time and energy to continue on this or if I had someone who was more knowledgable with iOS to assist me with the compilation of the library for iOS, I could have pulled through and wrapped it up, and I may finish that someday on my own, but for now I have other things to worry about.&lt;/p&gt;
&lt;p&gt;I may have been a bit over-ambitious and perhaps even arrogant in the face of both &lt;a href="https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a"&gt;Airbnb&lt;/a&gt; and &lt;a href="https://dropbox.tech/mobile/the-not-so-hidden-cost-of-sharing-code-between-ios-and-android"&gt;Dropbox&lt;/a&gt; giving up on their respective cross-platform code sharing solutions, but I thought it would be fun to try something a little different. I think I ran into a lot of issues for quite a simple app, and trying to build anything more complex would have likely been a nightmare. Ultimately, I've found myself coming to the same conclusion that Dropbox did in their blog post:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[The overhead of sharing code between Android and iOS] ended up being more expensive than just writing the code twice.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For now, I'll stick with mostly Android development and dabble a little in iOS here and there when I need to scratch an itch. Happy coding!&lt;/p&gt;</content><category term="Projects and Experiments"/><category term="Android"/><category term="C"/></entry><entry><title>PiHelper: A Native Companion App for your Pi-hole</title><link href="https://wbrawner.com/2020/01/11/pihelper-a-native-companion-app-for-your-pi-hole/" rel="alternate"/><published>2020-01-11T10:04:00-07:00</published><updated>2020-01-11T10:04:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2020-01-11:/2020/01/11/pihelper-a-native-companion-app-for-your-pi-hole/</id><summary type="html">&lt;p&gt;Ads are an unfortunate byproduct of the freemium internet that we've collectively chosen through our actions, and worse yet are the trackers they've inspired to follow everyone around our online lives. As someone who values their online privacy, I was elated to stumble upon &lt;a href="https://pi-hole.net/"&gt;Pi-hole&lt;/a&gt;, a network-wide ad blocker. Sure …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Ads are an unfortunate byproduct of the freemium internet that we've collectively chosen through our actions, and worse yet are the trackers they've inspired to follow everyone around our online lives. As someone who values their online privacy, I was elated to stumble upon &lt;a href="https://pi-hole.net/"&gt;Pi-hole&lt;/a&gt;, a network-wide ad blocker. Sure, we've had browser extension ad blockers for a while now, but these don't help out very much on other devices like tablets and smartphones. Additionally, many sites now detect ad blockers and then deny you access until you whitelist them or pay some ridiculous \$10 a month subscription for just one website.&lt;/p&gt;
&lt;p&gt;Side note: I very strongly believe in supporting creators and publications that you like, but the “allow invasive tracking/advertising or pay a subscription” model doesn’t sit well with me.&lt;/p&gt;
&lt;p&gt;While Pi-hole is an excellent tool for making usage of the internet much more enjoyable, it isn't without its drawbacks. Sometimes you find yourself unable to open a link because it's blocked or a page doesn't quite load correctly or maybe you just want to temporarily disable the ad blocking to support a site that you really like. Pi-hole comes with a pretty great web interface where you can go in to disable it temporarily or until you decide to turn it back on, but it's not the most user-friendly for non-technical users, as you have to know the IP address for the Pi-hole, or you have to set up some internal domain name that points to it, and you also have to make sure everyone in your family has the password to the admin settings and knows how to enable and disable the Pi-hole. As a believer in simple, native-first interactions, even I find this a bit tedious sometimes, so my less technically-inclined family members certainly wouldn't put up with this.&lt;/p&gt;
&lt;p&gt;I'm aware that there are existing Android and iOS apps for this, but I wanted something with a common interface between the two platforms so that I can help my family members regardless of which platform they personally choose to use. If I'm being honest, I also wanted an excuse to play around with doing some iOS development on a relatively simple project. Thus, I found myself motivated to find a better way to allow my family to have control over the Pi-hole. They should be able to access it from any device, with a fast, responsive interface, that's easy to set up and use. Enter Pi-Helper. Below are a series of very early screenshots for the initial build. I intend to publish the app on Android within a couple of weeks and on iOS within a couple of months.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A screenshot of the Android app for Pi Helper where there is a button to scan the network for the pi-hole or the option to enter in the IP address manually." src="https://wbrawner.com/wp-content/uploads/2019/12/Screenshot_1575255687.png"&gt;
From the first launch, Pi-Helper attempts to simplify the connection process. The simpler solution of just scanning the network for the Pi-hole is offered first, but more advanced/knowledgeable users can just connect directly should they choose.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A screenshot of the Android app for Pi Helper where the app is scanning the network." src="https://wbrawner.com/wp-content/uploads/2019/12/Screenshot_1575255694.png"&gt;
The scanning functionality scans the 8-bit block that the current device's IP address is currently located in to attempt to find the Pi-hole.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A screenshot of the Android app for Pi Helper where the user is prompted to either authenticate via password or API key." src="https://wbrawner.com/wp-content/uploads/2019/12/Screenshot_1575255748.png"&gt;
Once a connection has been established with the Pi-hole, the user is presented with a couple of options for authentication. Since the password is likely easier to get/remember, I've included an option to authenticate with that, as the API key is derived from it at the time of writing.&lt;/p&gt;
&lt;p&gt;&lt;img alt="A screenshot of the controls for the Pi-hole after you've authenticated with it." src="https://wbrawner.com/wp-content/uploads/2019/12/Screenshot_1575336966.png"&gt;
Pi-Helper supports both light and dark modes for all parts of the app.&lt;/p&gt;
&lt;p&gt;Upon connecting to and authenticating with the Pi-hole, you're able to enable and disable it, using the standard disable times or a custom time, modeled after the web interface implementation.&lt;/p&gt;
&lt;p&gt;Stay tuned for more updates on the project and please don't hesitate to get in touch if you'd like to help me beta test it!&lt;/p&gt;</content><category term="Projects and Experiments"/></entry><entry><title>Converting Google Calendar Links to iCal</title><link href="https://wbrawner.com/2019/12/26/converting-google-calendar-links-to-ical/" rel="alternate"/><published>2019-12-26T21:32:00-07:00</published><updated>2019-12-26T21:32:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-12-26:/2019/12/26/converting-google-calendar-links-to-ical/</id><summary type="html">&lt;p&gt;Recently I stumbled upon a &lt;a href="https://support.google.com/calendar/thread/7353749?msgid=17912822"&gt;Google support thread&lt;/a&gt; that outlines how to convert a Google calendar link into an iCal subscription link. The reason this is so important is that it allows you to subscribe to a Google calendar via any other sort of caldav client including Nextcloud or the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently I stumbled upon a &lt;a href="https://support.google.com/calendar/thread/7353749?msgid=17912822"&gt;Google support thread&lt;/a&gt; that outlines how to convert a Google calendar link into an iCal subscription link. The reason this is so important is that it allows you to subscribe to a Google calendar via any other sort of caldav client including Nextcloud or the iOS/macOS' native Calendar app. As an example, let's take the &lt;a href="https://calendar.google.com/calendar/embed?src=jalb5frk4cunnaedbfemuqbhv4%40group.calendar.google.com"&gt;Jupiter Broadcasting calendar&lt;/a&gt; and convert it into an iCal link to subscribe to via Nextcloud. Here's the link: &lt;a href="https://calendar.google.com/calendar/embed?src=jalb5frk4cunnaedbfemuqbhv4%40group.calendar.google.com&amp;amp;ctz=America%2FPhoenix"&gt;https://calendar.google.com/calendar/embed?src=jalb5frk4cunnaedbfemuqbhv4%40group.calendar.google.com&amp;amp;ctz=America%2FPhoenix&lt;/a&gt;. Notice the &lt;code&gt;src=&lt;/code&gt; portion of it? We're going to copy the part directly after that, so in this case it's &lt;code&gt;jalb5frk4cunnaedbfemuqbhv4%40group.calendar.google.com&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;We're going to take this section, and wrap it with this: &lt;code&gt;https://calendar.google.com/calendar/ical/&amp;lt;src&amp;gt;/public/basic.ics&lt;/code&gt;, where &lt;code&gt;&amp;lt;src&amp;gt;&lt;/code&gt; is the part from the previous section. The final result ends up looking like this: &lt;a href="https://calendar.google.com/calendar/ical/jalb5frk4cunnaedbfemuqbhv4%40group.calendar.google.com/public/basic.ics"&gt;https://calendar.google.com/calendar/ical/jalb5frk4cunnaedbfemuqbhv4%40group.calendar.google.com/public/basic.ics&lt;/a&gt;. If you copy that into your Nextcloud calendar subscriptions, you'll now have access to the Jupiter Broadcasting calendar from there.&lt;/p&gt;
&lt;p&gt;To simplify this process, I've written a quick Python script to do this for you. Here's the source for it:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env python3&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;urllib.parse&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;urlparse&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;parse_qsl&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;sys&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;pprint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pprint&lt;/span&gt;

&lt;span class="n"&gt;ICAL_FORMAT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;https://calendar.google.com/calendar/ical/&lt;/span&gt;&lt;span class="si"&gt;{}&lt;/span&gt;&lt;span class="s1"&gt;/public/basic.ics&amp;#39;&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cli_input&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;gcal_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;urlparse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cli_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;query_string&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gcal_url&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;
    &lt;span class="n"&gt;src&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;parse_qsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query_string&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;pair&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;parse_qsl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query_string&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;pair&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;src&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="nb"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ICAL_FORMAT&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;pair&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]))&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="vm"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Copy that into a file, like &lt;code&gt;gcal-to-ical.py&lt;/code&gt;, give it executable permissions, then run it like so:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;./gcal-to-ical.py https://calendar.google.com/calendar/embed?src=jalb5frk4cunnaedbfemuqbhv4%40group.calendar.google.com
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That will produce our ical URL, &lt;a href="https://calendar.google.com/calendar/ical/jalb5frk4cunnaedbfemuqbhv4@group.calendar.google.com/public/basic.ics"&gt;https://calendar.google.com/calendar/ical/jalb5frk4cunnaedbfemuqbhv4@group.calendar.google.com/public/basic.ics&lt;/a&gt;, which we can directly paste into Nextcloud or any other caldav client which supports ical calendar subscriptions.&lt;/p&gt;
&lt;p&gt;I've also added this script to a &lt;a href="https://github.com/wbrawner/gcal-to-ical/"&gt;git repo&lt;/a&gt;, so be sure to check there in case the source has updated.&lt;/p&gt;</content><category term="Tutorials"/><category term="privacy"/><category term="google"/><category term="ical"/><category term="caldav"/></entry><entry><title>Reading Files from a Tar Archive</title><link href="https://wbrawner.com/2019/12/26/reading-files-from-a-tar-archive/" rel="alternate"/><published>2019-12-26T10:13:00-07:00</published><updated>2019-12-26T10:13:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-12-26:/2019/12/26/reading-files-from-a-tar-archive/</id><content type="html">&lt;p&gt;&lt;abbr title="Today I learned"&gt;TIL&lt;/abbr&gt; you can quickly read files from a tar archive with this command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;tar xOf &amp;lt;tar-file&amp;gt; &amp;lt;file-you-want-to-read-here&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This works even if the file is compressed. You can get a list of all the files in the archive by running this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;tar tf &amp;lt;tar-file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Tutorials"/><category term="tar"/><category term="cli"/></entry><entry><title>Moving to cgit</title><link href="https://wbrawner.com/2019/12/22/moving-to-cgit/" rel="alternate"/><published>2019-12-22T20:22:00-07:00</published><updated>2019-12-22T20:22:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-12-22:/2019/12/22/moving-to-cgit/</id><summary type="html">&lt;p&gt;Earlier this year I wrote a blog post on &lt;a href="/2019/03/24/view-your-repositories-remotely-with-gitweb/"&gt;how to set up gitweb&lt;/a&gt; in order to be able to view your repositories in a browser. Originally my intent for using gitweb was not for my own personal use but more to be able to share my code with the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Earlier this year I wrote a blog post on &lt;a href="/2019/03/24/view-your-repositories-remotely-with-gitweb/"&gt;how to set up gitweb&lt;/a&gt; in order to be able to view your repositories in a browser. Originally my intent for using gitweb was not for my own personal use but more to be able to share my code with the world. Personally I'll just use SSH to clone my repos and view them locally, but I don't want anyone else to have SSH access to my servers. Gitweb, however, doesn't seem to have any sort of pretty URLs for cloning projects, which makes it challenging for others to pull my code and modify it for their own use or submit patches back to me.&lt;/p&gt;
&lt;p&gt;In my search for an alternative, I considered &lt;a href="https://about.gitlab.com/"&gt;GitLab&lt;/a&gt;, but the community edition has too many restrictions for my taste, I'm not interested in paying yet another monthly subscription (especially for something that I'd be self-hosting), there are way too many features, and it requires too many resources (namely RAM). I also looked at &lt;a href="https://www.atlassian.com/software/bitbucket"&gt;BitBucket&lt;/a&gt; but I prefer FOSS and anything that isn't written in Java, so I looked at &lt;a href="https://gitea.io/"&gt;Gitea&lt;/a&gt;, which is actually pretty lightweight but again has too many features for my taste. I wanted something super simple and bare-bones so that it's not another security risk I have to constantly keep track of.&lt;/p&gt;
&lt;p&gt;Just this weekend I happened to stumble upon &lt;a href="https://git.zx2c4.com/cgit/about/"&gt;cgit&lt;/a&gt;, which is actually what the &lt;a href="https://git.kernel.org/"&gt;Linux kernel&lt;/a&gt; itself uses for a web interface to the repositories. cgit checks all of my boxes: fast, low resource usage, few features, and HTTP cloning for repositories. You can still get some nice things like markdown READMEs and syntax highlighting too, without having to deal with all the other extras usually bolted onto server-side git repos. I'm quite content with this arrangement, so much so that I started working on a &lt;a href="https://github.com/wbrawner/cgit-dockerized/"&gt;dockerized version&lt;/a&gt; of it, which ~~I'm hosting on my own personal &lt;a href="https://git.wbrawner.com/"&gt;public instance&lt;/a&gt;~~ I used to host myself, where I intent to publish all FOSS that I work on from now on. I'll probably migrate many of my existing projects over here as well, and mirror them to GitHub or GitLab so I don't break any existing links to my work.&lt;/p&gt;
&lt;p&gt;If anyone would like to contribute to my docker image for cgit, or has any tips on how it could be improved, please don't hesitate to get in touch via email and/or send me a patch file!&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update May 2022:&lt;/em&gt; I actually stopped self-hosting my git repos. I have taken a more pragmatic approach that I wrote about &lt;a href="https://wbrawner.com/2022/05/30/mirroring-my-github-repositories/"&gt;here&lt;/a&gt;&lt;/p&gt;</content><category term="Quick Thoughts"/><category term="cgit"/><category term="git"/><category term="self-hosted"/></entry><entry><title>Adding C Code to your Android App</title><link href="https://wbrawner.com/2019/11/17/adding-c-code-to-your-android-app/" rel="alternate"/><published>2019-11-17T12:47:00-07:00</published><updated>2019-11-17T12:47:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-11-17:/2019/11/17/adding-c-code-to-your-android-app/</id><summary type="html">&lt;p&gt;Create a new project, or download the zip file/clone the repo from &lt;a href="https://github.com/wbrawner/cverter"&gt;here&lt;/a&gt;. I've chosen to start with a new project targeting API 15 and up, including Kotlin support and the AndroidX libraries.&lt;/p&gt;
&lt;p&gt;Side note: you could just create a C++ project at the Activity selection screen. That's not …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Create a new project, or download the zip file/clone the repo from &lt;a href="https://github.com/wbrawner/cverter"&gt;here&lt;/a&gt;. I've chosen to start with a new project targeting API 15 and up, including Kotlin support and the AndroidX libraries.&lt;/p&gt;
&lt;p&gt;Side note: you could just create a C++ project at the Activity selection screen. That's not the goal here though. I'm looking more to integrate C code into an existing project. If you're starting a brand new project then by all means, use the wizard to handle all of the magic for you.&lt;/p&gt;
&lt;h3&gt;Step 0: Install Necessary Tools&lt;/h3&gt;
&lt;p&gt;Go to the SDK Manager and make sure you've got the NDK and CMake packages installed.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://wbrawner.com/wp-content/uploads/2019/10/Screen-Shot-2019-10-19-at-9.17.23-AM.png"&gt;&lt;/p&gt;
&lt;h3&gt;Step 1: Configure Gradle for Native Builds&lt;/h3&gt;
&lt;p&gt;In &lt;code&gt;app/build.gradle&lt;/code&gt;, add the following lines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;android&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// …&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;defaultConfig&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;// …&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;externalNativeBuild&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;cmake&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="n"&gt;cppFlags&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;// …&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// …&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;externalNativeBuild&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;cmake&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;src/main/c/CMakeLists.txt&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;3.10.2&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// …&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Make the directory &lt;code&gt;app/src/main/c&lt;/code&gt; and create a &lt;code&gt;CMakeLists.txt&lt;/code&gt; file in there. Paste in the following code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c"&gt;# Set the minimum required version for cmake&lt;/span&gt;
&lt;span class="nb"&gt;cmake_minimum_required&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;VERSION&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;3.4.1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# Define our native library&lt;/span&gt;
&lt;span class="nb"&gt;add_library&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="s"&gt;c-verter&lt;/span&gt;
&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="s"&gt;SHARED&lt;/span&gt;
&lt;span class="w"&gt;           &lt;/span&gt;&lt;span class="s"&gt;c-verter.c&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# Include the Android logging library for native code&lt;/span&gt;
&lt;span class="nb"&gt;find_library&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="s"&gt;log-lib&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="s"&gt;log&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c"&gt;# Link our library with the Android logging library&lt;/span&gt;
&lt;span class="nb"&gt;target_link_libraries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;                     &lt;/span&gt;&lt;span class="s"&gt;c-verters&lt;/span&gt;
&lt;span class="w"&gt;                     &lt;/span&gt;&lt;span class="o"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;log-lib&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Step 2: Add the C Code&lt;/h3&gt;
&lt;p&gt;Now create the &lt;code&gt;app/src/main/c/c-verter.c&lt;/code&gt; file. Inside that file, we'll insert the logic for the conversions:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;jni.h&amp;gt;&lt;/span&gt;

&lt;span class="n"&gt;JNIEXPORT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;jdouble&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;JNICALL&lt;/span&gt;
&lt;span class="n"&gt;Java_com_wbrawner_cverter_ConversionHelper_celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;JNIEnv&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;jclass&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;classInstance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;jdouble&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;JNIEXPORT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;jdouble&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;JNICALL&lt;/span&gt;
&lt;span class="n"&gt;Java_com_wbrawner_cverter_ConversionHelper_fahrenheitToCelsius&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;JNIEnv&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;jclass&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;classInstance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;jdouble&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;fahrenheit&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fahrenheit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;There's a lot going on here, so let's break it down a bit more. First, we import the JNI header file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;jni.h&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This is required to enable the C \&amp;lt;&amp;gt; Java interactions. We then begin to define the function:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;JNIEXPORT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;jdouble&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;JNICALL&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This line declares that the function we're defining is intended to be used by the JNI, and will return a Java double. In this case, a &lt;code&gt;jdouble&lt;/code&gt; is basically the same thing as a C &lt;code&gt;double&lt;/code&gt;, so we don't need to do any kind of special conversion. The same is not true for things like Strings though (we'll cover those later.) Now for the actual function declaration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Java_com_wbrawner_cverter_ConversionHelper_celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;JNIEnv&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;jclass&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;classInstance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;jdouble&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The function name must begin with &lt;code&gt;Java_&lt;/code&gt; (even if your class is in Kotlin, in the &lt;code&gt;src/main/kotlin&lt;/code&gt; directory), and the rest must be the fully-qualified name of the class and method that we will declare in Java or Kotlin. The first two parameters are also required:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;JNIEnv&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;jobject&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;classInstance&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For our purposes, we don't really care about these, but the first parameter is a reference to the JVM in which our app is currently running, and the second is the instance of the class that will be calling our code. The next parameter will be the only one we define in the JVM code:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;jdouble&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The actual body of the function is quite simple, and merely performs the conversions from Fahrenheit to Celsius or vice-versa. Let's move on to the Java and Kotlin implementations, respectively.&lt;/p&gt;
&lt;h3&gt;Step 3: Implement the Java Code&lt;/h3&gt;
&lt;p&gt;For simplicity, and because there's no state involved here, I'm just using static classes/methods:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// Java Implementation&lt;/span&gt;
&lt;span class="kn"&gt;package&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;com.wbrawner.cverter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;ConversionHelper&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;loadLibrary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;c-verter&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;native&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;native&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;fahrenheitToCelsius&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Keep in mind that the package is important. It must match the C method names exactly or this won't work. The same is true of the class and method names, along with their parameter types, counts, and order. Most of this is standard stuff so I'll just go over the native-specifics.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;loadLibrary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;c-verter&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As soon as the JVM loads this class into memory, we'll want to load the native library. You do this with the &lt;code&gt;System.loadLibrary()&lt;/code&gt; method. You'll pass the same name for your library that you defined in the &lt;code&gt;CMakeLists.txt&lt;/code&gt; file previously, as a &lt;code&gt;String&lt;/code&gt;. Next, the function declarations:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;static&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;native&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Notice the &lt;code&gt;native&lt;/code&gt; keyword in the method declaration, and the lack of a function body. This tells the JVM that the method is implemented in a native language, and that it'll need to check the library we've loaded in order to get the implementation. Again, keep in mind that the signatures must match between the JVM declaration and the C declaration.&lt;/p&gt;
&lt;h3&gt;Step 3 (Alt): Implement the Kotlin Code&lt;/h3&gt;
&lt;p&gt;In Kotlin, rather than using a &lt;code&gt;class&lt;/code&gt;, I'm using an &lt;code&gt;object&lt;/code&gt;, since again I don't need an instance of this wrapper class to hold any state:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// Kotlin Implementation&lt;/span&gt;

&lt;span class="k"&gt;package&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;com.wbrawner.cverter&lt;/span&gt;

&lt;span class="kd"&gt;object&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;ConversionHelper&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;external&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;fun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Double&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Double&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;external&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;fun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;fahrenheitToCelsius&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fahrenheit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Double&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Double&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;init&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;loadLibrary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;c-verter&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Much like in Java, the package is important, as are the class name and method declarations. There are only a few minor differences in syntax but otherwise everything is the same.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;external&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;fun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;celsius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Double&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;Double&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Instead of the &lt;code&gt;native&lt;/code&gt; keyword, Kotlin uses the &lt;code&gt;external&lt;/code&gt; keyword.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;init&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;loadLibrary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;c-verter&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Also, instead of loading the library in a &lt;code&gt;static&lt;/code&gt; initializer block, Kotlin uses the standard &lt;code&gt;init&lt;/code&gt; block. If you did need an actual class to hold state, you could also put this in the &lt;code&gt;init&lt;/code&gt; block for your class' &lt;code&gt;companion object&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Step 4: Use the C Code in your App&lt;/h3&gt;
&lt;p&gt;Now that we've done the setup, let's create a super simple app to demonstrate the code in action! I've created an &lt;code&gt;Activity&lt;/code&gt; creatively called &lt;code&gt;MainActivity&lt;/code&gt;, along with a layout resource file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;LinearLayout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="na"&gt;xmlns:android=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;http://schemas.android.com/apk/res/android&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;xmlns:app=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;http://schemas.android.com/apk/res-auto&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;xmlns:tools=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;http://schemas.android.com/tools&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;android:layout_width=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;match_parent&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;android:layout_height=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;match_parent&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;android:orientation=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;vertical&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;android:gravity=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;center&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="na"&gt;tools:context=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;.MainActivity&amp;quot;&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;TextView&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;android:id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;@+id/celsiusToFahrenheit&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;android:layout_width=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;wrap_content&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;android:layout_height=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;wrap_content&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;tools:text=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Celsius to Fahrenheit conversion&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;TextView&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;android:id=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;@+id/fahrenheitToCelsius&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;android:layout_width=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;wrap_content&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;android:layout_height=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;wrap_content&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="na"&gt;tools:text=&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Fahrenheit to Celsius conversion&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;–&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// MainActivity.kt&lt;/span&gt;
&lt;span class="k"&gt;package&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;com.wbrawner.cverter&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;androidx.appcompat.app.AppCompatActivity&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;android.os.Bundle&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nn"&gt;kotlinx.android.synthetic.main.activity_main.*&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nc"&gt;MainActivity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AppCompatActivity&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kd"&gt;override&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;fun&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;onCreate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;savedInstanceState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Bundle?)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;super&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;onCreate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;savedInstanceState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;setContentView&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;R&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;layout&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;activity_main&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;40℃ is equal to %3.0f℉&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;ConversionHelper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;celsiusToFahrenheit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;40.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;fahrenheitToCelsius&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;40℉ is equal to %2.1f℃&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;ConversionHelper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fahrenheitToCelsius&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;40.0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The premise of the app is simple: display a conversion of Celsius to Fahrenheit on one line, with the opposite conversion on the bottom, using our C library to handle the conversions. If you build and run the app, you get something that looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://wbrawner.com/wp-content/uploads/2019/11/Screenshot_1574019364.png"&gt;&lt;/p&gt;
&lt;p&gt;Mission accomplished!&lt;/p&gt;
&lt;h3&gt;Why Would I Want to Do This?&lt;/h3&gt;
&lt;p&gt;There are several reasons why you might want to (or might not want to) integrate some C code in your app. If performance is crucial or you want to share some complex logic between Android and another platform, or you need to leverage some existing C library, then you might find this useful. I'd caution you to ensure that this is the best option though, as cross-platform solutions can often be more complicated and expensive in the long run, as &lt;a href="https://blogs.dropbox.com/tech/2019/08/the-not-so-hidden-cost-of-sharing-code-between-ios-and-android/"&gt;Dropbox found out with C++&lt;/a&gt; and &lt;a href="https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a"&gt;Airbnb did with React Native&lt;/a&gt;. As always though, you should weigh the pros and cons and find out what works best for &lt;em&gt;you&lt;/em&gt;. Happy coding!&lt;/p&gt;</content><category term="Tutorials"/><category term="android"/><category term="c"/><category term="java"/><category term="kotlin"/></entry><entry><title>App Shortcuts in iOS 13</title><link href="https://wbrawner.com/2019/10/19/app-shortcuts-in-ios-13/" rel="alternate"/><published>2019-10-19T23:19:00-06:00</published><updated>2019-10-19T23:19:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-10-19:/2019/10/19/app-shortcuts-in-ios-13/</id><summary type="html">&lt;p&gt;App Shortcuts (also known as Home Screen Quick Actions), are the nice little popups that allow users to quickly jump into a specific section of your app, as seen in the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://wbrawner.com/wp-content/uploads/2019/10/Simulator-Screen-Shot-iPhone-11-Pro-Max-2019-10-19-at-22.21.31.png"&gt;&lt;/p&gt;
&lt;p&gt;Apple has a &lt;a href="https://developer.apple.com/documentation/uikit/menus_and_shortcuts/add_home_screen_quick_actions"&gt;really nice guide&lt;/a&gt; on how to implement these in your own apps, but the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;App Shortcuts (also known as Home Screen Quick Actions), are the nice little popups that allow users to quickly jump into a specific section of your app, as seen in the screenshot below.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://wbrawner.com/wp-content/uploads/2019/10/Simulator-Screen-Shot-iPhone-11-Pro-Max-2019-10-19-at-22.21.31.png"&gt;&lt;/p&gt;
&lt;p&gt;Apple has a &lt;a href="https://developer.apple.com/documentation/uikit/menus_and_shortcuts/add_home_screen_quick_actions"&gt;really nice guide&lt;/a&gt; on how to implement these in your own apps, but the problem is that said guide seems to be outdated for iOS 13 and Scene-based apps. Basically you can now forget about the &lt;code&gt;AppDelegate&lt;/code&gt; for now as the &lt;code&gt;SceneDelegate&lt;/code&gt; is the new MVP here.&lt;/p&gt;
&lt;p&gt;In the original guide, you were to override a few methods in the &lt;code&gt;AppDelegate&lt;/code&gt;. This doesn't work anymore though, as the &lt;code&gt;applicationDidBecomeActive&lt;/code&gt; function is never called when your app wakes up from the background. You now need to override a series of similar functions in the &lt;code&gt;SceneDelegate&lt;/code&gt;, and slightly modify one of the &lt;code&gt;AppDelegate&lt;/code&gt; methods.&lt;/p&gt;
&lt;p&gt;Instead of overriding the &lt;code&gt;AppDelegate&lt;/code&gt;'s &lt;a href="https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622921-application"&gt;&lt;code&gt;application(_:didFinishLaunchingWithOptions:)&lt;/code&gt;&lt;/a&gt; and &lt;code&gt;application(_:performActionFor:completionHandler:)``&amp;lt;/code&amp;gt;&lt;/code&gt; methods, you now only need to modify the method that sets up the scene:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// MARK: UISceneSession Lifecycle&lt;/span&gt;
&lt;span class="kd"&gt;func&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;application&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;_&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;application&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UIApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="n"&gt;configurationForConnecting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;connectingSceneSession&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UISceneSession&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UIScene&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ConnectionOptions&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UISceneConfiguration&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// Called when a new scene session is being created.&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// Use this method to select a configuration to create the new scene with.&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// Grab a reference to the shortcutItem to use in the scene&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;shortcutItem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shortcutItem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;shortcutItemToProcess&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shortcutItem&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UISceneConfiguration&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Default Configuration&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                                &lt;/span&gt;&lt;span class="n"&gt;sessionRole&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;connectingSceneSession&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;role&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This takes care of the scenario in which the user opens your app from a quick action while your app isn't already loaded in the background. In case your app &lt;em&gt;is&lt;/em&gt; already running in the background, you'll need to implement the &lt;code&gt;SceneDelegate&lt;/code&gt;'s &lt;code&gt;windowScene(_:performActionFor:completionHandler:)&lt;/code&gt; method:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;func&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;windowScene&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;_&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;windowScene&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UIWindowScene&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="n"&gt;performActionFor&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shortcutItem&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UIApplicationShortcutItem&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                 &lt;/span&gt;&lt;span class="n"&gt;completionHandler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;@&lt;/span&gt;&lt;span class="n"&gt;escaping&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Bool&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Void&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// When the user opens the app through a quick action, this is now the method that will be called&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;UIApplication&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shared&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AppDelegate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;shortcutItemToProcess&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shortcutItem&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, instead of implementing &lt;code&gt;AppDelegate&lt;/code&gt;'s &lt;code&gt;applicationDidBecomeActive&lt;/code&gt; method, you'll implement the &lt;code&gt;SceneDelegate&lt;/code&gt;'s equivalent:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;func&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;sceneDidBecomeActive&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;_&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;scene&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UIScene&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="c1"&gt;// Is there a shortcut item that has not yet been processed?&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;shortcutItem&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;UIApplication&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shared&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AppDelegate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;shortcutItemToProcess&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;// In this sample an alert is being shown to indicate that the action has been triggered,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;// but in real code the functionality for the quick action would be triggered.&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kd"&gt;var&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;message&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;&lt;span class="si"&gt;\(&lt;/span&gt;&lt;span class="n"&gt;shortcutItem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;type&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s"&gt; triggered&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shortcutItem&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;userInfo&lt;/span&gt;&lt;span class="p"&gt;?[&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Name&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot; for &lt;/span&gt;&lt;span class="si"&gt;\(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;alertController&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="bp"&gt;UIAlertController&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Quick Action&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;preferredStyle&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;alertController&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;addAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;UIAlertAction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Close&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="n"&gt;window&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="n"&gt;rootViewController&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="n"&gt;present&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;alertController&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;animated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;completion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="c1"&gt;// Reset the shorcut item so it&amp;#39;s never processed twice.&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;UIApplication&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shared&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;delegate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;as&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AppDelegate&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;shortcutItemToProcess&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;nil&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="Tutorials"/><category term="iOS"/><category term="Swift"/><category term="SwiftUI"/></entry><entry><title>Quickly Sending Code as a Git Patch</title><link href="https://wbrawner.com/2019/10/19/quickly-sending-code-as-a-git-patch/" rel="alternate"/><published>2019-10-19T10:01:00-06:00</published><updated>2019-10-19T10:01:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-10-19:/2019/10/19/quickly-sending-code-as-a-git-patch/</id><summary type="html">&lt;p&gt;The other day at work I was helping a coworker troubleshoot something remotely, and we eventually decided to split up and troubleshoot individually to try and cover more ground. He hadn't pushed his changes from his branch and I didn't want to completely drop what I was doing on my …&lt;/p&gt;</summary><content type="html">&lt;p&gt;The other day at work I was helping a coworker troubleshoot something remotely, and we eventually decided to split up and troubleshoot individually to try and cover more ground. He hadn't pushed his changes from his branch and I didn't want to completely drop what I was doing on my branch, so I decided to just send him a patch instead.&lt;/p&gt;
&lt;p&gt;When I eventually landed on a working solution, I committed my changes, and ran this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class="w"&gt; &lt;/span&gt;format-patch&lt;span class="w"&gt; &lt;/span&gt;commit-hash~
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Of course you'll need to substitute &lt;code&gt;commit-hash&lt;/code&gt; with the actual commit hash. The &lt;code&gt;~&lt;/code&gt; at the end of the commit hash is important too, so don't leave it out (and don't put a space between it and the hash). This will give you a file, called &lt;code&gt;0001-Your-commit-message.patch&lt;/code&gt;, which you can then send to your recipient. Again, &lt;code&gt;Your-commit-message&lt;/code&gt; would be your actual commit message, just with the spaces replaced with hyphens. All the person on the other end needs to do is copy that file into the directory of the git repo, and run this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&lt;span class="w"&gt; &lt;/span&gt;am&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0001&lt;/span&gt;-your-commit-message.patch
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With that, they should then have a new commit from you, with the changes you made in your code. Afterwards, that patch file can be deleted.&lt;/p&gt;
&lt;p&gt;While I used this particular approach for sending code to a coworker without interrupting my task too much, this is also a good way to contribute to open source projects that accept patch submissions via email. Feel free to reach out if you have any troubles with this method and I'd be happy to help!&lt;/p&gt;</content><category term="Tutorials"/><category term="git"/></entry><entry><title>Swift Combine's Result.Publisher</title><link href="https://wbrawner.com/2019/10/12/swift-combines-result-publisher/" rel="alternate"/><published>2019-10-12T13:29:00-06:00</published><updated>2019-10-12T13:29:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-10-12:/2019/10/12/swift-combines-result-publisher/</id><summary type="html">&lt;p&gt;Coming from a background in Java/Android development, I’m fairly familiar with working in RxJava and the reactive style of programming. Without getting into the details of said style, there’s a particular operator you can use called &lt;code&gt;Observable.just()&lt;/code&gt;, which allows you to wrap a single value in …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Coming from a background in Java/Android development, I’m fairly familiar with working in RxJava and the reactive style of programming. Without getting into the details of said style, there’s a particular operator you can use called &lt;code&gt;Observable.just()&lt;/code&gt;, which allows you to wrap a single value in an &lt;code&gt;Observable&lt;/code&gt;. This is particularly helpful in tests or mock data where you don’t necessarily have an external source providing the data.&lt;/p&gt;
&lt;p&gt;Translating this to Swift, at first glance it seems like the &lt;code&gt;Just&lt;/code&gt; operator works just fine. And this is likely the case, unless like one often does with &lt;code&gt;Observable&lt;/code&gt;s you need to handle error scenarios too, in which case the &lt;code&gt;Result.Publisher&lt;/code&gt; is more likely what you’re looking for. Here’s an example: say you’ve got a &lt;code&gt;Publisher&lt;/code&gt; that returns a list of &lt;code&gt;Task&lt;/code&gt;s, like for a To-Do list app. Your method to retrieve the &lt;code&gt;Task&lt;/code&gt;s might look something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;func&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;getTasks&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;AnyPublisher&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TaskError&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you wanted to test one of the callers of this method with some mock data, you could do something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Publisher&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Buy Milk&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Clean garage&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)])&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;eraseToAnyPublisher&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The &lt;code&gt;.eraseToAnyPublisher()&lt;/code&gt; at the end is needed because otherwise this will return a &lt;code&gt;Result&lt;/code&gt;. If you then wanted to test handling an error scenario, you’d do something like this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Task&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TaskError&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;.&lt;/span&gt;&lt;span class="n"&gt;Publisher&lt;/span&gt;&lt;span class="p"&gt;(.&lt;/span&gt;&lt;span class="n"&gt;failure&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;TaskError&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;notFound&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;eraseToAnyPublisher&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note that you’ll likely have to explicitly define the type for the &lt;code&gt;Result&lt;/code&gt; in this case as the compiler is otherwise unable to determine it.&lt;/p&gt;</content><category term="Tutorials"/><category term="Combine"/><category term="iOS"/><category term="Swift"/></entry><entry><title>Mission Failed</title><link href="https://wbrawner.com/2019/10/12/mission-failed/" rel="alternate"/><published>2019-10-12T08:05:00-06:00</published><updated>2019-10-12T08:05:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-10-12:/2019/10/12/mission-failed/</id><summary type="html">&lt;p&gt;In December of last year, I decided to &lt;a href="https://wbrawner.com/2018/12/01/getting-more-into-blogging/"&gt;commit to publishing a blog post once per month for all of 2019&lt;/a&gt;. Looking back through the archives for my blog, you can see that I published at least once per month all the way up until September, but no posts went …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In December of last year, I decided to &lt;a href="https://wbrawner.com/2018/12/01/getting-more-into-blogging/"&gt;commit to publishing a blog post once per month for all of 2019&lt;/a&gt;. Looking back through the archives for my blog, you can see that I published at least once per month all the way up until September, but no posts went out during that 30-day period. I failed.&lt;/p&gt;
&lt;p&gt;My failure goes a bit deeper than just letting September go by without writing though. When I first wrote the blog post, the point of it was to make it a habit to blog more often, to share my ideas and discoveries with the internet, and have a sort of portfolio of my expertise. My hope was that by setting a measurable goal, I'd have milestones to work towards and improve my blogging skills through consistency. As time went on though, I got so caught up in the goal itself that I forgot the motivation behind it – to form new habits. What ended up happening most of the time was that I would realize it was the last week of the month and remember I hadn't written anything, then quickly sit down to pump something out that seemed somewhat decent. For August I even wrote the post ahead of time and scheduled it to go out on the first of the month. Rarely did I actually leave a finished post in my drafts for a few days to think about it or even revisit it for editing.&lt;/p&gt;
&lt;p&gt;I'm no professional writer, nor do I aspire to be, but if I intend for this blog to be a representation of my knowledge and growth over time, then I think I owe it to myself to put in a decent effort to forming better habits and not just meeting arbitrary goals to say that I'm making progress. True progress is often more difficult to measure but is much more valuable. I think my biggest mistake was setting a goal that wasn't in line with my motivation. I have nothing to prove to anyone and no quotas to make for publications. I don't make ad revenue so number of views is irrelevant to me. I just want to blog more consistently.&lt;/p&gt;
&lt;p&gt;With this in mind, I'm going to change my goal. I'll continue to attempt to publish at least once a month but more importantly, I want to sit down to write and/or edit posts for at least 30 minutes per week. I may increase this amount if I see that it's insufficient but for now I think that's a good place to start. Some weeks I have more time than others so I can always do more but I want to ensure that I'm setting a reasonable baseline to work up from. I imagine that by setting my goal to be time-based instead of end-result based, I’ll find myself blogging more often, and may even publish multiple times per month.&lt;/p&gt;
&lt;p&gt;Another mistake I made with my original goal was not planning for it. I never set aside time specifically for it or set reminders or anything. In order to stay consistent with my new goal, I’m going to block out 30 minutes in my calendar each week, probably Saturday or Sunday in the morning when I know I usually won’t be busy, and have reminders for 10 minutes before so that I have time to fire up my computer, open my editor, and get to writing. By not only setting a measurable goal that tailors better to my intentions but also putting it into my schedule, I hope I’m able to accomplish it this time.&lt;/p&gt;</content><category term="Updates"/></entry><entry><title>Is it Safe to Store your google-services.json in a Public Git Repo?</title><link href="https://wbrawner.com/2019/08/01/is-it-safe-to-store-your-google-services-json-in-a-public-git-repo/" rel="alternate"/><published>2019-08-01T08:02:00-06:00</published><updated>2019-08-01T08:02:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-08-01:/2019/08/01/is-it-safe-to-store-your-google-services-json-in-a-public-git-repo/</id><summary type="html">&lt;p&gt;I maintain an open source app called &lt;a href="https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown"&gt;Simple Markdown&lt;/a&gt;. One of the things I've been working on for it lately is getting some CI server setup to be able to automate the testing and packaging of the app. I'll still handle the publishing myself but I'd like to speed up …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I maintain an open source app called &lt;a href="https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown"&gt;Simple Markdown&lt;/a&gt;. One of the things I've been working on for it lately is getting some CI server setup to be able to automate the testing and packaging of the app. I'll still handle the publishing myself but I'd like to speed up the rest of the process. Anyways, given that the code is all freely available, it makes it tough to work with a CI server because I can't store any secrets in the code. It's generally bad practice to do so anyways but when you have a private repo and you're the only developer then it's usually fine. I've got my gradle scripts configured to automatically sign the release variants with my signing key, so that was pretty straightforward to mock out in the absence of the actual signing configuration, but I have been unable to find any way to mock out my &lt;code&gt;google-services.json&lt;/code&gt; file, which contains the API keys and URLs for my Firebase project, which I'm currently using for error reports and analytics. As such, I began looking into the security concerns for just including it in the repo. I ran into &lt;a href="https://stackoverflow.com/questions/37358340/should-i-add-the-google-services-json-from-firebase-to-my-repository"&gt;this StackOverflow post&lt;/a&gt; which points to &lt;a href="https://stackoverflow.com/questions/45508516/is-google-services-json-safe-from-hackers/45508703#45508703"&gt;this other StackOverflow post&lt;/a&gt; and a &lt;a href="https://groups.google.com/forum/#!topic/firebase-talk/bamCgTDajkw"&gt;Google Groups discussion&lt;/a&gt;, all of which seem to come to the same conclusion: the &lt;code&gt;google-services.json&lt;/code&gt; file is not really secret, as it could easily be retrieved from your compiled APK. Seeing as it's written on the internet, it must be true.&lt;/p&gt;
&lt;p&gt;Just kidding, let's investigate.&lt;/p&gt;
&lt;p&gt;I'll start out by downloading the Play Store version of my app onto a device. I use Proguard to obfuscate it so if I can find the &lt;code&gt;google-services.json&lt;/code&gt; file then it's not encrypted in any way and it's probably just fine to publish it in my repo. Let's grab that APK:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# Get the path to the APK:&lt;/span&gt;
adb&lt;span class="w"&gt; &lt;/span&gt;shell&lt;span class="w"&gt; &lt;/span&gt;pm&lt;span class="w"&gt; &lt;/span&gt;list&lt;span class="w"&gt; &lt;/span&gt;packages&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;com.wbrawner.simplemarkdown
&lt;span class="c1"&gt;# Pull the APK file&lt;/span&gt;
adb&lt;span class="w"&gt; &lt;/span&gt;pull&lt;span class="w"&gt; &lt;/span&gt;/data/app/com.wbrawner.simplemarkdown-dAHkKgk5P96rLBONU3zMNw&lt;span class="o"&gt;==&lt;/span&gt;/base.apk&lt;span class="w"&gt; &lt;/span&gt;simplemarkdown.apk
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Android Studio has a helpful way to unpack the APK and examine its contents. Just press &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;A&lt;/code&gt; (that's &lt;code&gt;Cmd&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;A&lt;/code&gt; for those of the Apple orientation) and type "Analyze APK"&lt;/p&gt;
&lt;p&gt;&lt;img alt="" class="wp-image-554" src="https://wbrawner.com/wp-content/uploads/2019/07/Annotation-2019-07-30-195817.png"&gt;&lt;/p&gt;
&lt;p&gt;Navigate to wherever you pulled the APK file to and open it. Clearly, there's no &lt;code&gt;google-services.json&lt;/code&gt; file in here, so case closed, right? It's not safe to publish it. Well, hang on a second. Let's check the &lt;code&gt;AndroidManifest.xml&lt;/code&gt; file... Nope, not there either. How about this &lt;code&gt;resources.arsc&lt;/code&gt; thing? Maybe it's in the string resources. As we scroll down a bit, a couple of values jump out at me. &lt;code&gt;firebase_database_url&lt;/code&gt;: &lt;code&gt;https://simplemarkdown.firebaseio.com&lt;/code&gt;. That matches exactly the &lt;code&gt;firebase_url&lt;/code&gt; parameter in the &lt;code&gt;google-services.json&lt;/code&gt;. &lt;code&gt;gcm_defaultSenderId&lt;/code&gt;: &lt;code&gt;318641233555&lt;/code&gt;. There's our &lt;code&gt;project_number&lt;/code&gt;. &lt;code&gt;google_api_key&lt;/code&gt;: &lt;code&gt;AIzaSyBDMcXg-10NsXLDKJRtj5WnXoHrwg3m9Os&lt;/code&gt;. That's a one-to-one match for the &lt;code&gt;current_key&lt;/code&gt; value inside &lt;code&gt;api_key&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" class="wp-image-555" src="https://wbrawner.com/wp-content/uploads/2019/07/Annotation-2019-07-30-180310.png"&gt;&lt;/p&gt;
&lt;p&gt;The list goes on. Given that you can, in fact, find all of the same values in the &lt;code&gt;google-services.json&lt;/code&gt; file in the string resources, I guess that it really is safe to publish after all. If you're a lot smarter than I am and you see that I've made a terrible mistake somewhere, please do let me know. In the meantime, I'll simplify my CI setup by just committing the file.&lt;/p&gt;</content><category term="Quick Thoughts"/></entry><entry><title>Cross Platform Apps the Hard Way - Part 2: The Architecture</title><link href="https://wbrawner.com/2019/07/28/cross-platform-apps-the-hard-way-part-2-the-architecture/" rel="alternate"/><published>2019-07-28T21:29:00-06:00</published><updated>2019-07-28T21:29:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-07-28:/2019/07/28/cross-platform-apps-the-hard-way-part-2-the-architecture/</id><summary type="html">&lt;p&gt;In my previous post where I outlined the goals for this project of mine, I briefly mentioned my thoughts on how to structure the code in order for it to work on as many platforms as possible. In this post, I intend to dive in a little deeper on the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In my previous post where I outlined the goals for this project of mine, I briefly mentioned my thoughts on how to structure the code in order for it to work on as many platforms as possible. In this post, I intend to dive in a little deeper on the architecture of the app to maximize reusability without causing myself too many headaches on whichever native platform I'm writing for.&lt;/p&gt;
&lt;p&gt;I'm an Android developer by day, and when structuring a native app written in Java or Kotlin, I usually like to break them down in the following layers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;UI layer&lt;/li&gt;
&lt;li&gt;Repository layer&lt;/li&gt;
&lt;li&gt;Service layer&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I intend to mirror this structure for my cross-platform apps as well. My hope is that I'll be able to easily use UI-specifc objects that are unrelated to the data transfer objects in C, so that I can load up the UI and then only communicate with the native layer where necessary, as I could be wrong but I'm fairly certain that accessing C code from Java is fairly expensive.&lt;/p&gt;
&lt;h2&gt;The UI layer&lt;/h2&gt;
&lt;p&gt;On Android, I generally consider the UI layer to be the Activities, Fragments, and ViewModels/Presenters. For anyone not familiar with Android development, that's essentially all of the components related to outputting information to the user, or receiving input from the user. I like to keep this layer &lt;em&gt;very&lt;/em&gt; simple, having little-to-no logic beyond just listening for updates from the lower layers or providing updates from the user. I'll use ViewModels only as a means to avoid losing state between screen rotations but this will otherwise contain no logic. This is also ideally going to be the only layer that contains platform-specific code, so that would be Kotlin for Android, Swift for iOS, GTK/QT for Linux, etc.&lt;/p&gt;
&lt;h2&gt;The Repository Layer&lt;/h2&gt;
&lt;p&gt;The way I see it, the Repository layer is meant to be an abstraction around the various data sources for your app. In most cases this is fairly simple, either just a local database or just a network resource, but I intend to implement some local caching so that the app can still be usable offline. For retrieving data, the app should store a copy locally so that if the user opens the app again without an internet connection, they can still see the last updates. Even if the user has an internet connection, this ensures that something will be visible upon launching the app as a local cache will inevitably be faster than making a network request. I intend to write this layer in C, with the use of cURL and OpenSSL for making secure network requests, and SQLite for caching the data locally. Given that these are all open source cross-platform libraries that, as far as I know, run on multiple architectures including ARM and x86, they should be sufficient for my needs. I'll likely only need platform-specific code for the object mapping from the C structs to the objects in the platform's language.&lt;/p&gt;
&lt;h2&gt;The Service Layer&lt;/h2&gt;
&lt;p&gt;While the repository abstracts away where the data comes from, the service layer abstracts access to each data source individually. So for my purposes, the repository object would have a reference to a database service object that's responsible for managing the connections to the database and retrieving or updating the data it holds, and a network service object, which would have a similar role as the database service object except it would handle network resources. I also intend to write this layer in C for use across multiple platforms.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;For the next post, I'll likely write a quick tutorial on how to include C code in your Android app, as it's something I'm only vaguely familiar with myself, so that will give me a little hands-on experience with the process. From there on, I'll document the process of actually making this work. Stay tuned for further updates and don't hesitate to get in touch if you have any questions or suggestions!&lt;/p&gt;</content><category term="Projects and Experiments"/></entry><entry><title>Cross Platform Apps the Hard Way - Part 1: The Idea</title><link href="https://wbrawner.com/2019/06/25/cross-platform-apps-the-hard-way-part-1-the-idea/" rel="alternate"/><published>2019-06-25T21:28:00-06:00</published><updated>2019-06-25T21:28:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-06-25:/2019/06/25/cross-platform-apps-the-hard-way-part-1-the-idea/</id><summary type="html">&lt;p&gt;Nowadays, there are many different ways to build a cross-platform app, including React Native, Xamarin, and Flutter, to name a few. These each come with their own pros and cons, but they all serve the same purpose: allowing you to create "native" cross-platform apps relatively painlessly and cheaper than building …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Nowadays, there are many different ways to build a cross-platform app, including React Native, Xamarin, and Flutter, to name a few. These each come with their own pros and cons, but they all serve the same purpose: allowing you to create "native" cross-platform apps relatively painlessly and cheaper than building out native apps specific to each platform.&lt;/p&gt;
&lt;p&gt;What I intend to explore through this series of blog posts is not "how can I make a cross-platform app the easiest possible way?", but rather "how can I make a cross-platform app in the most robust possible way?" I'm not looking for shortcuts or easy-ways-out, and I want to see just how much logic for the app I could share between multiple platforms. In order to keep things interesting, I'm going to start with just Android, and eventually branch out to iOS, but I want to take things a step further and port the app over to a desktop platform using the same underlying code and only rewriting the UI layer each time.&lt;/p&gt;
&lt;p&gt;Naturally, there are several languages one could use given the constraints I've defined, but I want my code to last. I'm aiming for the longest usability, so I don't want to worry about the language evolving too much and rendering my code obsolete or so old that it's painful to refactor. As such, my language of choice is C. I'm hoping C will give me the greatest amount of flexibility and control over the implementation details so that I can bring the internal libraries I write to any new platform with just the addition of the UI logic in the native language for the given platform and minimal C bindings in the event that I'm working with a language I haven't previously worked with. If I'm being totally honest I'm also looking for an excuse to work with C a bit more so this is knocking out two birds with one stone :P&lt;/p&gt;
&lt;p&gt;I don't imagine this will be quick nor painless so I won't make any guarantees for how often I'll post an update, but I'll try to write something up any time I run into something interesting. Additionally, I'll keep the code open source so that I can get some feedback from the community and share my findings! Here's to not taking the easy way out!&lt;/p&gt;
&lt;p&gt;Disclaimer: I don't mean to diminish the work done by developers of other cross-platform frameworks like Flutter, React Native, or Xamarin, nor am I implying that their jobs are easy. Development with these frameworks are all as respectable as development in any other domain. At the end of the day, we're all just trying to solve problems with computers.&lt;/p&gt;</content><category term="Projects and Experiments"/></entry><entry><title>Simple Markdown Goes Dark</title><link href="https://wbrawner.com/2019/05/19/simple-markdown-goes-dark/" rel="alternate"/><published>2019-05-19T21:23:00-06:00</published><updated>2019-05-19T21:23:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-05-19:/2019/05/19/simple-markdown-goes-dark/</id><summary type="html">&lt;p&gt;Version 0.7.0 for Simple Markdown brings some major changes to the app. Most notably, and likely most requested, is DARK MODE. With Android Q's built-in implementation coming soon, I figured it's about time to finally get to it. It's something that's been on the roadmap for a while …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Version 0.7.0 for Simple Markdown brings some major changes to the app. Most notably, and likely most requested, is DARK MODE. With Android Q's built-in implementation coming soon, I figured it's about time to finally get to it. It's something that's been on the roadmap for a while but now it's finally complete.&lt;/p&gt;
&lt;p&gt;With the dark mode rollout, I figured a redesign would be appropriate as well. I've been thinking about moving the app bar to the bottom of the screen for a while now, especially since devices keep getting taller and taller. I played around with the idea a bit and eventually settled on a design that I liked. I hope that you all like it as well.&lt;/p&gt;
&lt;p&gt;Finally, there were numerous other changes that had to be made in order to accommodate Android Q. Namely, scoped storage. Since I wouldn't have direct access to the file system anymore, the old file explorer had to go. It was kind of buggy and didn't always work the way I had hoped so I opted to just use the system file explorer instead. I'm hoping this won't cause any major issues for anyone, but please let me know if something isn't working anymore. One advantage of this move howver is that you can now save to or open from your cloud file providers directly, without having to manually move the files around. So I suppose it's not all bad.&lt;/p&gt;
&lt;p&gt;The file system access required me to rework the autosave feature as well. Since I would no longer have access to just directly write the file back to the device, I now just save it locally and when you attempt to create a new file, I'll prompt you to save or discard your changes.&lt;/p&gt;
&lt;p&gt;Lastly, the default root directory option has been removed, since I no longer have control over the file system. I'm hoping this wasn't a highly used feature but I don't really have any analytics to tell me so I might have to change that in order to avoid pulling out potentially highly used features.&lt;/p&gt;
&lt;p&gt;To wrap things up, I've attached a few screenshots to the bottom of this post. Please don't hesitate to reach out if you have any feedback or would like to contribute!&lt;/p&gt;
&lt;p&gt;The old edit pane:
&lt;img alt="The old edit pane" src="https://wbrawner.com/wp-content/uploads/2019/07/edit-old.png"&gt;&lt;/p&gt;
&lt;p&gt;The old preview pane:
&lt;img alt="The old preview pane" src="https://wbrawner.com/wp-content/uploads/2019/07/preview-old.png"&gt;&lt;/p&gt;
&lt;p&gt;The new light mode edit pane:
&lt;img alt="The new light mode edit pane" src="https://wbrawner.com/wp-content/uploads/2019/07/edit-light.png"&gt;&lt;/p&gt;
&lt;p&gt;The new light mode preview pane:
&lt;img alt="The new light mode preview pane" src="https://wbrawner.com/wp-content/uploads/2019/07/preview-light.png"&gt;&lt;/p&gt;
&lt;p&gt;The new dark mode edit pane:
&lt;img alt="The new dark mode edit pane" src="https://wbrawner.com/wp-content/uploads/2019/07/edit-dark.png"&gt;&lt;/p&gt;
&lt;p&gt;The new dark mode preview pane:
&lt;img alt="The new dark mode preview pane" src="https://wbrawner.com/wp-content/uploads/2019/07/preview-dark.png"&gt;&lt;/p&gt;</content><category term="Projects and Experiments"/></entry><entry><title>Reflecting on my Career</title><link href="https://wbrawner.com/2019/04/20/reflecting-on-my-career/" rel="alternate"/><published>2019-04-20T21:22:00-06:00</published><updated>2019-04-20T21:22:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-04-20:/2019/04/20/reflecting-on-my-career/</id><summary type="html">&lt;p&gt;This month, I've started a new position as an Android Engineer at American Express, and I found myself reflecting on how I got here. I have no college degree, and didn't participate in any coding bootcamp or anything like that, so I figured I'd share my story in case it's …&lt;/p&gt;</summary><content type="html">&lt;p&gt;This month, I've started a new position as an Android Engineer at American Express, and I found myself reflecting on how I got here. I have no college degree, and didn't participate in any coding bootcamp or anything like that, so I figured I'd share my story in case it's helpful to anyone else out there looking to get into development. For me, things started when I was still in elementary school, around age 10 or 11. My parents upgraded the family computer and gave me the old one to use as my personal computer, which I mostly used for gaming. Back then the games I spent most of my time playing were Star Wars games, like Republic Commando, Knights of the Old Republic, and Battlefront, which to this day are my favorites. I liked these games so much that I started looking into their online communities, and quickly discovered modding and level building. While I never got very far into those, I did start to get into basic web development with HTML, CSS, and JavaScript, to build and modify custom pages for my various interests. Admittedly, most of the "coding" I was doing back then was just copying and pasting snippets I ran across on the internet, with little-to-no modifications of my own. My curiosity grew though, and by middle school, around age 12 or 13, I was hanging around on some hacking forums. My parents weren't very big fans of this though, so my computer use was dialed back a bit and I took a long break from anything beyond simple gaming.&lt;/p&gt;
&lt;p&gt;Fast forward a few years, after I graduated high school, and the story continues. I planned on studying computer sciences in college, but wanted to travel a bit and so I decided to take a gap year and go down to Mexico for a little while. My girlfriend at the time (who is now my wife), is from there, so I moved in with her family so that we could spend some more time together. Shortly thereafter I started teaching English to make some money, but I wasn't very fond of the work at all. Thus, while working as an English teacher, I spent much of my free time learning how to code. It's been a couple of years since then, but I'll try to link some of the resources I mention where I can find them.&lt;/p&gt;
&lt;p&gt;Initially, I wanted to learn how to do Android development. I had an Android phone and an Android tablet, and was fascinated at the idea of being able to build apps that could run on them. Java was the only supported lanugage at the time, so I attempted to learn it with a book called &lt;a href="https://www.oreilly.com/library/view/head-first-java/0596009208/"&gt;Head First Java&lt;/a&gt;. The book specifically states that it's not meant for beginners, and won't cover basic programming concepts, but for some reason I thought I could work through it regardless. Much of the book didn't make sense to me, and I quickly got discouraged and almost dropped programming altogether. Instead though, I googled around a bit and found that many people recommended Python as a good first language to learn, due to its vibrant community, relatively natural syntax, and beginner-friendly content. I decided to try again, this time with Python.&lt;/p&gt;
&lt;p&gt;One of the resources I found that was recommended for learning Python was &lt;a href="https://learnpythonthehardway.org/"&gt;Learn Python the Hard Way&lt;/a&gt;, by Zed Shaw. The book was free to read online (and may still be), so I naturally started there. Alongside the book, I also relied on a website called &lt;a href="https://www.codecademy.com/learn/learn-python"&gt;CodeCademy&lt;/a&gt;, which had a pretty great free course on Python (and it may still be free). Once I had finished these beginner materials though, I quickly ran into the issue of &lt;em&gt;what now&lt;/em&gt;? I couldn't just do tutorials forever, and so I needed to find a new way to challenge myself. I found some people on online forums suggesting coding challenges to force you to try new things, and so I did a few of those, like writing a tip calculator or a pretend store (think like in a video game) or things like that, but I eventually decided to work on a personal project to try something a little larger. I settled on writing a &lt;a href="https://github.com/wbrawner/workout-generator-cli"&gt;workout generator&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After a few months of learning about development, a coworker that had a small business asked if I could help him take his website off of Wix, and reproduce it on another host. This was technically my first paid gig as a developer, and it helped me get my foot in the door to development as a career. The website is no longer live, and I don't have any archives of it, but it was quite simple, basically a static website written in pure HTML/CSS, with minimal JavaScript. I didn't really know what I was doing but I sort of figured it out as I went. Once that project was complete, I knew that I wanted to do that kind of work full time. I had no degree, basically no experience, didn't really know what I was doing, but I was determined to make it happen. I searched all over the job posting sites like Indeed, Monster, and even Craigslist, applying to jobs and offering to accept minimum wage payment if they'd just give me a shot. Eventually, one of the places I applied to gave me an interview for a PHP developer position. I had never written a line of PHP, but after doing a couple of interviews and a basic CSS change to a Ruby on Rails app as a sort of coding challenge, they gave me the position and paid me \$10 an hour for fulltime work. This was my first big break into the tech industry, and really what helped launch my career into development.&lt;/p&gt;
&lt;p&gt;Nearly a year into my first development job, I got a bit arrogant because I'm a quick learner, and felt that I should be paid more. I attempted to negotiate a raise but didn't get as much as I had hoped for, so I lined up another job as a freelancer and left. Over the course of the next few years, I took on several different jobs, doing mostly web development with PHP, but also branching out into Linux system administration from time to time. I wasn't a huge fan of doing web development though, and so I decided to try getting back into Android development. I knew a bit more about general development terms and methodologies, and figured I could try giving it another shot. I worked through a few of the chapters in the Head First Java book, but then switched gears to focus more on Android specifically, by enrolling in a free course by &lt;a href="https://www.udacity.com/course/new-android-fundamentals--ud851"&gt;Udacity&lt;/a&gt; for building Android apps. After completing the course, I built a simple &lt;a href="https://github.com/wbrawner/ngg"&gt;number guessing game&lt;/a&gt; to practice the new skills I had learned. I also went and got the &lt;a href="https://developers.google.com/training/certification/associate-android-developer/"&gt;Associate Android Developer certification&lt;/a&gt; by Google. With a sample of my work, and a new certification, I felt confident enough to take on contract work as an Android developer. I did all sorts of odd jobs, from live wallpapers, to dating apps, and anything in between. Sometimes I was responsible for starting a new project from scratch, and other times I was only hired to do some bug fixes or add a new feature.&lt;/p&gt;
&lt;p&gt;My journey began back in 2015, and now, 4 years later, in 2019, I have started as an Android Engineer at American Express. I still haven't gone to school for computer sciences, but I do take the time on my own to study things like algorithms and data structures and other sorts of topics that I would have otherwise learned there. If I could go back in time, I probably would have tried to find a way to study, because I'm quite certain it would've made my life a lot easier when I was looking for jobs and I would've hopefully made fewer mistakes along the way, but I'm happy to be where I am regardless and I don't really have any major regrets. I would caution anyone who wants to attempt to go down the route I did though, for the very reasons I just stated. You will have a much easier time finding work, keeping work, and negotiating pay if you have a degree. I hear college is also quite a bit of fun for most people.&lt;/p&gt;
&lt;p&gt;If you are unable to go to college though, then please don't hesitate to reach out to me if you have any questions or just need help fixing a bug. I don't have a ton of free time but I would be more than happy to lend a hand to someone who needs it. I owe much of my success to online forums and friends I've made along the way, so I'd be happy to be there for others who need help getting started as well. With that said, best of luck and happy coding!&lt;/p&gt;</content><category term="Updates"/></entry><entry><title>View Your Repositories Remotely with GitWeb</title><link href="https://wbrawner.com/2019/03/24/view-your-repositories-remotely-with-gitweb/" rel="alternate"/><published>2019-03-24T21:21:00-06:00</published><updated>2019-03-24T21:21:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-03-24:/2019/03/24/view-your-repositories-remotely-with-gitweb/</id><summary type="html">&lt;p&gt;If you've been following my blog, you probably saw the post where I outlined my &lt;a href="https://wbrawner.com/2019/02/16/a-simple-self-hosted-git-server/index.html"&gt;personal git server setup&lt;/a&gt;. In it, I showed off the &lt;code&gt;ls&lt;/code&gt; command that I've configured for quickly viewing my repositories remotely. This is quite limited though, in that it only shows me the names of …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you've been following my blog, you probably saw the post where I outlined my &lt;a href="https://wbrawner.com/2019/02/16/a-simple-self-hosted-git-server/index.html"&gt;personal git server setup&lt;/a&gt;. In it, I showed off the &lt;code&gt;ls&lt;/code&gt; command that I've configured for quickly viewing my repositories remotely. This is quite limited though, in that it only shows me the names of the repositories, without any further details or even being able to see the files within the repositories unless I clone them locally. Luckily, there's a much better way to view your repositories remotely, via GitWeb. Better yet, getting up and running is super simple on Ubuntu. In my use case, I'm using Apache, so the first step is to install both packages.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# apt install apache2 gitweb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With the packages installed, we'll need to enable CGI scripts, which are what power GitWeb&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# a2enmod cgi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Next, we'll need to create a virtualhost config for the (sub)domain.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;#&lt;span class="w"&gt; &lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;EOF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/apache2/sites-available/gitweb.conf
&lt;span class="nt"&gt;&amp;lt;VirtualHost&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;*:80&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;ServerName&lt;span class="w"&gt; &lt;/span&gt;gitweb.example.com
&lt;span class="w"&gt;    &lt;/span&gt;DocumentRoot&lt;span class="w"&gt; &lt;/span&gt;/usr/share/gitweb
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;Directory&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;/usr/shar/gitweb&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;Options&lt;span class="w"&gt; &lt;/span&gt;+ExecCGI&lt;span class="w"&gt; &lt;/span&gt;+FollowSymLinks&lt;span class="w"&gt; &lt;/span&gt;+SymLinksIfOwnerMatch
&lt;span class="w"&gt;        &lt;/span&gt;AllowOverride&lt;span class="w"&gt; &lt;/span&gt;All
&lt;span class="w"&gt;        &lt;/span&gt;order&lt;span class="w"&gt; &lt;/span&gt;allow,deny
&lt;span class="w"&gt;        &lt;/span&gt;Allow&lt;span class="w"&gt; &lt;/span&gt;from&lt;span class="w"&gt; &lt;/span&gt;all
&lt;span class="w"&gt;        &lt;/span&gt;AddHandler&lt;span class="w"&gt; &lt;/span&gt;cgi-script&lt;span class="w"&gt; &lt;/span&gt;cgi
&lt;span class="w"&gt;        &lt;/span&gt;DirectoryIndex&lt;span class="w"&gt; &lt;/span&gt;gitweb.cgi
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;/Directory&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/VirtualHost&amp;gt;&lt;/span&gt;
EOF
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;By default, gitweb is going to look for your git repos in &lt;code&gt;/var/lib/git&lt;/code&gt;, so if you've got your repos stored elsewhere, you'll need to open up &lt;code&gt;/etc/gitweb.conf&lt;/code&gt; and set the correct value for the &lt;code&gt;$projectroot&lt;/code&gt; variable there. Once that's all ready to go, make sure you enable the site...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# a2ensite gitweb
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;… and start up Apache.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# systemctl start apache2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;You can then browse to the domain you've configured and you should see a listing of your repos, along with some other helpful information like who was the last person to push a commit, and when.&lt;/p&gt;
&lt;h2&gt;Bonus: Restricting the Site to Authorized Users&lt;/h2&gt;
&lt;p&gt;If you don't want to open up the site to the public, you can restrict it with HTTP Basic Auth. To do so, replace the following lines in the &lt;code&gt;/etc/apache2/sites-available/gitweb.conf&lt;/code&gt; file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;order allow,deny
Allow from all
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;with the following lines:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Order deny,allow
AuthType Basic
AuthName &amp;quot;Restricted Access&amp;quot;
AuthBasicProvider file
AuthUserFile &amp;quot;/path/to/.htpasswd&amp;quot;
Require valid-user
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Don't forget to set up the htpasswd file though:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# htpasswd -c /path/to/.htpasswd your-user
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And that's it! Feel free to reach out if you have any tips on how to make this any better, I'm always on the lookout for new tips and tricks!  &lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>A Simple Self-Hosted Git Server</title><link href="https://wbrawner.com/2019/02/16/a-simple-self-hosted-git-server/" rel="alternate"/><published>2019-02-16T21:19:00-07:00</published><updated>2019-02-16T21:19:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-02-16:/2019/02/16/a-simple-self-hosted-git-server/</id><summary type="html">&lt;p&gt;If you're writing code for any purpose, I sincerely hope you are using some kind of source control. I personally am only really familiar with Git, and as such it is my go-to tool for keeping track of my code. Nowadays, there are plenty of hosts for pushing your code …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you're writing code for any purpose, I sincerely hope you are using some kind of source control. I personally am only really familiar with Git, and as such it is my go-to tool for keeping track of my code. Nowadays, there are plenty of hosts for pushing your code to some remote server to keep it in a safe place, but what if you don't want to do that for some reason? Hosting your own git server is certainly an option, and isn't even all that complicated. In this post, I'm going to detail my home git server setup, which is probably quite a bit simpler than most people's home git server setups, but it suits me fine as I'm the only one who uses it. If you're looking for a more complete solution with a web interface (I'll come back to this point in another post), advanced user management controls, or support for Git LFS, then the solution I propose here won't be sufficient for you, and I'd instead advise you to take a look at some other self-hosted options like &lt;a href="https://about.gitlab.com/"&gt;GitLab&lt;/a&gt; or &lt;a href="https://gitea.io/"&gt;Gitea&lt;/a&gt;, both of which are excellent options that I myself have used in the past on my home server. As for me, I'm content with just the basics over SSH.&lt;/p&gt;
&lt;p&gt;Before we get started, I'll go ahead and cite my source for the inspiration for this setup, the &lt;a href="https://git-scm.com/book/en/v2"&gt;Pro Git&lt;/a&gt; book by Scott Chacon and Ben Straub. There's a lot of great content in there, and it's totally free, so I highly recommend checking it out. I'm also going to be using a simple Debian 9 docker image for the tutorial, and I'd recommend attempting to set up the git server in a similar fashion, using a throway VPS or virtual machine, before attempting to set up a real server to be used as a git server. A simple &lt;a href="https://www.raspberrypi.org/"&gt;Raspberry Pi&lt;/a&gt; is most likely sufficient for this, though I've yet to test that myself. Without further ado, let's begin.&lt;/p&gt;
&lt;h2&gt;Setting up the server&lt;/h2&gt;
&lt;p&gt;I'll start by firing up my test server. I've simply mapped port &lt;code&gt;22&lt;/code&gt; on my local machine to port &lt;code&gt;22&lt;/code&gt; on the Docker container for convenience, but you could map any port you so desire. Note that if you wanted to keep using the docker container afterwards and you wanted to persist any of the data you plan to push to the server, you'd need to set up volumes. Also note that using Docker for this is entirely unnecessary, and I don't actually use it myself on my home git server.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;docker&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;22&lt;/span&gt;:22&lt;span class="w"&gt; &lt;/span&gt;-it&lt;span class="w"&gt; &lt;/span&gt;debian:9&lt;span class="w"&gt; &lt;/span&gt;/bin/bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once that's ready, we can start setting things up. I like to follow the convention that larger hosts such as GitHub have set by using &lt;code&gt;git&lt;/code&gt; as the SSH user. I won't get into setting up HTTP(S) access in this tutorial, as I myself only use git over SSH.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# useradd -md /home/git git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In case your unfamiliar with the above command, it's just adding a user called &lt;code&gt;git&lt;/code&gt; and creating and assigning a home directory for it at &lt;code&gt;/home/git&lt;/code&gt;. This will be the user we connect to the server with, so we can run commands like &lt;code&gt;git clone git@my-server&lt;/code&gt;. With the &lt;code&gt;git&lt;/code&gt; user created, we'll need to set up SSH access.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# mkdir /home/git/.ssh
# chmod 700 /home/git/.ssh
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;OpenSSH is a bit particular about the access for the &lt;code&gt;~/.ssh&lt;/code&gt; directory, thus it'll need to be set to &lt;code&gt;700&lt;/code&gt;, or read/write/execute for the owner of the directory, and no access for anyone else. Next we'll need the &lt;code&gt;authorized_keys&lt;/code&gt; file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;#&lt;/span&gt; touch /home/git/.ssh/authorized_keys
&lt;span class="gh"&gt;#&lt;/span&gt; chmod 600 /home/git/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Remember to set the permissions for the &lt;code&gt;authorized_keys&lt;/code&gt; file as well, to 600, or read/write for the owner, and nothing for anyone else. If you've done this all as the &lt;code&gt;root&lt;/code&gt; user, don't forget to make the owner &lt;code&gt;git&lt;/code&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# chown -R git:git /home/git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, using vim, nano, emacs, echo, or whatever you fancy, add your public key to the &lt;code&gt;/home/git/.ssh/authorized_keys&lt;/code&gt; file. As a side note, If you happen to have multiple people using the git server, and you wanted to have a little more control over who has access to what, you could create different users on the server for each person you wanted to give access to, and then grant access to repos using the Linux filesystem permissions or something along those lines, but I'll defer to te aforementioned Pro Git book, as I myself don't share my private git server with anyone. Back to the topic at hand, we'll need to make sure we've got both the OpenSSH server and Git installed on the machine&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# apt update
# apt install -y openssh-server git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With the necessary packages installed, let's fire up the SSH server.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# service ssh start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, from another machine (or in my example, the host machine), we can check the connection.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;ssh&lt;span class="w"&gt; &lt;/span&gt;git@localhost
The&lt;span class="w"&gt; &lt;/span&gt;authenticity&lt;span class="w"&gt; &lt;/span&gt;of&lt;span class="w"&gt; &lt;/span&gt;host&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;localhost (127.0.0.1)&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;can&lt;span class="s1"&gt;&amp;#39;t be established.&lt;/span&gt;
&lt;span class="s1"&gt;ECDSA key fingerprint is SHA256:6A3OqYSNXdrt8gPNrdpCxSVP8UHKy1QYhOq7wB9120c.&lt;/span&gt;
&lt;span class="s1"&gt;Are you sure you want to continue connecting (yes/no)? yes&lt;/span&gt;
&lt;span class="s1"&gt;Warning: Permanently added &amp;#39;&lt;/span&gt;localhost&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;ECDSA&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;list&lt;span class="w"&gt; &lt;/span&gt;of&lt;span class="w"&gt; &lt;/span&gt;known&lt;span class="w"&gt; &lt;/span&gt;hosts.
Linux&lt;span class="w"&gt; &lt;/span&gt;2caac8f62d55&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;.9.125-linuxkit&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64&lt;/span&gt;
The&lt;span class="w"&gt; &lt;/span&gt;programs&lt;span class="w"&gt; &lt;/span&gt;included&lt;span class="w"&gt; &lt;/span&gt;with&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;Debian&lt;span class="w"&gt; &lt;/span&gt;GNU/Linux&lt;span class="w"&gt; &lt;/span&gt;system&lt;span class="w"&gt; &lt;/span&gt;are&lt;span class="w"&gt; &lt;/span&gt;free&lt;span class="w"&gt; &lt;/span&gt;software&lt;span class="p"&gt;;&lt;/span&gt;
the&lt;span class="w"&gt; &lt;/span&gt;exact&lt;span class="w"&gt; &lt;/span&gt;distribution&lt;span class="w"&gt; &lt;/span&gt;terms&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;each&lt;span class="w"&gt; &lt;/span&gt;program&lt;span class="w"&gt; &lt;/span&gt;are&lt;span class="w"&gt; &lt;/span&gt;described&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;the
individual&lt;span class="w"&gt; &lt;/span&gt;files&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/usr/share/doc/*/copyright.
Debian&lt;span class="w"&gt; &lt;/span&gt;GNU/Linux&lt;span class="w"&gt; &lt;/span&gt;comes&lt;span class="w"&gt; &lt;/span&gt;with&lt;span class="w"&gt; &lt;/span&gt;ABSOLUTELY&lt;span class="w"&gt; &lt;/span&gt;NO&lt;span class="w"&gt; &lt;/span&gt;WARRANTY,&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;extent
permitted&lt;span class="w"&gt; &lt;/span&gt;by&lt;span class="w"&gt; &lt;/span&gt;applicable&lt;span class="w"&gt; &lt;/span&gt;law.
$
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And we're in. Time to set some things up.&lt;/p&gt;
&lt;h2&gt;Customizing the Shell&lt;/h2&gt;
&lt;p&gt;I don't necessarily want full SSH access for my &lt;code&gt;git&lt;/code&gt; user, as I already have another account on the server for myself, so I'm going to restrict the shell for the &lt;code&gt;git&lt;/code&gt; user. Back at the &lt;code&gt;root&lt;/code&gt; shell for the server, I'll set the default shell for the git user to &lt;code&gt;git-shell&lt;/code&gt;. &lt;code&gt;git-shell&lt;/code&gt; is pretty neat, and I'd encourage you to read more about it, but for this tutorial I'll just cover a few of the basics. First, let's set the shell for the &lt;code&gt;git&lt;/code&gt; user.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# usermod -s /usr/bin/git-shell git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, if we attempt to SSH in to the machine again, we should get a different message:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;ssh&lt;span class="w"&gt; &lt;/span&gt;git@localhost
Linux&lt;span class="w"&gt; &lt;/span&gt;2caac8f62d55&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;4&lt;/span&gt;.9.125-linuxkit&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;#1 SMP Fri Sep 7 08:20:28 UTC 2018 x86_64&lt;/span&gt;
The&lt;span class="w"&gt; &lt;/span&gt;programs&lt;span class="w"&gt; &lt;/span&gt;included&lt;span class="w"&gt; &lt;/span&gt;with&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;Debian&lt;span class="w"&gt; &lt;/span&gt;GNU/Linux&lt;span class="w"&gt; &lt;/span&gt;system&lt;span class="w"&gt; &lt;/span&gt;are&lt;span class="w"&gt; &lt;/span&gt;free&lt;span class="w"&gt; &lt;/span&gt;software&lt;span class="p"&gt;;&lt;/span&gt;
the&lt;span class="w"&gt; &lt;/span&gt;exact&lt;span class="w"&gt; &lt;/span&gt;distribution&lt;span class="w"&gt; &lt;/span&gt;terms&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;each&lt;span class="w"&gt; &lt;/span&gt;program&lt;span class="w"&gt; &lt;/span&gt;are&lt;span class="w"&gt; &lt;/span&gt;described&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;the
individual&lt;span class="w"&gt; &lt;/span&gt;files&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/usr/share/doc/*/copyright.
Debian&lt;span class="w"&gt; &lt;/span&gt;GNU/Linux&lt;span class="w"&gt; &lt;/span&gt;comes&lt;span class="w"&gt; &lt;/span&gt;with&lt;span class="w"&gt; &lt;/span&gt;ABSOLUTELY&lt;span class="w"&gt; &lt;/span&gt;NO&lt;span class="w"&gt; &lt;/span&gt;WARRANTY,&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;the&lt;span class="w"&gt; &lt;/span&gt;extent
permitted&lt;span class="w"&gt; &lt;/span&gt;by&lt;span class="w"&gt; &lt;/span&gt;applicable&lt;span class="w"&gt; &lt;/span&gt;law.
Last&lt;span class="w"&gt; &lt;/span&gt;login:&lt;span class="w"&gt; &lt;/span&gt;Sat&lt;span class="w"&gt; &lt;/span&gt;Feb&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;20&lt;/span&gt;:26:16&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;2019&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;from&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;172&lt;/span&gt;.17.0.1
fatal:&lt;span class="w"&gt; &lt;/span&gt;Interactive&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;shell&lt;span class="w"&gt; &lt;/span&gt;is&lt;span class="w"&gt; &lt;/span&gt;not&lt;span class="w"&gt; &lt;/span&gt;enabled.
hint:&lt;span class="w"&gt; &lt;/span&gt;~/git-shell-commands&lt;span class="w"&gt; &lt;/span&gt;should&lt;span class="w"&gt; &lt;/span&gt;exist&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;have&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;and&lt;span class="w"&gt; &lt;/span&gt;execute&lt;span class="w"&gt; &lt;/span&gt;access.
Connection&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;localhost&lt;span class="w"&gt; &lt;/span&gt;closed.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Note these two lines here:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;fatal&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Interactive&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;enabled&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;hint&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;~/&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;shell&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;commands&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;should&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;exist&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;have&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;read&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;execute&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;access&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you take a look at what &lt;code&gt;git-shell&lt;/code&gt; does, it's basically a super limited version of a shell that only allows you to run preconfigured scripts, placed in the &lt;code&gt;~/git-shell-commands&lt;/code&gt; directory. Back as the &lt;code&gt;root&lt;/code&gt; user, let's set this up now.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# mkdir /home/git/git-shell-commands
# chown git:git /home/git/git-shell-commands
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I'm going to be adding a couple of files now so that the &lt;code&gt;git-shell&lt;/code&gt; doesn't seem entirely useless. Anything we place in this directory will be offered to the user as an option to run, so I like to have a couple of convenience scripts in there that provide similar functionality to what a web host would offer.&lt;/p&gt;
&lt;h3&gt;The Special &lt;code&gt;help&lt;/code&gt; Script&lt;/h3&gt;
&lt;p&gt;Upon connection, if you have a script called &lt;code&gt;help&lt;/code&gt; in your &lt;code&gt;~/git-shell-commands&lt;/code&gt; directory, it will be run automatically. This would be a good place to put the names and descriptions of all the available commands the user can run. Here's what my &lt;code&gt;/home/git/git-shell-commands/help&lt;/code&gt; script looks like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env bash&lt;/span&gt;
cat&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;EOF&lt;/span&gt;
&lt;span class="s"&gt;Welcome to the Brawner home private git server. The available commands are listed below:&lt;/span&gt;
&lt;span class="s"&gt;delete [REPOSITORY_NAME]                           - delete a repository&lt;/span&gt;
&lt;span class="s"&gt;ls                                                 - list the repositories&lt;/span&gt;
&lt;span class="s"&gt;mirror [REPOSITORY_URL]                            - create a mirror of a repository on another server&lt;/span&gt;
&lt;span class="s"&gt;new [REPOSITORY_NAME]                              - create a new repository&lt;/span&gt;
&lt;span class="s"&gt;rename [OLD_REPOSITORY_NAME] [NEW_REPOSITORY_NAME] - rename a repository&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If you add that file, make sure to set the permissions on it correctly:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;#&lt;/span&gt; chmod +x /home/git/git-shell-commands/*
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then, when you connect to the server via SSH, you get this:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ssh&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="nv"&gt;@localhost&lt;/span&gt;
&lt;span class="n"&gt;Linux&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;caac8f62d55&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;4.9.125&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;linuxkit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;#1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SMP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Fri&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Sep&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;08&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;UTC&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2018&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;x86_64&lt;/span&gt;
&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;programs&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;included&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Debian&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;GNU&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;Linux&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;system&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;free&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;software&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;exact&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;distribution&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;terms&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;each&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;program&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;described&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;
&lt;span class="n"&gt;individual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;share&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="cm"&gt;/*/copyright.&lt;/span&gt;
&lt;span class="cm"&gt;Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;/span&gt;
&lt;span class="cm"&gt;permitted by applicable law.&lt;/span&gt;
&lt;span class="cm"&gt;Last login: Sat Feb 16 20:28:51 2019 from 172.17.0.1&lt;/span&gt;
&lt;span class="cm"&gt;Welcome to the Brawner home private git server. The available commands are listed below:&lt;/span&gt;
&lt;span class="cm"&gt;delete [REPOSITORY_NAME]                           - delete a repository&lt;/span&gt;
&lt;span class="cm"&gt;ls                                                 - list the repositories&lt;/span&gt;
&lt;span class="cm"&gt;mirror [REPOSITORY_URL]                            - create a mirror of a repository on another server&lt;/span&gt;
&lt;span class="cm"&gt;new [REPOSITORY_NAME]                              - create a new repository&lt;/span&gt;
&lt;span class="cm"&gt;rename [OLD_REPOSITORY_NAME] [NEW_REPOSITORY_NAME] - rename a repository&lt;/span&gt;
&lt;span class="cm"&gt;git&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Instead of having our connection dropped, we've now got this &lt;code&gt;git&amp;gt;&lt;/code&gt; prompt where we can enter commands. We haven't added anything just yet, so let's start with the &lt;code&gt;new&lt;/code&gt; command, so that we can create new repos.&lt;/p&gt;
&lt;h3&gt;Creating New Repositories Remotely&lt;/h3&gt;
&lt;p&gt;Here's what my version of this looks like:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env bash&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a repository name&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Repo &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt; already exists&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

/usr/bin/git&lt;span class="w"&gt; &lt;/span&gt;init&lt;span class="w"&gt; &lt;/span&gt;--bare&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;
/usr/bin/git&lt;span class="w"&gt; &lt;/span&gt;-C&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;config&lt;span class="w"&gt; &lt;/span&gt;http.receivepack&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Successfully created repository &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It's a pretty simple script, but let's run through it just to make sure it's all clear. I first want to make sure that I've gotten a name for the new repository, and exit the script if it's missing.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a repository name&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;If I've got a name for it, then I want to make sure I'm not going to try to create a repository that would conflict with another file or folder on the server. Git does this check itself but I like to customize the error message for myself.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Repo &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt; already exists&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We then create a new empty repository...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/usr/bin/git init --bare &amp;quot;$1.git&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;… and allow for remote push events.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;/usr/bin/git -C &amp;quot;$1.git&amp;quot; config http.receivepack true
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Lastly we echo out a little success message.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;echo &amp;quot;Successfully created repository $1&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Let's add this to the server and give it a shot. Don't forget to add the executable flag to the file, or it won't work.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&amp;gt; new my-repo
Initialized empty Git repository in /home/git/my-repo.git/
Successfully created repository my-repo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We now have an empty git repo we can clone. Back on the host machine, let's give this a clone to see that it's working.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;git@localhost:my-repo
Cloning&lt;span class="w"&gt; &lt;/span&gt;into&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;my-repo&amp;#39;&lt;/span&gt;...
warning:&lt;span class="w"&gt; &lt;/span&gt;You&lt;span class="w"&gt; &lt;/span&gt;appear&lt;span class="w"&gt; &lt;/span&gt;to&lt;span class="w"&gt; &lt;/span&gt;have&lt;span class="w"&gt; &lt;/span&gt;cloned&lt;span class="w"&gt; &lt;/span&gt;an&lt;span class="w"&gt; &lt;/span&gt;empty&lt;span class="w"&gt; &lt;/span&gt;repository.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Awesome! Let's add a file and push it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;my&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;repo&lt;/span&gt;
&lt;span class="n"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;# My Repo - A Git Server Test Repo&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;README&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;
&lt;span class="n"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;README&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;
&lt;span class="n"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;commit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;m&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Add README&amp;quot;&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;commit&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;545&lt;/span&gt;&lt;span class="n"&gt;d3b7&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;README&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;file&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;changed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;insertion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;create&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100644&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;README&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;md&lt;/span&gt;
&lt;span class="n"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;push&lt;/span&gt;
&lt;span class="n"&gt;Counting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;Writing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;objects&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;248&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;248.00&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;KiB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;Total&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;reused&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;delta&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;To&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;localhost&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;my&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;repo&lt;/span&gt;
&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;branch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;master&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Everything seems to be working just fine! We were successfully able to clone, commit, and push. Let's take a look at some of the other commands I like to use on my git server. Creating repos is nice, but it's good to keep track of the ones we have too. For that, I've created the &lt;code&gt;ls&lt;/code&gt; command.&lt;/p&gt;
&lt;h3&gt;Viewing Existing Repos&lt;/h3&gt;
&lt;p&gt;You might think I'm simply wrapping the &lt;code&gt;ls&lt;/code&gt; command that comes built-in, but like any good engineer, I had to overengineer the problem. I don't want to see just any file, I'm looking for git repos. So, here goes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env bash&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;repo&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;/usr/bin/find&lt;span class="w"&gt; &lt;/span&gt;-maxdepth&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-type&lt;span class="w"&gt; &lt;/span&gt;d&lt;span class="w"&gt; &lt;/span&gt;-name&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;*.git&amp;quot;&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/usr/bin/basename&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$repo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;.git&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;done&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;sort
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This one's a bit shorter, and if you've put that in the right place and set the permissions correctly, running it should produce the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&amp;gt; ls
my-repo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We've only got one repo, so the output is a little weak, but you get the idea.&lt;/p&gt;
&lt;h3&gt;Renaming Repositories Remotely&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;my-repo&lt;/code&gt; sounds a bit generic, and this was a test repo, so let's name it accordingly. &lt;code&gt;test-repo&lt;/code&gt; sounds so much better! For this, I've got the &lt;code&gt;rename&lt;/code&gt;command. Here's the script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env bash&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a source repository name&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a destination repository name&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Repo &lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt; already exists&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

mv&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Successfully renamed repository &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt; to &lt;/span&gt;&lt;span class="nv"&gt;$2&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We can break this one down pretty quickly too. We first want to make sure we have the source (or old) repository name...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[[&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;z&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;$1&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;]]&lt;span class="c1"&gt;; then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a source repository name&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="nv"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;… as well as the destination (or new) repository name...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[[&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;z&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;$2&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;]]&lt;span class="c1"&gt;; then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a destination repository name&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="nv"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;… and we don't want to try to rename a repository to an existing repository name...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;[[&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;$2.git&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;]]&lt;span class="c1"&gt;; then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Repo $2 already exists&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="nv"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;… but if that's all good, then we go ahead and rename the directory.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mv &amp;quot;$1.git&amp;quot; &amp;quot;$2.git&amp;quot;
echo &amp;quot;Successfully renamed repository $1 to $2&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I don't like to repeat myself so I exclude the &lt;code&gt;.git&lt;/code&gt; from my repository and just have the script append it for me. Let's give this one a go.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&amp;gt; rename my-repo test-repo
Successfully renamed repository my-repo to test-repo
git&amp;gt; ls
test-repo
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Another successfully working command.&lt;/p&gt;
&lt;h3&gt;Cleaning Up Unneeded/Unwanted Repos&lt;/h3&gt;
&lt;p&gt;With the testing out of the way, it'd be nice to be able to remove this repository. For that, I've got the &lt;code&gt;delete&lt;/code&gt; command.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env bash&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a repository name&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;!&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Repo &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt; doesn&amp;#39;t exist&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

rm&lt;span class="w"&gt; &lt;/span&gt;-rf&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;.git&amp;quot;&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Successfully deleted repository &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I imagine by now this doesn't need much explanation, so I won't get into the details, except to say that I make sure I have a repo name to delete, and make sure that it exists, and then delete it. You could probably make this a bit more advanced by moving it to some sort of trash bin for 30 days before deleting it, but I'm not that cautious with my personal projects and when I decide it's time for something to go, it's time for it to go. Let's clean up this test repo.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git&amp;gt; delete test-repo
Successfully deleted repository test-repo
git&amp;gt; ls
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;h3&gt;Tracking Other Repos&lt;/h3&gt;
&lt;p&gt;Most hosts like GitHub also allow you to mirror other repositories, and that's a feature I tend to use quite a bit myself. To make this easier on my local git server, I use the &lt;code&gt;mirror&lt;/code&gt; script.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/usr/bin/env bash&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please enter a repository URL&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

/usr/bin/git&lt;span class="w"&gt; &lt;/span&gt;clone&lt;span class="w"&gt; &lt;/span&gt;--mirror&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Successfully created a mirror of &lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This one shouldn't need much explanation, so let's give it a run.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mirror&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//github.com/wbrawner/SimpleMarkdown&lt;/span&gt;
&lt;span class="nx"&gt;Cloning&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;into&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;bare&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;repository&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="nx"&gt;SimpleMarkdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="err"&gt;&amp;#39;&lt;/span&gt;&lt;span class="o"&gt;...&lt;/span&gt;
&lt;span class="nx"&gt;remote&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Enumerating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;107&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nx"&gt;remote&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Counting&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;107&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;107&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nx"&gt;remote&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Compressing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;57&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;57&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nx"&gt;remote&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Total&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1832&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;33&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;reused&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;75&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;delta&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pack&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;reused&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1725&lt;/span&gt;
&lt;span class="nx"&gt;Receiving&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1832&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;1832&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m m-Double"&gt;783.26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;KiB&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m m-Double"&gt;638.00&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;KiB&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nx"&gt;Resolving&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;deltas&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;891&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;891&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;
&lt;span class="nx"&gt;Successfully&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;created&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;mirror&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//github.com/wbrawner/SimpleMarkdown&lt;/span&gt;
&lt;span class="nx"&gt;git&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;ls&lt;/span&gt;
&lt;span class="nx"&gt;SimpleMarkdown&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, with mirroring there's an extra step involved. You need to set up a cron job to ensure that your mirrors always stay up-to-date. On most Linux systems, cron should be installed and ready to go. The same is not true for our Docker container though, so we'll need to set that up real quick (and don't forget to persist this should you decide to use the Docker setup permanently).&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# apt install cron
# service cron start
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;With cron ready to go, we can add a line to our crontab with this command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# crontab -eu git
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The line to add is as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;find&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;home&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;maxdepth&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;type&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;quot;*.git&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;do&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;usr&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;git&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt;&lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;remote update; done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Just make sure you've got an empty line after that. This will run through each of your mirrored repositories and pull any updates once per hour.&lt;/p&gt;
&lt;h2&gt;Wrapping Up&lt;/h2&gt;
&lt;p&gt;Congrats, you now have your own private git server! I may write some more posts later about setting up a simple web interface and getting a Git LFS setup to work here as well. Please reach out to me if you see me doing something horribly wrong or inefficient, or if you have other useful scripts that you like to use for your self-hosted git server.&lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>Spring Boot Config Priorities</title><link href="https://wbrawner.com/2019/01/30/spring-boot-config-priorities/" rel="alternate"/><published>2019-01-30T21:18:00-07:00</published><updated>2019-01-30T21:18:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-01-30:/2019/01/30/spring-boot-config-priorities/</id><summary type="html">&lt;p&gt;Recently, while working on a job, I ran into an interesting problem with Spring Boot: the configuration files I had defined using the &lt;code&gt;@PropertySource&lt;/code&gt;annotation were being overridden by the &lt;code&gt;application.properties&lt;/code&gt; file, which I had also defined with a &lt;code&gt;@PropertySource&lt;/code&gt; annotation. Why wasn't Spring prioritizing my configuration files correctly …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Recently, while working on a job, I ran into an interesting problem with Spring Boot: the configuration files I had defined using the &lt;code&gt;@PropertySource&lt;/code&gt;annotation were being overridden by the &lt;code&gt;application.properties&lt;/code&gt; file, which I had also defined with a &lt;code&gt;@PropertySource&lt;/code&gt; annotation. Why wasn't Spring prioritizing my configuration files correctly?&lt;/p&gt;
&lt;p&gt;What I was attempting to accomplish was shipping my &lt;code&gt;jar&lt;/code&gt; with some default configuration options that were mostly tailored for my local development setup, and then being able to specify an external configuration file for staging and production that would override the values accordingly. I got the idea from a project I used from GitHub called &lt;a href="https://github.com/F43nd1r/Acrarium"&gt;Acrarium&lt;/a&gt;, but unfortunately I didn't quite take the time to slow down and understand what was going on before attempting to implement something similar myself.&lt;/p&gt;
&lt;p&gt;I came to the realization that something was wrong because while testing deployments with some docker containers locally, my Spring Boot app was crashing since it couldn't connect to the databse. I spent hours trying to figure out why Spring Boot container couldn't connect to the MySQL container, going as far as installing the MySQL command line client to manually verify that the containers were in fact connected and able to communicate with each other. That of course wasn't the problem, so I took to StackOverflow to find some answers.&lt;/p&gt;
&lt;p&gt;I discovered that you can pass in an argument to the application while running it as a jar, specifically &lt;code&gt;-spring.config.location&lt;/code&gt;, and while it fixed my issue, I wasn't satisfied with this because I still didn't understand what the original problem was, and I wasn't content to just shrug my shoulders and move along. It was only through searching around a bit more that I stumbled upon the Spring Boot documentation page for &lt;a href="https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html"&gt;externalized configuration&lt;/a&gt; when I realized my mistake. If you look towards the bottom of this list, item #15 at the time of writing, is the &lt;code&gt;application.properties&lt;/code&gt; file and following it with one level lower in priority for Spring, is the &lt;code&gt;@PropertySource&lt;/code&gt; annotation configuration files.&lt;/p&gt;
&lt;p&gt;The solution, then, was to rename my &lt;code&gt;application.properties&lt;/code&gt; file to something else, and add that new file inside another &lt;code&gt;@PropertySource&lt;/code&gt; annotation on my &lt;code&gt;Application&lt;/code&gt; class, and problem solved! Yet another case of the problem lying between the chair and keyboard. Had I read through the source a little closer with the Acrarium project, from which I took the inspiration for this setup, I would have noticed that they weren't using the &lt;code&gt;application.properties&lt;/code&gt; file to define overridable defaults, but rather a &lt;code&gt;default.properties&lt;/code&gt; file. Lesson learned here: slow down and read the source, make sure you understand it and can explain what's going on, and then try to imitate it in your own works.&lt;/p&gt;</content><category term="Tutorials"/><category term="Spring Boot"/></entry><entry><title>Using Dockerized MySQL for Local Development</title><link href="https://wbrawner.com/2019/01/24/using-dockerized-mysql-for-local-development/" rel="alternate"/><published>2019-01-24T21:17:00-07:00</published><updated>2019-01-24T21:17:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-01-24:/2019/01/24/using-dockerized-mysql-for-local-development/</id><summary type="html">&lt;p&gt;Working with a database is pretty much a given for most of the projects I've worked on lately, which means that in order to get any work done locally, I've had to install a MySQL server, configure it, add the users and databases for each project, and grant the permissions …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Working with a database is pretty much a given for most of the projects I've worked on lately, which means that in order to get any work done locally, I've had to install a MySQL server, configure it, add the users and databases for each project, and grant the permissions accordingly. Because I didn't want to have to go through the hassle of installing MySQL and then writing a bunch of SQL commands each time I needed to create a database + user with permissions for a new project, I decided to do things a little unorthodox and use Docker instead. The official MySQL Docker image does a lot of the setup for you with just a couple of environment variables, which makes it pretty convenient to quickly get a server up and running without much fuss. Here's how it works:&lt;/p&gt;
&lt;p&gt;You'll first need to pull the MySQL image. I've chosen version 5.7, but you can use any of the versions listed on the &lt;a href="https://hub.docker.com/_/mysql"&gt;Docker Hub page&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker pull mysql/mysql-server:5.7
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This'll probably take a minute while the image is downloaded. While that's downloading, you can optionally set up some nice shortcuts to quickly start and stop the different servers for your apps. Just add this to your shell profile file and I'll break it down in a second. On macOS this would be the &lt;code&gt;~/.profile&lt;/code&gt; file and on Linux it's usually the &lt;code&gt;~/.bashrc&lt;/code&gt; file.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;start-mysql&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;APP_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please provide an argument for APP_NAME&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;docker&lt;span class="w"&gt; &lt;/span&gt;run&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;-d&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;--rm&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;-p&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;3306&lt;/span&gt;:3306&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;MYSQL_ROOT_HOST&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;172&lt;/span&gt;.17.0.1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;MYSQL_DATABASE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;MYSQL_USER&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;MYSQL_PASSWORD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;-v&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;-mysql&amp;quot;&lt;/span&gt;:/var/lib/mysql&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;mysql/mysql-server:5.7
&lt;span class="o"&gt;}&lt;/span&gt;

stop-mysql&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;docker&lt;span class="w"&gt; &lt;/span&gt;stop&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;$(&lt;/span&gt;docker&lt;span class="w"&gt; &lt;/span&gt;ps&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;mysql&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;grep&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;3306&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;cut&lt;span class="w"&gt; &lt;/span&gt;-f1&lt;span class="w"&gt; &lt;/span&gt;-d&lt;span class="s1"&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class="k"&gt;)&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;

dmysql&lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nv"&gt;APP_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-z&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Please provide an argument for APP_NAME&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;mysql&lt;span class="w"&gt; &lt;/span&gt;-h127.0.0.1&lt;span class="w"&gt; &lt;/span&gt;-u&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-p&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$APP_NAME&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The above snippet basically creates three new commands you can run on the command line: &lt;code&gt;start-mysql&lt;/code&gt;, &lt;code&gt;stop-mysql&lt;/code&gt;, and &lt;code&gt;dmysql&lt;/code&gt; (shorter than docker-mysql). In short, &lt;code&gt;start-mysql&lt;/code&gt; and &lt;code&gt;dmysql&lt;/code&gt; take in a parameter called &lt;code&gt;APP_NAME&lt;/code&gt;, which will be used as the database name, user, and password. Obviously this is horribly insecure but it's probably fine for your local development environment. The first couple of lines for each method here:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;APP_NAME=&amp;quot;$1&amp;quot;

if [ -z &amp;quot;$APP_NAME&amp;quot; ]; then
    echo &amp;quot;Please provide an argument for APP_NAME&amp;quot;;
    return 1;
fi
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;... are just checking that the &lt;code&gt;APP_NAME&lt;/code&gt; variable isn't empty, or aborting if it is. Moving on, we can break down the next part of the &lt;code&gt;start-mysql&lt;/code&gt; method. We're going to use docker to run a container image...&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;docker run \
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;... and detach from it once it's started up. You can exclude this flag if you want to keep the logs open while the MySQL server runs (though you could also do that with &lt;code&gt;docker logs -f&lt;/code&gt;):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;-d \
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;We're also going to destroy this container once we stop it. Since the data is persisted outside of the container, there's no need to keep it around:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;--rm \
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;MySQL by default runs on 3306, so we'll need to allow Docker to expose that port to us (though it won't be exposed to the rest of your network unless you've done extra configuration on your computer):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;-p 3306:3306 \
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And then comes the MySQL configuration. This first line allows you to connect to your MySQL server from outside of the Docker network. You see, by default, MySQL will only allow connections from &lt;code&gt;localhost&lt;/code&gt;. Since the MySQL server is technically running on a different server (a VM running on top of your computer), you're not on &lt;code&gt;localhost&lt;/code&gt; anymore, and you'll need to allow connections through the Docker NAT.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;-e MYSQL_ROOT_HOST=172.17.0.1 \
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Next, we set up the default database, user, and password using the &lt;code&gt;APP_NAME&lt;/code&gt; parameter that was passed in earlier for all three values. As I mentioned before, this isn't secure, so please don't do this in production:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;-e MYSQL_DATABASE=&amp;quot;$APP_NAME&amp;quot; \
-e MYSQL_USER=&amp;quot;$APP_NAME&amp;quot; \
-e MYSQL_PASSWORD=&amp;quot;$APP_NAME&amp;quot; \
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Lastly, we configure a volume to persist the data between starts/stops. If your app handles schema creation on startup, or you don't want to persist data between server restarts, then you can skip this line and it'll work just fine. If you ever need to delete this volume, it's just named after the value given for &lt;code&gt;APP_NAME&lt;/code&gt; plus a &lt;code&gt;-mysql&lt;/code&gt; suffix.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;$APP_NAME-mysql&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;lib&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mysql&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;\
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Lastly we tell Docker which container image we want to run.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mysql/mysql-server:5.7
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And voilà, we now have a quick command to start up a MySQL server that is independent of any other servers for other apps we're working on locally. To connect to this server with the command line, you can just use the &lt;code&gt;dmysql&lt;/code&gt; command if you've so chosen to add it, or type it out each time. To connect from your application, say Spring Boot, to a database called "test", your &lt;code&gt;application.properties&lt;/code&gt; file would look as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;spring.datasource.url=jdbc:mysql://localhost:3306/test
spring.datasource.username=test
spring.datasource.password=test
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Finally, the &lt;code&gt;stop-mysql&lt;/code&gt; command does what you would expect, but this is the only of the three that doesn't require any arguments. Since you can only have a single MySQL server running at a time on port 3306, I have chosen to just stop whatever other server I have running in order to start up a new one. &lt;code&gt;stop-mysql&lt;/code&gt; simply finds a MySQL container image running on port 3306 and stops it.&lt;/p&gt;
&lt;p&gt;That is all for now! If you've got other tips and tricks for getting your local development environment set up quickly and painlessly, don't hesitate to reach out to me and share them!&lt;/p&gt;</content><category term="Tutorials"/><category term="Bash"/><category term="Docker"/><category term="MySQL"/></entry><entry><title>Blog Platform Hopping</title><link href="https://wbrawner.com/2019/01/20/blog-platform-hopping/" rel="alternate"/><published>2019-01-20T21:16:00-07:00</published><updated>2019-01-20T21:16:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2019-01-20:/2019/01/20/blog-platform-hopping/</id><summary type="html">&lt;p&gt;Within the community of Linux users and fans, there's a term called "distro hopping", which refers to the act of constantly jumping around between different distributions, or "distros", of Linux. A few examples of popular distributions are Ubuntu, Debian, Red Hat Enterprise Linux (RHEL), or Fedora. Back in the days …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Within the community of Linux users and fans, there's a term called "distro hopping", which refers to the act of constantly jumping around between different distributions, or "distros", of Linux. A few examples of popular distributions are Ubuntu, Debian, Red Hat Enterprise Linux (RHEL), or Fedora. Back in the days when I ran Linux on my desktop as my primary OS, I was very much guilty of distro hopping, having tried out pretty much all of the popular distros at least for a short while. These days I'm using a MacBook as my primary computer, and thus macOS as my primary OS, so I haven't been doing much changing around of my desktop environment, though I have undergone a few changes with my blogging platform over the past couple of years. So I guess you could say I've been blog platform hopping a bit :P&lt;/p&gt;
&lt;p&gt;When I first got started with blogging, my website was originally running on WordPress. WordPress is great as a tool for blogging, but I found that for me personally, it wasn't worth the trouble. You see WordPress powers a lot of the internet. I usually see estimates that vary quite a bit, though they generally say that somewhere around 60-80% of all websites run on WordPress. I think it's safe to say that WordPress is the single most popular website platform for the time being. With this broad popularity comes some pretty great advantages: the tooling, support, and availability of up-to-date tutorials and how-tos for getting things done are all pretty stellar. If you want to do something with WordPress as your backend, odds are someone has already at least started it or you can string a few plugins together to get close to what you need. Is that ideal? Probably not, but if you're on a strict time or cost budget, or don't need much more than a simple company website and/or blog, then WordPress is a great option for you. However, being the most popular platform for websites comes with some drawbacks too. I found that I was constantly having to harden and monitor my site because of countless attempts to hack into it, sometimes causing my whole site to crash or making it difficult to tell which posts of mine were actually interesting and which were just being perused by curious script kiddies. I was also dissatisfied with the performance of WordPress. I was probably a bit overly picky on that one, as the performance was just fine for a blog for just me, with super low legitimate traffic, but it still bothered me. I had often considered building out a single page application to just use my WordPress site as a back end to the super fast &lt;abbr title="Single Page Application"&gt;SPA&lt;/abbr&gt;, but I'm not a huge fan of JavaScript and I get a bit tired of learning some new framework or tool every year because those JS people love to change their minds on what the cool new thing is. Alas, I came upon another solution: static website generation.&lt;/p&gt;
&lt;p&gt;It seems to me like static websites made a bit of a comeback in the past couple of years. With the rise of things like GitHub Pages, I find that today there are almost more static site generators than there are full-blown &lt;abbr title="Content Management Systems"&gt;CMSs&lt;/abbr&gt;. Thus, I turned here to solve my problems. Static sites are by no means unhackable, but they're certainly more difficult to compromise than a database-powered site. Not only that, but the performance is almost always better than that of a typical CMS which sometimes has to make multiple database requests in order to serve up a given page. Static sites aren't perfect either though, and they certainly come with their own drawbacks as well. I began using a tool called &lt;a href="https://jekyllrb.com/"&gt;Jekyll&lt;/a&gt;, which as I understand is the tech powering GitHub pages. Jekyll is a static site generator written in Ruby. I myself know little-to-nothing about Ruby, or its tooling, so I always found the setup a bit clunky and difficult. I also found it a bit annoying that I needed to install a bunch of dependencies like ruby, bundler, and gem to be able to produce my site. These dependencies would go on to just take up space on my computer as I didn't use them for anything else. I didn't really want to get too much into the template engine syntax (I think it's liquid, but don't quote me on that) either, so I ended up just grabbing a pre-existing theme and making minor CSS edits to it. All in all, my site felt sort of generic to me, and certainly not a great showcase of my skills and knowledge. I think it's fairly obvious as well, as I made the switch sometime in late 2017, and had a stark decline in the number of posts I published throughout the rest of 2017 and all of 2018. I decided this needed to change though, so I had to make a choice: either figure out this ruby stuff and get comfortable with building my own unique site with a comfortable composing experience, or drop it altogether and replace it with another blogging platform. I went with the latter.&lt;/p&gt;
&lt;p&gt;Initially, I was planning on just going back to WordPress. The writing experience in WordPress is excellent in my opinion, and I love being able to start a post, save it as a draft, and pick up from any device with an internet browser. I often like to start posts from my phone, usually as just a few bullet points or a couple of sentences to get some ideas in writing, and then elaborate on them once I've got a full keyboard at my disposal. With a static site, this is a bit more cumbersome, as I just have a series of files stored in a git repository, and I don't particularly enjoy trying to manage git repos from my phone. Upon setting up my old WordPress site for reuse however, I discovered that the new Gutenberg writing system from WordPress only supports a limited set of markdown syntax without the use of plugins. On my site, I couldn't even get any of the markdown to be recognized though, so all of my posts looked terrible in their published state. I don't really want to go back and rewrite all of them to use HTML, nor do I really want to bother with attempting to import all of them and verify that the styles are good, so I abandoned this idea. I wasn't thrilled about the maintenance headaches anyways, so I think it was a good choice for me.&lt;/p&gt;
&lt;p&gt;With WordPress out of the picture again, I took a look at &lt;a href="https://blog.getpelican.com/"&gt;Pelican&lt;/a&gt;. Pelican, much like Jekyll, is a static site generator. Unlike Jekyll, Pelican is written in Python. I found this to be quite nice, as Python was the first real programming language I learned and used, and I had a bit of experience with Flask, so I was comfortable with the Jinja templating engine as well. Or so I thought. It's actually been about 3 years since I regularly used Python for anything more than simple scripts, so I quickly found it awkward to do anything meaningful with my templates. Seeing as I don't intend on becoming a full time Python developer, nor do I want to maintain any Python-related code for any reasonable amount of time, I ditched Pelican and moved on. Pelican seems great, and I have no complaints about it, but I'd prefer to use more tools that I use daily if I'm going to be needing to update my site even yearly.&lt;/p&gt;
&lt;p&gt;For the past 2 years or so, my language of choice has been Java. Coming from a background of Python, PHP, and JavaScript, I found typed programming languages refreshing, and compiled ones even more so. I can have my errors checked before I even run my code? Excellent! I'm sure that using Java all day every day for the past 2 years has also contributed to my growing affection for it, as I at least tend to get comfortable with my tools and then don't particularly like to change them much. Since I still wanted to stick with static site generation, I took a look around for a Java-based static site generator. Luckily for me, I found &lt;a href="https://jbake.org/"&gt;JBake&lt;/a&gt;, which, at the time of writing, is still under active development. I was quickly able to put together a site using Thymeleaf as the templating engine, and leaving my posts as they are in markdown, with just a simple search and replace to fix some of the liquid syntax from the Jekyll blog. To be fair, I didn't know even a little about Thymeleaf when I first began, but I was very keen to learn it as it seems to be quite a popular template engine for Java-based websites. I'm glad I did too, as I quickly came to enjoy working with it, and it's been well-worth the investment since I've returned to working as a freelancer. I've landed at least 2 large contracts (large for me at least) so far where knowledge of Thymeleaf was a must. I happily made my own simple theme, that while currently a bit bland, offers me the opportunity to learn and experiment with tech that's more relevant to my career. I plan to spice things up a bit with the design while still maintaining the simplicity where possible, so keep an eye on this space :)&lt;/p&gt;
&lt;p&gt;There's still one more problem I haven't yet discussed with static websites that bothers me a bit - the lack of interactivity. Naturally, since there's no database from which the contents of my posts are served, there's no way to search the posts. On my Jekyll site I had a clever solution that I unfortunately can't take credit for that involved searching through the site's XML feed, though it always felt like a bit of a hack, and a limited one at that, as if I implemented paging in my XML feed, then that would have needed a fair amount of refactoring. Another related issue was the inability to have a contact form. I previously just used a Google form to get around this, but again, it was an ugly hack that to be honest I'm never sure even worked. I have some ideas to get around these two problems, but nothing I've finalized yet. As soon as I come up with something, I'll be sure to publish a post about it though :)&lt;/p&gt;
&lt;p&gt;To wrap things up, I just want to clarify that I think WordPress, Jekyll, Pelican, and JBake are all great solutions to a common problem. There's also nothing wrong with PHP, Ruby, Python, or JavaScript. My decisions to change my blogging platform of choice were based entirely on personal preference, and I don't want anyone to feel like I'm attacking their project or favorite tool or anything like that. I think there's enough tool-shaming in the developer community and it's completely senseless in my opinion. I'll save that rant for another blog post though. Until now, please feel free to reach out to me with your comments, questions, and suggestions. I'd love to hear from you!&lt;/p&gt;</content><category term="Opinions"/></entry><entry><title>Getting More into Blogging</title><link href="https://wbrawner.com/2018/12/01/getting-more-into-blogging/" rel="alternate"/><published>2018-12-01T21:15:00-07:00</published><updated>2018-12-01T21:15:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2018-12-01:/2018/12/01/getting-more-into-blogging/</id><summary type="html">&lt;p&gt;I follow quite a few blogs, podcasts, and YouTube channels related to software engineering, and a common theme I've noticed between several of the producers of the more inspirational content I follow is that they recommend doing something to get yourself out there, be it maintaining a blog, speaking at …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I follow quite a few blogs, podcasts, and YouTube channels related to software engineering, and a common theme I've noticed between several of the producers of the more inspirational content I follow is that they recommend doing something to get yourself out there, be it maintaining a blog, speaking at conferences, starting a podcast, etc. So that's exactly what I plan to do. I haven't had much luck with finding or starting Meetups in my area, and I'm not in the US or Europe so making it to any major conferences is also challenging, which leaves me with blogging and podcasting. The idea of podcasting seems interesting to me, but I'm quite certain that I lack not only the physical equipment but also the time and energy required to produce something that's actually of a decent quality. With that in mind, I plan to put that idea on the back burner for a few years and instead focus on blogging. There are a few things I'm going to try to keep in mind while doing this:&lt;/p&gt;
&lt;h4&gt;Your unique experiences and perspective may bring something new to the table&lt;/h4&gt;
&lt;p&gt;Another idea I've picked up from the people I pay attention to is that you shouldn't be afraid to produce content about a topic that's already got hundreds of other pieces of content in various formats published online. Just because something has already been written or said a hundred times before, doesn't mean that you don't have anything to add. Even if you don't, the way you present the topic you're choosing to create content for may help someone who hasn't yet been helped by some of the existing content out there.&lt;/p&gt;
&lt;h4&gt;Producing content pushes you to truly know the subject&lt;/h4&gt;
&lt;p&gt;I often hear and read that teaching is a great way to truly solidify your knowledge because while you may know &lt;em&gt;how&lt;/em&gt; to do something, you may not necessarily know &lt;em&gt;why&lt;/em&gt; to do it that way, particularly in computer sciences where there are often many different ways to solve a problem or accomplish a task. By pushing yourself to explain a given topic, you force yourself to dig deep and gain a better understanding of it.&lt;/p&gt;
&lt;h4&gt;Producing content allows you to demonstrate expertise&lt;/h4&gt;
&lt;p&gt;As for me, a self-taught developer with only a couple of years of experience at the time of writing, finding creative ways to demonstrate my knowledge is a must. Even if you have a degree and several years of experience, I imagine it's still valuable to produce content to demonstrate your knowledge of a given subject.&lt;/p&gt;
&lt;p&gt;With the above points in mind, I'm going to work towards writing more frequently throughout 2019. I don't want to write too often, as I'm afraid that would diminish the quality of my posts. Instead, I plan to set a personal goal to publish a quality post once a month, for 12 consecutive months. I figure giving myself a month to prepare and publish something should be plenty of time to produce something decent. Perhaps I should also set a simple reward for accomplishing that to encourage myself to keep going forward, like a donut for each time I publish a blog post on-time or a new audiobook or something along those lines. I could do something a little bigger for the 12th post. I'll think of something and edit this post later.&lt;/p&gt;</content><category term="Quick Thoughts"/></entry><entry><title>Testing Your Android Apps for Chromebooks - When You Don't Have One</title><link href="https://wbrawner.com/2018/02/18/testing-your-android-apps-for-chromebooks-when-you-dont-have-one/" rel="alternate"/><published>2018-02-18T21:05:00-07:00</published><updated>2018-02-18T21:05:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2018-02-18:/2018/02/18/testing-your-android-apps-for-chromebooks-when-you-dont-have-one/</id><summary type="html">&lt;p&gt;While I don't have a Chromebook, I recently bought a Samsung Dex, which for those of you who aren't aware of what that is, it basically allows you to take your Samsung phone, dock it, connect a mouse, keyboard, and external monitor, and use the phone as if it were …&lt;/p&gt;</summary><content type="html">&lt;p&gt;While I don't have a Chromebook, I recently bought a Samsung Dex, which for those of you who aren't aware of what that is, it basically allows you to take your Samsung phone, dock it, connect a mouse, keyboard, and external monitor, and use the phone as if it were a desktop computer. Seeing as I still actively develop and use &lt;a href="https://wbrawner.com/2017/08/28/simple-markdown-v0-1-0/"&gt;Simple Markdown&lt;/a&gt;, I wanted to take a look at how I could make it compatible with Dex so that I could give it a go. Much to my surprise, Android emulators have the multi-window functionality built-in. Samsung has provided us with a &lt;a href="http://developer.samsung.com/samsung-dex/testing"&gt;neat little guide&lt;/a&gt; to take a standard emulator and convert it for desktop use, but I'll give you the quick points below.&lt;/p&gt;
&lt;p&gt;Create an emulator based on the Nexus 6P running Android Nougat. Ensure that you have &lt;code&gt;adb&lt;/code&gt; on your &lt;code&gt;PATH&lt;/code&gt;, and open up the terminal. Run the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;adb shell
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This will drop you into the terminal session for your emulator, where you'll run the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;su&lt;/span&gt;
&lt;span class="n"&gt;setenforce 0&lt;/span&gt;
&lt;span class="n"&gt;settings put global enable_freeform_support 1&lt;/span&gt;
&lt;span class="n"&gt;cd /data/local/tmp&lt;/span&gt;
&lt;span class="n"&gt;mkdir permissions &amp;amp;&amp;amp; cd permissions&lt;/span&gt;
&lt;span class="n"&gt;cp -a /system/etc/permissions/* ./&lt;/span&gt;
&lt;span class="n"&gt;sed -e &amp;quot;s/live_wallpaper/freeform_window_management/&amp;quot; android.software.live_wallpaper.xml &amp;gt; freeform.xml&lt;/span&gt;
&lt;span class="n"&gt;mount --bind . /system/etc/permissions&lt;/span&gt;
&lt;span class="n"&gt;stop&lt;/span&gt;
&lt;span class="n"&gt;start&lt;/span&gt;
&lt;span class="n"&gt;reboot&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once the emulator reboots, run your app. Tap the Recent Apps button and you should notice a new icon next to the close button.&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://wbrawner.com/wp-content/uploads/2019/07/freeform_icon.png"&gt;&lt;/p&gt;
&lt;p&gt;Tap that, and your app should launch in freeform mode. Last but not least, you'll need to adjust the view density to get the resolution closer to that of a Chromebook (or Dex). Rotate the emulator into landscape mode and run &lt;code&gt;adb shell&lt;/code&gt; to get into the device's terminal again. From there, run the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;wm density 160
wm size 1080x1920
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, you should be looking at your app as if it were running on a Chromebook! Interestingly enough, I was able to replicate a bug that was plaguing some of my Chromebook users that occurred by resizing the window. Here's a screenshot of Simple Markdown in action:&lt;/p&gt;
&lt;p&gt;&lt;img alt="" src="https://wbrawner.com/wp-content/uploads/2019/07/Simple-Markdown-Freeform.png"&gt;&lt;/p&gt;</content><category term="Quick Thoughts"/></entry><entry><title>Simple Markdown January Updates</title><link href="https://wbrawner.com/2018/01/28/simple-markdown-january-updates/" rel="alternate"/><published>2018-01-28T21:03:00-07:00</published><updated>2018-01-28T21:03:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2018-01-28:/2018/01/28/simple-markdown-january-updates/</id><summary type="html">&lt;p&gt;I barely managed to squeeze these updates into the end of January, despite a busy post-holiday season for me. Simple Markdown is still not polished enough for me to call it a 1.0 release yet, as there are still plenty of rough edges to smooth out, and a few …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I barely managed to squeeze these updates into the end of January, despite a busy post-holiday season for me. Simple Markdown is still not polished enough for me to call it a 1.0 release yet, as there are still plenty of rough edges to smooth out, and a few new features I'd like to add. You can grab the current revision from the &lt;a href="https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown"&gt;Play Store&lt;/a&gt; or the &lt;a href="https://github.com/wbrawner/SimpleMarkdown/releases/tag/v0.3.1"&gt;GitHub releases page&lt;/a&gt;. In this update, version 0.3.1, you can expect the following:&lt;/p&gt;
&lt;h3&gt;tl;dr&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;A couple of new features&lt;/li&gt;
&lt;li&gt;Bug fixes&lt;/li&gt;
&lt;li&gt;Code cleanup&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;New features&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Settings: you are seeing the beginnings of some customization. I'll try to keep things simple with it in the spirit of the app, but I also know that it's nice to have a little control over your apps.&lt;/li&gt;
&lt;li&gt;Auto-save: files are now automatically saved whenever you leave the app. No need to tap the "Save" button any more! Note: this is enabled by default but can be disabled from the settings.&lt;/li&gt;
&lt;li&gt;New files: you can now quickly reset your working file to switch into another file. No need to close and re-open the app any more!&lt;/li&gt;
&lt;li&gt;Auto-capitalization: the editor will automatically capitalize new sentences so you can leave the Shift key in peace!&lt;/li&gt;
&lt;li&gt;Adaptive icon!&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Bug fixes/reliability improvements:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Fixed horizontal scrolling for code blocks. This is disabled by default, since it conflicts with the swipe to view the preview or go back to editing feature. For now, you can quickly enable/disable swiping from the menu by tapping "Lock Swiping", but I hope to make this automatic in the future so you don't have to think about it anymore. I'll be sure to write about it when I've got it :)&lt;/li&gt;
&lt;li&gt;Fixed title setting on opening new files.&lt;/li&gt;
&lt;li&gt;Cleaned up some unneeded/unused code.&lt;/li&gt;
&lt;li&gt;Added more tests to prevent regressions.&lt;/li&gt;
&lt;li&gt;Fixed a bug with physical keyboards where holding down Backspace could cause a crash&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I'm going to continue working on Simple Markdown as I have time, and as always, don't hesitate to reach out to me if you run into any problems or have any suggestions or requests for improving the app! You can get in touch through the &lt;a href="https://wbrawner.com/contact/"&gt;contact page&lt;/a&gt; on my site or from the &lt;a href="https://github.com/wbrawner/SimpleMarkdown/issues"&gt;GitHub issues page&lt;/a&gt;.&lt;/p&gt;</content><category term="Quick Thoughts"/></entry><entry><title>WebView Memory Leak</title><link href="https://wbrawner.com/2017/12/03/webview-memory-leak/" rel="alternate"/><published>2017-12-03T10:18:00-07:00</published><updated>2017-12-03T10:18:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2017-12-03:/2017/12/03/webview-memory-leak/</id><summary type="html">&lt;p&gt;A few months ago, I published an app called &lt;a href="https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown"&gt;SimpleMarkdown&lt;/a&gt;, which, as you can probably guess from the title, is a markdown editor. I had a strange bug that I couldn't quite figure out no matter how much I searched it and eventually I had to put it on the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A few months ago, I published an app called &lt;a href="https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown"&gt;SimpleMarkdown&lt;/a&gt;, which, as you can probably guess from the title, is a markdown editor. I had a strange bug that I couldn't quite figure out no matter how much I searched it and eventually I had to put it on the back burner as I got overwhelmed with work. Gotta pay the bills somehow. Anyways, what was happening was the app would randomly crash due to a memory leak that was happening in the WebView, which is what I use to render the preview of the markdown. I couldn't quite pin what was causing it, but you can see the full stack trace in the &lt;a href="https://github.com/wbrawner/SimpleMarkdown/issues/7"&gt;GitHub issue&lt;/a&gt;. The exception message was as follows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;Activity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wbrawner&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;simplemarkdown&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;view&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;activity&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;MainActivity&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;has&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;leaked&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;IntentReceiver&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;org&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;chromium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;accessibility&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;LollipopBrowserAccessibilityManager$1&lt;/span&gt;&lt;span class="mi"&gt;@9&lt;/span&gt;&lt;span class="n"&gt;a08817&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;was&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;originally&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;registered&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;here&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;you&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;missing&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;call&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;unregisterReceiver&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Naturally, this confused me, as I wasn't registering any IntentReceivers in the Fragment nor in the Activity. This was also a pretty big show stopper, as I myself had lost at least one or two blog posts due to not saving the file before I ran into the crash. I can only imagine how frustrated other users were. I finally had the time to look into this again and I decided that I'd give it another go before just pulling out the preview functionality altogether. I'd rather have a small feature set in a stable app than a feature-packed app that doesn't do the job it sets out to do properly.&lt;/p&gt;
&lt;p&gt;After a little searching, I came across this &lt;a href="https://github.com/vickychijwani/quill/issues/75#issuecomment-241678135"&gt;GitHub issue&lt;/a&gt;, where user vickychijwani was experiencing the same issue in a similar app of his called Quill. He discovered that by removing the WebView from its parent View prior to calling &lt;code&gt;WebView#destroy()&lt;/code&gt;, he no longer experienced the crash. I tested this myself, and sure enough, I'm no longer experiencing the crash myself! In fact, I was able to get through writing this blog post from my tablet using SimpleMarkdown and haven't run into any issues whatsoever. Kudos to you, vickychijwani!&lt;/p&gt;
&lt;p&gt;Just to play it safe, I've added &lt;a href="https://try.crashlytics.com"&gt;Crashlytics&lt;/a&gt; to the next release, so that I can see any and all crashes, and make sure I squash the bug completely. I'll be adding a privacy policy for SimpleMarkdown accordingly. Crashlytics only reports the device, version of Android, and stack trace If this makes you uncomfortable with using SimpleMardown, please feel free to build the app from source (it's not very difficult and you can reach out to me if you need any assistance.)&lt;/p&gt;
&lt;p&gt;Anyways, if you haven't already, &lt;a href="https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown"&gt;check out SimpleMarkdown&lt;/a&gt; and let me know what you think!&lt;/p&gt;</content><category term="Quick Thoughts"/></entry><entry><title>Simple Markdown v0.1.0</title><link href="https://wbrawner.com/2017/08/28/simple-markdown-v0-1-0/" rel="alternate"/><published>2017-08-28T13:55:00-06:00</published><updated>2017-08-28T13:55:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2017-08-28:/2017/08/28/simple-markdown-v0-1-0/</id><summary type="html">&lt;p&gt;In my post on &lt;a href="https://wbrawner.com/2016/09/16/progressive-web-apps/"&gt;Progressive Web Apps&lt;/a&gt;, I opened by saying that I had always wanted to get into Android development but hadn't "taken the time to learn Java and get to it". So, I decided enough is enough and I want to pursue my goals. I recently read through …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In my post on &lt;a href="https://wbrawner.com/2016/09/16/progressive-web-apps/"&gt;Progressive Web Apps&lt;/a&gt;, I opened by saying that I had always wanted to get into Android development but hadn't "taken the time to learn Java and get to it". So, I decided enough is enough and I want to pursue my goals. I recently read through Donn Felker's 5-day newsletter on how to become a World-class developer, and one of the things he recommends is to write an app, even if it's already been done before, to practice and also to have something to put into your portfolio. (Side note: even if you don't want to be an Android dev or even a dev, I'm sure you can get something out of Donn Felker's blog and newsletter. You should definitely &lt;a href="http://www.donnfelker.com/"&gt;check him out&lt;/a&gt;). So, that's exactly what I did. Donn also recommends getting out into the community, whether that be through blogging, Meetups, conferences, whatever. It's not so easy for me to get to Meetups or conferences down here in Mexico, so that leaves me to blog for now.&lt;/p&gt;
&lt;p&gt;As part of an initiative to get myself to blog more often, I decided to write a markdown app. The other markdown apps I tried seemed OK, but they all had a thing or two I just didn't like. Either crashing, having confusing or unappealing interfaces, lacking features, or even sending my personal data back home, I felt the need to come up with my own solution. It's currently in a beta state but I finally feel comfortable sharing it (after rewriting it about 4 times over). I still have plenty to learn and I'm sure there are places in the code that could be simplified or improved, so if you have any suggestions then please share!&lt;/p&gt;
&lt;p&gt;In addition to getting myself to blog a bit more, I also wanted to get some hands-on time with a few popular libraries like RxJava and Dagger, to name a couple. I listen to the &lt;a href="http://fragmentedpodcast.com/"&gt;Fragmented podcast&lt;/a&gt; and recently signed up over at &lt;a href="https://caster.io/"&gt;Caster.io&lt;/a&gt; so I'm always hearing about them but I hadn't yet given them a chance. Another thing I wanted to put into practice was the &lt;abbr title="Model-View-Presenter"&gt;MVP&lt;/abbr&gt; architecture, since &lt;abbr title="Model-View-Controller"&gt;MVC&lt;/abbr&gt; wasn't doing it for me and I really want to work on testing.&lt;/p&gt;
&lt;p&gt;Anyways, please check out the app in the Play Store and give me some feedback :)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/portfolio/simple-markdown/"&gt;Portfolio link&lt;/a&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.wbrawner.simplemarkdown&amp;amp;pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1"&gt;&lt;img alt="Get it on Google Play" class="aligncenter" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Legal notice because laws:&lt;/p&gt;
&lt;p&gt;Google Play and the Google Play logo are trademarks of Google Inc.&lt;/p&gt;</content><category term="Projects and Experiments"/><category term="android"/><category term="open source"/><category term="simple markdown"/></entry><entry><title>Using Git on a Chromebook</title><link href="https://wbrawner.com/2016/09/29/using-git-on-a-chromebook/" rel="alternate"/><published>2016-09-29T20:36:00-06:00</published><updated>2016-09-29T20:36:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-09-29:/2016/09/29/using-git-on-a-chromebook/</id><summary type="html">&lt;p&gt;tl;dr sgit + arc welder = git on chromebook&lt;/p&gt;
&lt;p&gt;Anyone who has used a Chromebook knows the downsides of doing so. As a standard user, there probably aren't many, unless you're an iPhone user or a Microsoft Office user (though even Office has online web app versions of its products). As …&lt;/p&gt;</summary><content type="html">&lt;p&gt;tl;dr sgit + arc welder = git on chromebook&lt;/p&gt;
&lt;p&gt;Anyone who has used a Chromebook knows the downsides of doing so. As a standard user, there probably aren't many, unless you're an iPhone user or a Microsoft Office user (though even Office has online web app versions of its products). As a developer, however, the lack of tools that are easily available is rather disdaining. Now, you can enter dev mode and use crouton, or wipe your Chromebook and replace ChromeOS with Linux, but these have their drawbacks. Using dev mode at all removes the encryption from your device, and, while you can encrypt your chroot if you use crouton, you leave your ChromeOS side completely vulnerable. I am quite a fan of the ChromeOS look and feel so I don't particularly want to do this nor remove it, which is what led me to find another way around this to still get work done. The solution I am presenting allows you to use git on your Chromebook &lt;em&gt;without&lt;/em&gt; needing to tamper with ChromeOS.&lt;/p&gt;
&lt;h2&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;To begin, you'll need the &lt;a href="https://chrome.google.com/webstore/detail/arc-welder/emfinbmielocnlhgmfkkmkngdoccbadn"&gt;ARC Welder&lt;/a&gt; app from the Chrome Web Store. This neat little Google tool allows you to take an Android APK and convert it to a useable Chromebook app. With Google bringing the Play Store to Chromebooks over the course of the next year, this method and that app will both be rather pointless, but for those of us who are too impatient to wait, this is a fine strategy. With that downloaded and added to Chrome, you can then head on over to GitHub and grab the APK for &lt;a href="https://github.com/sheimi/SGit/releases"&gt;SGit&lt;/a&gt;. The reason I get my APKs from there for this process is because the Play Store doesn't allow you to directly download the APKs for the apps you want, and I'm quite certain that extracting the APKs from your device goes against the Terms of Use.  SGit is released under the GPLv3 license, so it's safe to use for our purposes, and it is a fine Android client for git, that supports HTTP. HTTPS, and SSH (as long as your key isn't password-protected) for accessing your repos.&lt;/p&gt;
&lt;h2&gt;Converting the App&lt;/h2&gt;
&lt;p&gt;Now that you have the resources, it's time to convert the APK into a format that the Chromebook can use. Fire up the ARC Welder and add the APK for SGit. All of the default settings will work perfectly fine except for the last. Click on the field that says Additional Metadata and enter the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;{&amp;quot;enableExternalDirectory&amp;quot;: true}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This will allow the app to access your Chromebook's files, because by default, it is in a sort of container, isolated from the rest of your system.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-29-at-8.32.11-PM.png"&gt;&lt;img alt="A screenshot of the ARC Welder app with the settings filled in to make the SGit app work on a Chromebook" class="size-medium wp-image-334" height="300" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-29-at-8.32.11-PM.png" width="164"&gt;&lt;/a&gt; The settings for the ARC Welder to get SGit working&lt;/p&gt;
&lt;p&gt;From there, go ahead and download the zip file for this. You might be prompted to select a folder here. If so, then select one that you would want to share with the app. I personally select my entire downloads folder. Once you've saved the zip file, go and unzip it somewhere that will be easy for you to find (just not in your Google Drive or any other cloud storage). Now it's time to install the app.&lt;/p&gt;
&lt;h2&gt;Installation&lt;/h2&gt;
&lt;p&gt;Navigate over to &lt;a href="chrome://extensions"&gt;&lt;/a&gt;. Up in the top right corner, you'll see a checkbox that says Developer Mode. If you don't already have this checked, do so now.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-30-at-5.49.53-PM.png"&gt;&lt;img alt="The developer mode checkbox" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-30-at-5.49.53-PM.png"&gt;&lt;/a&gt; The developer mode checkbox&lt;/p&gt;
&lt;p&gt;After you've checked that, you'll want to click on the "Load unpacked extension" button, and open the folder where you unzipped the app.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-30-at-5.51.53-PM.png"&gt;&lt;img alt="The &amp;quot;Load unpacked extensions&amp;quot; button" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-30-at-5.51.53-PM.png"&gt;&lt;/a&gt; The "Load unpacked extension" button&lt;/p&gt;
&lt;p&gt;You should now see SGit in both your apps and the extension list below. Fire it up and you're ready to go&lt;img alt="" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-10-02-at-1.02.43-PM.png"&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-10-02-at-10.11.06-AM.png"&gt;&lt;img alt="A screenshot of me demonstrating the ability of SGit to clone a git repo on a Chrome OS device" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-10-02-at-10.11.06-AM.png"&gt;&lt;/a&gt; You can clone a repo with HTTP/HTTPS or SSH (as long as your private key isn't password-protected)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-10-02-at-1.02.43-PM.png"&gt;&lt;img alt="A screenshot of the various git operations that SGit can perform" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-10-02-at-1.02.43-PM.png"&gt;&lt;/a&gt; SGit can handle pretty much any git operation you need.&lt;/p&gt;
&lt;h2&gt;Extras&lt;/h2&gt;
&lt;p&gt;Having your code available is nice, but being able to work with it is even better. For this, I am a huge fan of &lt;a href="https://chrome.google.com/webstore/detail/caret/fljalecfjciodhpcledpamjachpmelml?hl=en"&gt;Caret&lt;/a&gt; (there is also a neat fork of it called &lt;a href="https://chrome.google.com/webstore/detail/caret-t/agiednhnlghobdgpgfdnbdaflnngmoij?hl=en"&gt;Caret-T&lt;/a&gt;). I myself use it (sometimes even from my Linux box) and highly recommend it. Editing code isn't everything though - you also need to be able to test it. While you won't be able to run any PHP or Ruby with this tool, you can do front end development and even full AngularJS apps. It's called &lt;a href="https://chrome.google.com/webstore/detail/web-server-for-chrome/ofhbbkphhbklhfoeikjpcbhemlocgigb?hl=en"&gt;Web Server for Chrome&lt;/a&gt;, and it gives you a basic, easy to configure server to run HTML, CSS, and JS. I also personally use this to do front end work.&lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>Say Time for Chrome</title><link href="https://wbrawner.com/2016/09/26/say-time-for-chrome/" rel="alternate"/><published>2016-09-26T19:20:00-06:00</published><updated>2016-09-26T19:20:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-09-26:/2016/09/26/say-time-for-chrome/</id><summary type="html">&lt;h2&gt;tl;dr - &lt;a href="https://chrome.google.com/webstore/detail/say-time-for-chrome/nfjdpimjabiocgdnlmdonmcdimhbfjhg"&gt;Say Time for Chrome in the Chrome Web Store&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the features of macOS that I really appreciate is the ability to have the Mac announce the hour. I find it incredibly helpful to stay on schedule and keep track of time. Unfortunately, on Windows and Linux …&lt;/p&gt;</summary><content type="html">&lt;h2&gt;tl;dr - &lt;a href="https://chrome.google.com/webstore/detail/say-time-for-chrome/nfjdpimjabiocgdnlmdonmcdimhbfjhg"&gt;Say Time for Chrome in the Chrome Web Store&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;One of the features of macOS that I really appreciate is the ability to have the Mac announce the hour. I find it incredibly helpful to stay on schedule and keep track of time. Unfortunately, on Windows and Linux, this isn't as simple to set up. On Windows, the only method I have found involves using Windows Task Scheduler to run a VBScript/PowerShell script/.bat file/.exe file, which can be a nuisance and in my experience doesn't work very well and isn't convenient to configure (I don't really care to have the hour announced at 2am). On Linux, you can use the saytime package, though I'm not sure it's available on all distros, so you could use the espeak package, combined with the date package, and come up with a cron job that runs on your preferred intervals, which isn't so bad but still a bit of an inconvenience to set up. To make things simpler for those of us who aren't on macOS, I wrote a Chrome extension to do just that!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/screenshot-e1474934985410.png"&gt;&lt;img alt="Say Time for Chrome configuration in the extensions menu for Chrome" src="https://wbrawner.com/wp-content/uploads/2016/09/screenshot-e1474934985410.png"&gt;&lt;/a&gt; A screenshot of the configuration options&lt;/p&gt;
&lt;p&gt;&lt;a href="https://chrome.google.com/webstore/detail/say-time-for-chrome/nfjdpimjabiocgdnlmdonmcdimhbfjhg"&gt;Say Time for Chrome&lt;/a&gt; allows you to quickly and easily configure your computer to announce the hour to you, every hour. At the moment, it's only working in English, though if there is demand for it, I would be more than happy to implement other languages as well (provided they are supported by Chrome's TTS API. If you try it out, please give me some feedback on how to improve it, and report any bugs you find! This is only version 0.1.0 so I hope to make it something very useful someday! Right now this extension is close-sourced, though I plan to open-source it as soon as I have time to clean up the code and add comments to ensure that it all makes sense.&lt;/p&gt;</content><category term="Projects and Experiments"/><category term="chrome"/><category term="chrome extension"/><category term="weekend projects"/></entry><entry><title>Progressive Web Apps</title><link href="https://wbrawner.com/2016/09/16/progressive-web-apps/" rel="alternate"/><published>2016-09-16T23:46:00-06:00</published><updated>2016-09-16T23:46:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-09-16:/2016/09/16/progressive-web-apps/</id><summary type="html">&lt;p&gt;For the longest time, I've wanted to get into Android development. While I haven't yet taken the time to learn Java and get to it, I have been looking into progressive web apps. They're actually rather exciting. Essentially, they seek to make web apps feel like native apps, to improve …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For the longest time, I've wanted to get into Android development. While I haven't yet taken the time to learn Java and get to it, I have been looking into progressive web apps. They're actually rather exciting. Essentially, they seek to make web apps feel like native apps, to improve the user experience and increase conversions. I'm not really selling anything but I do like to provide a positive user experience to anyone who is interested in what I have to say, so I've taken the time to set this up. I'll go over a couple of steps I took to make my &lt;a href="https://interval-timer.wbrawner.com/"&gt;interval timer app&lt;/a&gt; a progressive web app.&lt;/p&gt;
&lt;p&gt;Before I get into that though, I'd like to show some examples of how it works. You can of course click on the link to see it in action, but here's the summary:&lt;/p&gt;
&lt;h2&gt;The Design&lt;/h2&gt;
&lt;p&gt;I tried to make look and feel as much like a native app as possible. I'm a huge fan of the Material Design theme in case you hadn't already noticed, so that was what I decided to go with in making this app.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-174316.png"&gt;&lt;img alt="The main app view" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-174316.png"&gt;&lt;/a&gt; The main app view&lt;/p&gt;
&lt;p&gt;Now here I had already opened the app and even configured a timer. If I were a first-time visitor, however, I would be prompted to add the "app" to my home screen for easy access.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-180259.png"&gt;&lt;img alt="A popup on the screen prompts the user to add the app to their home screen" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-180259.png"&gt;&lt;/a&gt; The add to home screen callout&lt;/p&gt;
&lt;p&gt;On Android, this integrates quite nicely. As you can see from the first screenshot, the Chrome address bar isn't visible any longer, so it looks and feels like a native app.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-180309.png"&gt;&lt;img alt="A screenshot of the home screen of an Android device shows the saved app's icon" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-180309.png"&gt;&lt;/a&gt; The app icon saved to the home screen&lt;/p&gt;
&lt;h2&gt;The Functionality&lt;/h2&gt;
&lt;p&gt;Another important distinction between web apps and native apps is that native apps can of course be run whether or not you have an internet connection. Some apps require an internet connection to actually serve you any content, but you can still open them up and use some limited functionality. The same is true of this interval timer app, which allows you to open and run it even if you are in airplane mode or have no internet connection.&lt;/p&gt;
&lt;p&gt;Native apps can also send you push notifications if you permit it. This simple interval timer app has no need for push notifications, so I didn't bother to implement them. My blog, however, can send you push notifications for each new post that I publish if you subscribe to it, so you can see those in action from here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-182021.png"&gt;&lt;img alt="A screenshot of an Android phone lock screen shows a notification of a new post from my blog" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot_20160920-182021.png"&gt;&lt;/a&gt; A notification of a new post on Android&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-20-at-6.18.01-PM.png"&gt;&lt;img alt="A screenshot of a desktop notification from my blog tor the same new post" src="https://wbrawner.com/wp-content/uploads/2016/09/Screenshot-2016-09-20-at-6.18.01-PM.png"&gt;&lt;/a&gt; These notifications work on desktop browsers as well.&lt;/p&gt;
&lt;h2&gt;The Why&lt;/h2&gt;
&lt;p&gt;You might be asking yourself why this matters. The simple answer is user engagement. Take, for instance, an eCommerce shop that runs an online store but has no native mobile apps. By improving the design to be simpler and more user-friendly, you're certain to increase your conversion rates because potential customers are much more likely to buy from your store if it's easy to use. Using the offline capabilities of the app will allow you to store static assets like CSS and JS files, as well as images, to improve site loading times. Faster site loading times also increase conversion rates so the faster your site loads for the customer, the more likely they are to buy from you. Lastly, by implementing push notifications, you can alert your customers instantly to new products, sales, blog posts, you name it. Getting a push notification will make them more likely to visit your store, and more traffic will also inevitably lead to more conversions. The bottom line: progressive web apps increase conversions. But don't take my word for it, read &lt;a href="https://developers.google.com/web/showcase/2016/pdfs/flipkart.pdf"&gt;Google's case study of Flipkart&lt;/a&gt;, an Indian company who increased their conversion rate by 70% by implementing progressive web app techniques.&lt;/p&gt;
&lt;h2&gt;The How&lt;/h2&gt;
&lt;p&gt;At the core, this technology is powered by &lt;a href="https://developers.google.com/web/fundamentals/primers/service-worker/?hl=en"&gt;Service Workers&lt;/a&gt;.  Service workers are registered to the users browser on the first time they visit the page, initializing the connection. This is how the cache is set up, which allows for offline viewing and increases the page loading speed. I personally read through &lt;a href="https://developers.google.com/web/fundamentals/getting-started/your-first-offline-web-app/?hl=en"&gt;Google's tutorial on them&lt;/a&gt; to get started with mine. You can go through the whole tutorial step-by-step to get a good idea of how they work, or do as I did and just jump around to get the pieces that you need. Everyone has their own learning styles so do what suits you best. Feel free to &lt;a href="https://github.com/wbrawner/interval-timer/blob/master/sw.js"&gt;take a look at my example&lt;/a&gt; (and please provide tips on how to improve it if you see anything), as the whole project is open source. I just went for simplicity, caching the core assets on installation and then adding anything to the cache if it was missed initially.&lt;/p&gt;
&lt;p&gt;For adding the app to the home screen, no code is required, unless you'd like to display a popup to your users inviting them to do add the app. This is because the actual action of adding the app to the home screen falls to the device's browser. Matteo Spinelli has created a &lt;a href="https://github.com/cubiq/add-to-homescreen"&gt;nice little library&lt;/a&gt; for creating this popup, which I made use of, and it's under the MIT license so you are free to do with it as you please. In order to set the icons that will be used for each device, you have to make use of various meta tags in the header. I recommend using the &lt;a href="http://realfavicongenerator.net/"&gt;Favicon Generator&lt;/a&gt;, as it really makes the entire process as simple as it can get, for Android, iOS, and Windows Phone icons. It even generates the code for you so it's really a no-brainer.&lt;/p&gt;
&lt;h2&gt;Wrapping It Up&lt;/h2&gt;
&lt;p&gt;If you're interested in learning more about progressive web apps, I'd take a look at &lt;a href="https://developers.google.com/web/progressive-web-apps/"&gt;Google's articles on them&lt;/a&gt;. They have a bit more in-depth resources as well as some pretty good tutorials and actual code on how to make your own progressive web app. For my blog, I'm running WordPress, there are a few extensions that I made use of to set up &lt;a href="https://wordpress.org/plugins/chrome-push-notifications/"&gt;push notifications&lt;/a&gt;, &lt;a href="https://wordpress.org/plugins/offline-shell/"&gt;offline caching of static assets&lt;/a&gt;, and the &lt;a href="https://wordpress.org/plugins/official-add-to-homescreen/"&gt;add to home screen callout&lt;/a&gt; (also by Matteo Spinelli). If none of these solutions work for you, it's never a bad time to hire a freelancer to get the job done for you :)&lt;/p&gt;
&lt;p&gt;If you're into the Material Design as much as I am, you can also take a look at &lt;a href="https://material.google.com/style/color.html#"&gt;Google's Material Design Color Palettes&lt;/a&gt; and this neat &lt;a href="https://www.materialpalette.com/"&gt;Material Design Color Palette Generator&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Got any tips and tricks about progressive web apps? Please share in the comments section below or from the &lt;a href="https://wbrawner.com/contact/"&gt;Contact page&lt;/a&gt;!&lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>Vim and Vundle</title><link href="https://wbrawner.com/2016/09/16/vim-and-vundle/" rel="alternate"/><published>2016-09-16T23:03:00-06:00</published><updated>2016-09-16T23:03:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-09-16:/2016/09/16/vim-and-vundle/</id><summary type="html">&lt;p&gt;For the longest time, I have neglected to put my vim configuration under some sort of version control. I suppose it's not been a top priority for me to maintain the configuration that I've taken so much care to set up until now. Since I started using vim about a …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For the longest time, I have neglected to put my vim configuration under some sort of version control. I suppose it's not been a top priority for me to maintain the configuration that I've taken so much care to set up until now. Since I started using vim about a year ago, I've really only kept my configuration, along with the plugins that I like, stored on a backup drive and on my server. This is of course not the greatest set up. I admittedly haven't been using vim as much lately because I've sort of viewed it as inferior to the likes of PHPStorm or even SublimeText. Curiosity got the best of me though, and I decided to do some research into whether or not vim could handle some of the functions that my GUI code editors can. To my surprise, vim is more than capable of handling all the tasks I currently use the other editors for, and even has a few goodies that I didn't think of.&lt;/p&gt;
&lt;p&gt;I do primarily PHP development, so that's my primary concern when it comes to using a code editor. I stumbled upon &lt;a href="http://blog.joncairns.com/2012/05/using-vim-as-a-php-ide/"&gt;this article by Jon Cairns&lt;/a&gt; where he outlines several good plugins for vim directed to PHP devs. I didn't decide to use all of the ones he listed, though I did grab more than half because they are fantastic. In addition to those, I have a few others that I like. Here's the list (in no particular order):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/VundleVim/Vundle.vim"&gt;VundleVim/Vundle.vim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/scrooloose/nerdtree"&gt;scrooloose/nerdtree&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Xuyuanp/nerdtree-git-plugin"&gt;Xuyuanp/nerdtree-git-plugin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jiangmiao/auto-pairs"&gt;jiangmiao/auto-pairs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/alvan/vim-closetag"&gt;alvan/vim-closetag&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/shawncplus/phpcomplete.vim"&gt;shawncplus/phpcomplete.vim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/joonty/vim-phpqa"&gt;joonty/vim-phpqa&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ervandew/supertab"&gt;ervandew/supertab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/StanAngeloff/php.vim"&gt;StanAngeloff/php.vim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kien/ctrlp.vim"&gt;kien/ctrlp.vim&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To manage all of these, I grabbed Vundle, which is what Jon Cairns mentions in his article. I must say, I am quite impressed. If you're interested in getting started with Vundle, take a look at &lt;a href="https://github.com/VundleVim/Vundle.vim#quick-start"&gt;their Readme on their GitHub page&lt;/a&gt;. The instructions there are really self-explanatory and easy to follow. I got myself set up with Vundle, and added my favorite plugins to my .vimrc. Once I had that taken care of, I cleaned up my .vim folder to remove all of the plugin files, added my .vimrc file to my .vim folder, initialized it as a git repo, and pushed up to GitLab. Now, whenever I need to move my vim configuration to a new machine, I'm only 3 commands away from getting my favorite setup going:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;git clone --recursive https://gitlab.com/billybrawner/vim.git ~/.vim
ln -s .vim/.vimrc
vim +PluginInstall +qall
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This pulls down my configuration, moves it to where vim can find it, and installs all of my favorite plugins. I also have all the other benefits of having it under version control like being able to revert changes that I don't end up liking and having safe backups elsewhere. Given my newly-discovered set of tools and easy-to-manage/setup configuration, I've decided to give vim another shot as my main editor.&lt;/p&gt;
&lt;p&gt;If you'd like to check out my vim setup, you can see it at &lt;a href="https://gitlab.com/billybrawner/vim.git"&gt;https://gitlab.com/billybrawner/vim.git&lt;/a&gt;. If you have any other neat vim tips and tricks, or know of any awesome plugins (particularly related to PHP/WordPress/Magento development), please share them in the comments!&lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>Recent Downtime</title><link href="https://wbrawner.com/2016/06/28/recent-downtime/" rel="alternate"/><published>2016-06-28T23:22:00-06:00</published><updated>2016-06-28T23:22:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-06-28:/2016/06/28/recent-downtime/</id><summary type="html">&lt;p&gt;A week ago I had a bit of downtime, because I decided to switch hosts. Previously, I was using DigitalOcean, with a droplet running Ubuntu 14.04. I paid \$10 a month for a 30GB SSD, 1 CPU core, and 1GB of RAM. This used to be alright for me …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A week ago I had a bit of downtime, because I decided to switch hosts. Previously, I was using DigitalOcean, with a droplet running Ubuntu 14.04. I paid \$10 a month for a 30GB SSD, 1 CPU core, and 1GB of RAM. This used to be alright for me, because I was just running this website, which doesn't really get a lot of traffic. Recently however, this hadn't quite sufficed. I've been really researching the best way to move some of my work to the cloud. Ideally, I'd like to have a separate server for this, but in the meantime, I've been testing out different methods to do so here, and I'm using up too many resources to be able to run both this website and my tests. Because of this, I went ahead and switched over to Linode. With Linode, I get 24GB SSD storage, a 1 core CPU, and 2 GB of RAM at the same price. For me, having a bit more RAM was more important than the 6GB of storage that I lost. I'm nowhere near the limit anyways, so for now, this will do.&lt;/p&gt;
&lt;p&gt;The VPS host wasn't the only thing I changed, however. As I stated earlier, the DigitalOcean droplet I was on ran Ubuntu 14.04. I decided that I wanted to learn more enterprise-oriented Linux distributions, so I went for CentOS. Not only that, but I wanted more stability and a longer support cycle. So, I've noticed a few things that have broken in the migration, but if you happen to come across something that I've missed, please use the contact form to send me a message and let me know. I would greatly appreciate it.&lt;/p&gt;</content><category term="Updates"/></entry><entry><title>Geeko in the Terminal!</title><link href="https://wbrawner.com/2016/06/10/geeko-in-the-terminal/" rel="alternate"/><published>2016-06-10T01:12:00-06:00</published><updated>2016-06-10T01:12:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-06-10:/2016/06/10/geeko-in-the-terminal/</id><summary type="html">&lt;p&gt;In this mini-tutorial, I'm going to show you how to customize the prompt to have a colorful Geeko greet you each time you open up the terminal. For someone who spends the majority of their day in the terminal like myself, it's fun to customize it. I personally use zsh …&lt;/p&gt;</summary><content type="html">&lt;p&gt;In this mini-tutorial, I'm going to show you how to customize the prompt to have a colorful Geeko greet you each time you open up the terminal. For someone who spends the majority of their day in the terminal like myself, it's fun to customize it. I personally use zsh as my shell, but I've also tested this in bash with no troubles whatsoever. To begin, I found an image of Geeko on Google and Googled an image to ASCII art converter. There are plenty of them out there, so find one you like. Copy the output and save that to a file. I've got this here:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;                             __╓╦╦╗▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╦╦╦___     µ╦╦____               
                        &lt;span class="ge"&gt;_╓╗▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╦▓▓▓▓▓▓▓▓▓▓╗╦╦_&lt;/span&gt;        
                   ,╓╗▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩╜╜╜╩▓╦_    
                &lt;span class="ge"&gt;_╗▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╜,╗▓▓▓▄ ╚▓╦   &lt;/span&gt;
&lt;span class="ge"&gt;             _&lt;/span&gt;▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ╫▓▓__╬▌ ▓▓▄  
          ,▄▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╬▓▓▓▓_ⁿ╬▓▓▓╩`╓▓▓▓⌐
         ▄╬▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓_ ⁿ╜╬▓▓╦___╓▓▓▓▓▓▀
       ╓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▄_ ⁿⁿ╜╜╩╩╜╜ⁿ`_⌐
      ▓▓▓▓▓▓▓▓▓╩╜╜╜╙╜╜╩╬▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╦╦╦╗▓▓▓╩  
     ▓▓▓▓▓▓▓╜     ___    ⁿ╚▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩╩╜ⁿ    
    ╓▓▓▓▓▓╜   ╓▓▓▓▓▓▓▓▓╦_   ╙▓▓▓▓▓▓▓▓▓▓╩╩╜╜╜╜╜╩╬▓▓▓▓▓▓▓▓▓▓▓╜ⁿ    &lt;span class="sb"&gt;`ⁿⁿⁿⁿⁿⁿⁿ`&lt;/span&gt;           
    ╠▓▓▓▓▌  ,▓▓▓▓╩╜╜╩╬▓▓▓▓╕   ╫▓▓▓▓▓▓╩`          ⁿ╚▓▓▓▓▓▓▓▓                          
    ╠▓▓▓▓µ  ╠▓▓▓`     ⁿ╬▓▓▓╕   ╫▓▓▓▓▓               ╙▓▓▓▓▓▓                          
    ╚▓▓▓▓▓  ╙▓▓▓▓▓▓▓╦  ⁿ▓▓▓▓   ²╬▓▓▓▓                 ╚▓▓▓▓▓                         
     ╫▓▓▓▓▓   ╙╩▓▓▓▓╜  ╓▓▓▓▓      ⁿ╙╩                   ⁿ╙╩▓▓                        
      ╙▓▓▓▓▓▓__      _▄▓▓▓▓`                                 º                       
       `╚▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓╩ⁿ                                                          
          ⁿ╙╩▓▓▓▓▓▓▓▓▓╩╜ⁿ
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;and I've saved that to a file called suse-lizard that I store in my .config directory. To print it out on each new terminal window/tab, just add&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;echo ~/.config/suse-lizard
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;to your .bashrc (or .zshrc for those of us who use zsh). And you're done!&lt;/p&gt;
&lt;h3&gt;Extra:&lt;/h3&gt;
&lt;p&gt;To get it to print out in color, you can use ASCII escape codes. I won't bother including all of them in here, because you're only a quick Google search from finding them, but you can add this little snippet to your rc file to get your Geeko to be printed out in green:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;IFS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-r&lt;span class="w"&gt; &lt;/span&gt;LINE&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;||&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-n&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="nv"&gt;$LINE&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;do&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-e&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;\033[32m&lt;/span&gt;&lt;span class="nv"&gt;$LINE&lt;/span&gt;&lt;span class="s2"&gt;\e[0m&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;lt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;/home/billy/.config/suse-lizard&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Which gives you an end result of this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wbrawner.com/wp-content/uploads/2016/06/Screenshot-2016-06-09-200815.png"&gt;&lt;img alt="geeko in the terminal" src="https://wbrawner.com/wp-content/uploads/2016/06/Screenshot-2016-06-09-200815.png"&gt;&lt;/a&gt; My terminal output on each new tab/window&lt;/p&gt;
&lt;p&gt;Not too shabby! You could even combine this with some sort of fortune/cowsay combo to get Geeko to give you bits of wisdom on each load!&lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>Deciding on a Linux Distro</title><link href="https://wbrawner.com/2016/05/30/deciding-on-a-linux-distro/" rel="alternate"/><published>2016-05-30T03:03:00-06:00</published><updated>2016-05-30T03:03:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-05-30:/2016/05/30/deciding-on-a-linux-distro/</id><summary type="html">&lt;p&gt;Before I begin my examination of various distros, I'd like to retrace my steps and discuss some of my past experiences with the few distros that I've tried. When I first got into Linux and started using it, I went with Ubuntu 14.04 LTS. All of my Google searches …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Before I begin my examination of various distros, I'd like to retrace my steps and discuss some of my past experiences with the few distros that I've tried. When I first got into Linux and started using it, I went with Ubuntu 14.04 LTS. All of my Google searches pointed to it being the most popular distro with the largest selection of software available and the largest active community. I've also seen it called the "most noob friendly" distro on several occasions. Since then, however, I've tried out multiple other distros and desktop environments, in search of the perfect distro/desktop environment combination for me. Ubuntu was fine but after trying out a few other desktops environments (hereon referred to as DEs), I discovered that I'm not a huge fan of Unity. I'll get to that in a minute though, I want to touch on distros first. For the purposes of this article, I'm going to focus my attention on what I consider to be the three largest players in the Linux world: Ubuntu, Fedora, and openSUSE.&lt;/p&gt;
&lt;p&gt;Ubuntu at its core is really rather nice for a user who doesn't want to spend all day configuring their system. I got started there, and I frequently find myself returning. There's a fantastic community behind it that's really willing and able to help at all times. And as I stated before, if the software you're looking for even exists on Linux, I can almost guarantee you that it's going to be available for Ubuntu. While I like Ubuntu, my curiosity always gets the best of me and I have to branch out and try new things. At first, I started small, trying out only other flavors of Ubuntu. I couldn't stand Kubuntu visually, nor Lubuntu, Xubuntu was alright, and I wasn't a huge fan of Ubuntu GNOME either. Xubuntu was the one I gave the most of a chance to, and after customizing it to my liking, I was actually quite fond of it. Still, I had to satisfy my curiosity, so I moved on to try out other distros. Also, there are a couple of things that concern me a little bit. First off, unlike the other two distros on trial here (as far as I know), Ubuntu is based on another distro (Debian). Both Fedora and openSUSE create their own packages, and don't rely on another distribution to provide them. I see this as a problem because what happens if Debian falls apart? I don't foresee it happening anytime in the near future, but you never know. Also, all three distros are backed by a company: Fedora is backed by Red Hat, openSUSE by SUSE, and Ubuntu by Canonical, yet Canonical is the only of the three that is not profitable. What happens when Canonical disappears or decides to stop supporting Ubuntu? While these may be no more than paranoid complaints, I'd still feel much better about using a distro that had a more stable base and a better guarantee of future success.&lt;/p&gt;
&lt;p&gt;I "tried" Fedora 23, though on my MacBook Pro, I couldn't really get it to work. Installation failed a couple of times, the WiFi didn't work when I finally did get it installed correctly, and I really didn't like GNOME all that much. I maybe tried Fedora for a day or two before giving up and moving on. Looking back, I really didn't give Fedora a fighting chance. But to be honest, I'm not all that interested in it. Compared to Ubuntu, the only thing it has better that I can come up with is the future stability from my point of view. Seeing as Fedora is the base that Red Hat Enterprise Linux builds off of, I don't have to worry about upstream package managers deciding not to carry on their work or disbanding their distro. Also, Red Hat is the most profitable of the three business named in this article, at least from what I can tell. Aside from that, I don't really think there's any benefit to using Fedora over Ubuntu.&lt;/p&gt;
&lt;p&gt;openSUSE is a little bit of a different story for me. First, there's Tumbleweed. I used Arch for a bit and I think the thing I found most appealing about it was the rolling-release update style. I'm not too keen on the idea of having to wipe my computer clean every 2-3 years and do a fresh installation to catch up on the latest software. I'd much rather just install an operating system and go with it until I have to change my computer. And I don't tend to change my computer until I see that the hardware can't keep up with my work load. Of course, for those who do like the scheduled release system, there's always openSUSE Leap. Next up, there's the default DE. Granted, each distro has various different options to choose from when it comes to DEs, but the primary one will always receive the most attention. openSUSE Tumbleweed uses KDE, and all I can say is wow. I was completely blown away by just how nice and modern the latest version of KDE looks. Little goodies like KMail and Konversation that come with it are just icing on the cake. Lastly, there's the fact that openSUSE, much like Fedora, is used as the base from which the enterprise version builds off of. So again, I don't have to worry about issues upstream.&lt;/p&gt;
&lt;p&gt;To wrap things up, I'm quite a fan of openSUSE. I think it's got everything I need to keep me happy, and then some. But, this article is clearly purely subjective. So feel free to comment what your favorite distro is and why. There's nothing wrong with a difference of opinion!&lt;/p&gt;</content><category term="Opinions"/></entry><entry><title>Fresh Starts</title><link href="https://wbrawner.com/2016/05/22/fresh-starts/" rel="alternate"/><published>2016-05-22T04:34:00-06:00</published><updated>2016-05-22T04:34:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-05-22:/2016/05/22/fresh-starts/</id><summary type="html">&lt;p&gt;I have a tendency to play around with my system, which has been both very good and very bad for me. On one hand, I have learned so much from tinkering and inspecting files and breaking things, that I probably would not have otherwise learned. On the other hand, I …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have a tendency to play around with my system, which has been both very good and very bad for me. On one hand, I have learned so much from tinkering and inspecting files and breaking things, that I probably would not have otherwise learned. On the other hand, I do occasionally break the system beyond repair, which requires a fresh start and a couple hours of time to run the installation and follow up with re-setting all of my configurations. Since I tend to do this quite a bit, I figured it would be a good idea to just go ahead and automate this process. I have a small set of programs that I always need, and a small set of configuration files to go with them. By automating the installation and configuration of them, I give myself a lot more free time since I don't have to manage these processes myself. Not to mention, this puts me in a good spot for upgrade time, which is about every 3 years for Debian. Each time a new release comes out, my post-installation setup will only take me about 5 minutes of actual attention required.&lt;/p&gt;
&lt;p&gt;I've split the scripts into two different ones: one is to download the various programs that I want, and the other is to back up my configuration files and store them elsewhere. First, here's the installation script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="c1"&gt;# Set paths for various commands needed in script&lt;/span&gt;
&lt;span class="nv"&gt;APTGET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/apt-get
&lt;span class="nv"&gt;APTKEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/apt-key
&lt;span class="nv"&gt;CHMOD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin/chmod
&lt;span class="nv"&gt;CURL&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/curl
&lt;span class="nv"&gt;DPKG&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/dpkg
&lt;span class="nv"&gt;GROUPADD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/sbin/groupadd
&lt;span class="nv"&gt;HOME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/billy
&lt;span class="nv"&gt;LN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin/ln
&lt;span class="nv"&gt;PHP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/php
&lt;span class="nv"&gt;RM&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin/rm
&lt;span class="nv"&gt;TAR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin/tar
&lt;span class="nv"&gt;TEE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/tee
&lt;span class="nv"&gt;UNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin/uname
&lt;span class="nv"&gt;USERMOD&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/sbin/usermod
&lt;span class="nv"&gt;WGET&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/wget

&lt;span class="c1"&gt;# Fix the sources for apt-get&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;&amp;lt;EOF &amp;gt; /etc/apt/sources.list&lt;/span&gt;
&lt;span class="s"&gt;#&lt;/span&gt;

&lt;span class="s"&gt;# deb cdrom:[Debian GNU/Linux 8.4.0 _Jessie_ - Official amd64 xfce-CD Binary-1 20160402-14:44]/ jessie main&lt;/span&gt;

&lt;span class="s"&gt;#deb cdrom:[Debian GNU/Linux 8.4.0 _Jessie_ - Official amd64 xfce-CD Binary-1 20160402-14:44]/ jessie main&lt;/span&gt;

&lt;span class="s"&gt;deb http://ftp.mx.debian.org/debian/ jessie main non-free contrib&lt;/span&gt;
&lt;span class="s"&gt;deb-src http://ftp.mx.debian.org/debian/ jessie main non-free contrib&lt;/span&gt;

&lt;span class="s"&gt;deb http://security.debian.org/ jessie/updates main&lt;/span&gt;
&lt;span class="s"&gt;deb-src http://security.debian.org/ jessie/updates main&lt;/span&gt;

&lt;span class="s"&gt;# jessie-updates, previously known as &amp;#39;volatile&amp;#39;&lt;/span&gt;
&lt;span class="s"&gt;deb http://ftp.mx.debian.org/debian/ jessie-updates main&lt;/span&gt;
&lt;span class="s"&gt;deb-src http://ftp.mx.debian.org/debian/ jessie-updates main&lt;/span&gt;
&lt;span class="s"&gt;EOF&lt;/span&gt;

&lt;span class="c1"&gt;# Grab some tools needed for Docker install&lt;/span&gt;
&lt;span class="nv"&gt;$APTGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;update
&lt;span class="nv"&gt;$APTGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;apt-transport-https&lt;span class="w"&gt; &lt;/span&gt;ca-certificates&lt;span class="w"&gt; &lt;/span&gt;curl

&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/Downloads

&lt;span class="c1"&gt;# Install Dropbox&lt;/span&gt;
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://www.dropbox.com/download?dl&lt;span class="o"&gt;=&lt;/span&gt;packages/debian/dropbox_2015.10.28_amd64.deb

&lt;span class="c1"&gt;# Install Google Chrome&lt;/span&gt;
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

&lt;span class="c1"&gt;# Install Skype&lt;/span&gt;
&lt;span class="nv"&gt;$DPKG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;--add-architecture&lt;span class="w"&gt; &lt;/span&gt;i386
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://download.skype.com/linux/skype-debian_4.3.0.37-1_i386.deb

&lt;span class="c1"&gt;# Install Atom Editor&lt;/span&gt;
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://atom-installer.github.com/v1.7.3/atom-amd64.deb?s&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="m"&gt;1461858699&lt;/span&gt;

&lt;span class="c1"&gt;# Install Slack&lt;/span&gt;
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://downloads.slack-edge.com/linux_releases/slack-desktop-2.0.6-amd64.deb

&lt;span class="c1"&gt;# Install Moka Icon theme&lt;/span&gt;
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://bitbucket.org/2ion/moka-icon-theme/downloads/moka-icon-theme_201409-1-2_amd64.deb

&lt;span class="c1"&gt;# Install Telegram&lt;/span&gt;
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://updates.tdesktop.com/tlinux/tsetup.0.9.49.tar.xz&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$TAR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-xvf&lt;span class="w"&gt; &lt;/span&gt;tsetup.0.9.49.tar.xz&lt;span class="w"&gt; &lt;/span&gt;-C&lt;span class="w"&gt; &lt;/span&gt;/opt/&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$LN&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="w"&gt; &lt;/span&gt;/opt/Telegram/Telegram&lt;span class="w"&gt; &lt;/span&gt;/usr/bin/Telegram
&lt;span class="nv"&gt;$RM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;tsetup.0.9.49.tar.xz

&lt;span class="c1"&gt;# Install PHPStorm&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;
&lt;span class="nv"&gt;$WGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;https://d1opms6zj7jotq.cloudfront.net/webide/PhpStorm-2016.1.1.tar.gz&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$TAR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-xvf&lt;span class="w"&gt; &lt;/span&gt;PhpStorm-2016.1.1.tar.gz&lt;span class="w"&gt; &lt;/span&gt;-C&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/
&lt;span class="nv"&gt;$RM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;PhpStorm-2016.1.1.tar.gz

&lt;span class="c1"&gt;# Add Spotify to source list&lt;/span&gt;
&lt;span class="nv"&gt;$APTKEY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;adv&lt;span class="w"&gt; &lt;/span&gt;--keyserver&lt;span class="w"&gt; &lt;/span&gt;hkp://keyserver.ubuntu.com:80&lt;span class="w"&gt; &lt;/span&gt;--recv-keys&lt;span class="w"&gt; &lt;/span&gt;BBEBDCB318AD50EC6865090613B00F1FD2C19886
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;deb&lt;span class="w"&gt; &lt;/span&gt;http://repository.spotify.com&lt;span class="w"&gt; &lt;/span&gt;stable&lt;span class="w"&gt; &lt;/span&gt;non-free&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$TEE&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/apt/sources.list.d/spotify.list

&lt;span class="c1"&gt;# Set up Docker Install&lt;/span&gt;
&lt;span class="nv"&gt;$APTKEY&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;adv&lt;span class="w"&gt; &lt;/span&gt;--keyserver&lt;span class="w"&gt; &lt;/span&gt;hkp://p80.pool.sks-keyservers.net:80&lt;span class="w"&gt; &lt;/span&gt;--recv-keys&lt;span class="w"&gt; &lt;/span&gt;58118E89F3A912897C070ADBF76221572C52609D
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;deb https://apt.dockerproject.org/repo debian-jessie main&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;/etc/apt/sources.list.d/docker.list
&lt;span class="nv"&gt;$GROUPADD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;docker
&lt;span class="nv"&gt;$USERMOD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-aG&lt;span class="w"&gt; &lt;/span&gt;docker,sudo&lt;span class="w"&gt; &lt;/span&gt;billy

&lt;span class="c1"&gt;# Install all of the deb packages&lt;/span&gt;
&lt;span class="nv"&gt;$DPKG&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/Downloads/*.deb

&lt;span class="c1"&gt;# Update sources and install other software not already installed along with dependencies for the deb packages&lt;/span&gt;
&lt;span class="nv"&gt;$APTGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;update
&lt;span class="nv"&gt;$APTGET&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-f&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-y&lt;span class="w"&gt; &lt;/span&gt;vim&lt;span class="w"&gt; &lt;/span&gt;tmux&lt;span class="w"&gt; &lt;/span&gt;spotify-client&lt;span class="w"&gt; &lt;/span&gt;git&lt;span class="w"&gt; &lt;/span&gt;openvpn&lt;span class="w"&gt; &lt;/span&gt;zsh&lt;span class="w"&gt; &lt;/span&gt;docker-engine

&lt;span class="c1"&gt;# Install Docker Compose&lt;/span&gt;
&lt;span class="nv"&gt;$CURL&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-L&lt;span class="w"&gt; &lt;/span&gt;https://github.com/docker/compose/releases/download/1.7.1/docker-compose-&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="nv"&gt;$UNAME&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-s&lt;span class="sb"&gt;`&lt;/span&gt;-&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="nv"&gt;$UNAME&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-m&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;/usr/local/bin/docker-compose
&lt;span class="nv"&gt;$CHMOD&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;+x&lt;span class="w"&gt; &lt;/span&gt;/usr/local/bin/docker-compose

&lt;span class="c1"&gt;# Clean up&lt;/span&gt;
&lt;span class="nv"&gt;$RM&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$HOME&lt;/span&gt;/Downloads/*.deb&lt;span class="o"&gt;[&lt;/span&gt;/code&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;For obvious reasons, this script must be run as root or with sudo. This grabs all the basic software I need in addition to the base install to get me up and running for work and play. Next up, for the configuration backup script:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="ch"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="nv"&gt;SCP&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/usr/bin/scp
&lt;span class="nv"&gt;TAR&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/bin/tar

&lt;span class="c1"&gt;# Move to the home dir&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;/home/billy

&lt;span class="c1"&gt;# Create the tar archive of the config files&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Creating tar archive...&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;$TAR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-cjf&lt;span class="w"&gt; &lt;/span&gt;home.tar.bz2&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.atom&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.bashrc&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.config/Atom&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.config/Skype&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.config/Slack&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.config/spotify&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.gitconfig&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.PhpStorm2016.1&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.purple&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.Skype&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.ssh&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;telegram.desktop&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.TelegramDesktop&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.themes/White&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.vim*&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;.zshrc&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;/etc/openvpn/dh1.c117.sonassihosting.com*

&lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;-eq&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;then&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;OK&amp;quot;&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;FAILED: &lt;/span&gt;&lt;span class="nv"&gt;$?&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;exit&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;

&lt;span class="c1"&gt;# Upload archive to server&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Uploading archive to remote server...&amp;quot;&lt;/span&gt;
&lt;span class="nv"&gt;$SCP&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;home.tar.bz2&lt;span class="w"&gt; &lt;/span&gt;wbrawner@wbrawner.com:
&lt;span class="nb"&gt;echo&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Backup complete&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This is a tad bit shorter, but it basically grabs all the configuration files that I wouldn't want to lose, stores them in a bzipped2 tar archive, and then uploads them to a remote server. When I need to restore them, I simply pull down the tar file and decompress it in my home directory, automatically setting most of my configuration settings. This is not an exhaustive list by any means, and I still need to take some time to find some other configuration files without bloat, such as for Google Chrome for example. This also doesn't grab my configuration for cinnamon, my DE of choice, nor any custom key bindings. I still have a little more to do to perfect it, but this gets about 90% of it for me, so that's good enough for now. I'd also like to modify it a bit to not only manage the backups, but also the restoration.&lt;/p&gt;
&lt;p&gt;So, these are my scripts! Got anything better? Any ideas on how I can improve these? Please share, either in the comments or via email. I love feedback and contructive criticism.&lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>I Just Can't Stay Away From Linux</title><link href="https://wbrawner.com/2016/05/21/i-just-cant-stay-away-from-linux/" rel="alternate"/><published>2016-05-21T17:08:00-06:00</published><updated>2016-05-21T17:08:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-05-21:/2016/05/21/i-just-cant-stay-away-from-linux/</id><summary type="html">&lt;p&gt;Just over a year ago, I downloaded and installed Linux onto my computer for the first time. I wanted to learn to program and I had read that programming on Windows was pretty tough, particularly for newbies, and that Linux would be much easier to get going with, especially considering …&lt;/p&gt;</summary><content type="html">&lt;p&gt;Just over a year ago, I downloaded and installed Linux onto my computer for the first time. I wanted to learn to program and I had read that programming on Windows was pretty tough, particularly for newbies, and that Linux would be much easier to get going with, especially considering I didn't have the money for a Mac at the time. I didn't want to completely remove Windows, because I wasn't sure that I would even like Linux, so I opted for the dual boot setup. I had no idea what I was doing, and I really got lucky because I could have easily wiped my Windows partition on accident and ended up with just Linux.&lt;/p&gt;
&lt;p&gt;My distribution of choice to get started was &lt;a href="http://www.ubuntu.com/"&gt;Ubuntu&lt;/a&gt;. I had done some research on the various distributions and the general consensus seemed to be that Ubuntu was the most popular because it is easy for newbies and has the widest selection of available software. Once I was set up, I found it quite easy to switch back and forth between Windows and Ubuntu. At first, I only really used Ubuntu for development. When I had time to study and practice, then I would switch over to Ubuntu but otherwise I stayed on Windows. Things started to change a little once I started to get involved with the community. I have spent many days browsing the &lt;a href="http://ubuntuforums.org/"&gt;Ubuntu Forums&lt;/a&gt; as well as the dedicated StackOverflow community called &lt;a href="https://askubuntu.com/"&gt;Ask Ubuntu&lt;/a&gt;, either looking for answers to my questions or looking to help out other fellow Linux users. The community was (and still is) easily my favorite aspect of Linux.&lt;/p&gt;
&lt;p&gt;After a few months of learning to code on Linux, I landed my first job as a web developer. I had begun to study Python, HTML, CSS, and a little JavaScript towards the end of March that year, which is exactly the same time I got started on Linux, and by August I was employed as a PHP developer. In that company, everyone used Apple products. iPhones, iPads, iMacs, you name it. I even saw a couple of people with the iWatch. By this time, I had saved up a little and decided to get myself a used MacBook Pro. I was pretty happy with it at first, but as time went on, I found myself missing Linux. I think I used OSX for about two to three months before I found myself back on Linux. This time, however, I decided to give some other distros a try. In the following months, I found myself primarily back and forth between Ubuntu and &lt;a href="https://xubuntu.org/"&gt;Xubuntu&lt;/a&gt;. I used &lt;a href="https://www.opensuse.org/"&gt;openSUSE&lt;/a&gt; and &lt;a href="https://elementary.io/"&gt;elementaryOS&lt;/a&gt; for about a month each, and tested out &lt;a href="https://getfedora.org/"&gt;Fedora&lt;/a&gt;, &lt;a href="https://solus-project.com/"&gt;Solus&lt;/a&gt;, Chromixium (which now goes by the name of &lt;a href="https://cublinux.com/"&gt;Cub Linux&lt;/a&gt;), and &lt;a href="https://www.debian.org/"&gt;Debian&lt;/a&gt; in a virtual machine. I even put together a (somewhat) functional &lt;a href="https://www.archlinux.org/"&gt;Arch Linux&lt;/a&gt; installation, that I used for a couple of months. All are fantastic operating systems, each with their strengths and weaknesses, that I was able to enjoy for a time.&lt;/p&gt;
&lt;p&gt;A little over a month ago, I found myself curious about Windows 10. I'm particularly interested in AI, so having Cortana was very appealing to me. I also grew up on Windows, so a part of me did miss the old programs and games that I used to use. On a flight from the US to Mexico, I was working on some code and accidentally ran a fatal command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo chown -R www-data:www-data /
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;(the / and the . are right right next to each other on the US keyboard layout). This essentially ruined my installation of Ubuntu. I didn't lose any of my data, because I keep good backups and was able to use a live USB to recover the little that wasn't backed up already, but I was so annoyed with myself and with that mistake that I decided to give Windows a try. I have a different laptop now, with only a 128GB drive, so dual booting was not an option. I went all out and re-installed Windows on my machine, replacing Linux. Development on Windows is OK. There are plenty of GUI tools available to help you get the job done, and &lt;a href="https://www.cygwin.com/"&gt;Cygwin&lt;/a&gt; is a decent bash terminal for Windows. I personally found development to be rather stiff and difficult, because I am very much a fan of using the terminal for many tasks, including quick text editing, file management, even downloading some files. I found all of these tasks rather difficult in Windows, and I ran into trouble performing simple actions such as customizing the PowerShell colors. I tried to find a forum and something similar to an IRC channel for Windows users, but such things don't exist, not in the way I was searching for them. I eventually decided that Windows is not for me. I would like to set up a desktop for some casual gaming where I would have Windows installed, but beyond that, I am a Linux user. I just can't stay away from it.&lt;/p&gt;
&lt;p&gt;I now find myself using Debian Jessie, because I wanted to get some more stability. Ubuntu is nice because you can find almost anything you need for it, but it can be quite annoying when you have software that crashes or doesn't install correctly, etc. I need some more stability, since I rely on my computer for work. Besides, I have pretty much everything I can think of that I would like to have on my Debian installation right now, and everything I have is something that I used to have on Ubuntu as well. Not only that, but I prefer Debian's community-led development model over Ubuntu's Canonical-backed development. Sure, being corporately backed guarantees them a steady development cycle and firm decisions, as well as other goodies like an Ubuntu tablet and phones, but Linux is a community-built operating system, and I want to use a community-built and community-led distribution of it. I'm not sure if I will stay on Debian forever, considering that I've only been around Linux for a year now and I'm sure that there are many more distributions I might be interested in, but I am changing my philosophy slightly. I no longer feel the need to try out all sorts of different distributions; I've tried several and know what I like and what I don't. I'm sticking with Debian until I have a solid reason not to.&lt;/p&gt;
&lt;p&gt;I'm also going to start contributing. Linux has changed my life for the better, by enabling me to learn and providing a community of fans that are willing and able to help newbies like myself. It's time I give back and do my part to improve the community. So be on the look out for more posts from me, as I'll be sure to show off my work just a little bit :)&lt;/p&gt;</content><category term="Opinions"/></entry><entry><title>Mysterious Issues on my Site</title><link href="https://wbrawner.com/2016/05/15/mysterious-issues-on-my-site/" rel="alternate"/><published>2016-05-15T03:37:00-06:00</published><updated>2016-05-15T03:37:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-05-15:/2016/05/15/mysterious-issues-on-my-site/</id><summary type="html">&lt;p&gt;For the past couple of weeks, I'd noticed that my site was randomly crashing due to MySQL failing on the server. In case any of you saw it, this is what was causing the "Error establishing connection to database" page (which I will customize for the future when I have …&lt;/p&gt;</summary><content type="html">&lt;p&gt;For the past couple of weeks, I'd noticed that my site was randomly crashing due to MySQL failing on the server. In case any of you saw it, this is what was causing the "Error establishing connection to database" page (which I will customize for the future when I have a spare moment.) This seemed incredibly odd to me because my site is very low traffic, so it shouldn't be having issues like this. I had recently installed the Jetpack plugin for WordPress, and shortly after that, I started noticing all of my problems. As a result, I mistakenly blamed the plugin for my woes and immediately removed it. The problems persisted, however, which led me to do some research. At first glance, many blog authors and commenters suggested simply increasing the memory on the server. Considering that 30 hits in a single day is quite an accomplishment for me at this time, I didn't think that was the case, and I wasn't about to start paying more on my server bill if it wasn't completely necessary.&lt;/p&gt;
&lt;p&gt;Luckily for me, DigitalOcean has a fantastic support community where people can ask and answer questions related to everything a SysAdmin would need to know, and &lt;a href="https://www.digitalocean.com/community/questions/unsolveable-epic-mysql-crashes-with-wordpress"&gt;this post in particular&lt;/a&gt; hit the nail on the head for me. To summarize, I was being brute-force attacked, which means that someone was repeatedly trying to guess my password for my account on here, and that was overloading my server with unnecessary requests. Like the article says, I was able to determine that this was the cause of the problem by checking out the log file, and boy was I surprised:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;var&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nb"&gt;log&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;apache2&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;access&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;log&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;17&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;19&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;19&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;19&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;19&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;21&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;23&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;26&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;29&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;31&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;33&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;34&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;35&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;36&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;37&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;37&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;37&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;38&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.9&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;38&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;39&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;span class="mf"&gt;191.96&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mf"&gt;249.13&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;May&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2016&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;46&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;39&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;0400&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;POST /xmlrpc.php HTTP/1.0&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;500&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;585&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;As you can see from the time stamps, I was getting hit multiple times per second on a particular part of the site that's used to gain access to the administrative parts. I initially followed the instructions from the DigitalOcean support thread, banning the attackers and ensuring that they wouldn't be coming anywhere near my site again, by using the following commands:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;iptables -A INPUT -s 191.96.249.9 -j DROP
iptables -A INPUT -s 191.96.249.13 -j DROP
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Then I went ahead and saved my iptables rules so that they would persist and added them to the &lt;code&gt;rc.local&lt;/code&gt;file so they'd be called in on reboot every time&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;iptables-save &amp;gt; /etc/iptables_rules
&lt;span class="gh"&gt;#&lt;/span&gt; /etc/rc.local:
/sbin/iptables-restore &amp;lt; /etc/iptables_rules
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I didn't stop there, however. That may have been enough to save me this time, but this certainly won't be the last time I'll be attacked. The next step for me was to go ahead and get ufw working. I then set up a few rules to keep my site a little safer:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;ufw enable
ufw allow 22
ufw allow 443
ufw default deny incoming
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;In case you aren't familiar with these, I'll go over them quickly. The first command simply starts up the firewall, and makes sure that it'll run at boot time. The second command allows port 22, so that I can still use SSH to access my machine. The third command allows port 443, which is the port used to access my website over HTTPS. I left out port 80 (the standard HTTP port) because I don't want people accessing my site insecurely anyways. Lastly, I went ahead and blocked any other types of connections, because they won't be necessary for my purposes here.&lt;/p&gt;
&lt;p&gt;My site is still not secure enough for me to be confident in it, but this will do for now. The attacks have ceased and my site should be fully operational once again. I have absolutely no idea why anyone would even want to hack my site, or what they think they could possible gain from it (maybe they just can't wait for me to publish my next article and absolutely MUST read the drafts :P) The next steps for me will be to set up a custom error log for failed WordPress authentications, and link that up to fail2ban, which would then create rules to block out specific problematic IP addresses. Once I get that up and running, I'll be sure to share the details so that we can all enjoy a safer web.&lt;/p&gt;</content><category term="Tutorials"/></entry><entry><title>The Amazon Kindle: A Review</title><link href="https://wbrawner.com/2016/05/08/the-amazon-kindle-a-review/" rel="alternate"/><published>2016-05-08T19:52:00-06:00</published><updated>2016-05-08T19:52:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-05-08:/2016/05/08/the-amazon-kindle-a-review/</id><summary type="html">&lt;p&gt;When Amazon first released the Kindle, I wasn't overly impressed. My opinion of it at the time was that it was an over-simplified tablet, capable of nothing more than opening eBooks. My tablet can do that, and it can surf the web, play games, and watch movies. What could be …&lt;/p&gt;</summary><content type="html">&lt;p&gt;When Amazon first released the Kindle, I wasn't overly impressed. My opinion of it at the time was that it was an over-simplified tablet, capable of nothing more than opening eBooks. My tablet can do that, and it can surf the web, play games, and watch movies. What could be so great about a tablet that couldn't do anything except read? Fast-forward a few years, and I land a new job where learning is law and there's a culture of reading. So much so, that they sent me a Kindle with access to their Kindle library. At first, it seemed a bit unnecessary to me. I even mentioned that I have the Kindle app on my tablet and computer, so I could already get full access to their library and just read from there, but they insisted and got me the Kindle anyways.&lt;/p&gt;
&lt;p&gt;The first thing I noticed was the screensaver that was active when I opened the box. I actually thought it was a sticker and tried to peel it off! After a minute or so of being unable to find the edge of the non-existent sticker, I decided to hit the power button and see what would happen. I was (and still am) blown away by the screen, at just how real it looks. After holding it a minute, I also realized how incredibly light the device is. It's relatively small, and made of plastic, so it weighs almost nothing. Setup was pretty simple, and I had several books downloaded and ready to read in no time at all. Overall, I'm quite impressed with the device. Nothing is perfect though, so here's my list of pros and cons:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Pros&lt;/th&gt;
&lt;th&gt;Cons&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;- Light – it weights next to nothing&lt;/td&gt;
&lt;td&gt;-   Touch input is slightly delayed – this isn't a huge deal, especially when you're in the middle of reading a book. Trying to navigate a web page, however, is a bit annoying, so I'd leave the web browsing to a regular tablet.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;- Long Battery Life – I received my Kindle on April 16^th^, almost a month ago, and still haven't needed to charge it, despite the fact that I make it a point to read daily, even if only a little.&lt;/td&gt;
&lt;td&gt;-   Screen is black and white – again, not a deal-breaker, but it would be nice to be able to view colored images and text in a book. There might even be a version of the Kindle that has this, I haven't looked into it.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;- Screen is easy on the eyes – You don't even feel like you're looking at a screen when you read on the Kindle. The technology behind it is incredible. I've read for hours on end without feeling any discomfort at all.&lt;/td&gt;
&lt;td&gt;-   No backlit display – The basic Kindle doesn't have a backlit display, but I believe the Paperwhite version does. I imagine that this contributes substantially to the battery life, but it does make it inconvenient or even impossible to read in low-light situations.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;My opinion: anyone who enjoys reading should own a Kindle. I understand that nothing is quite like a real book, but when you're on the go or don't have the storage space for an entire library of books, the Kindle makes a world of difference. It's not just books, either. I use a tool called &lt;a href="https://p2k.co/"&gt;Pocket to Kindle&lt;/a&gt; that sends me a batch of articles that I've saved to my Pocket every day. I also grabbed the &lt;a href="https://chrome.google.com/webstore/detail/send-to-kindle-for-google/cgdjpilhipecahhcilnafpblkieebhea"&gt;Send to Kindle Chrome Extension&lt;/a&gt; so that I can instantly send an interesting article to my Kindle by simply pressing Alt + K. If I ever end up having to return my Kindle to my employer for whatever reason, I would absolutely purchase my own to replace it. Feel free to let me know your thoughts in the comments!&lt;/p&gt;</content><category term="Reviews"/></entry><entry><title>SSL Encryption from Let's Encrypt</title><link href="https://wbrawner.com/2016/04/27/ssl-encryption-from-lets-encrypt/" rel="alternate"/><published>2016-04-27T04:14:00-06:00</published><updated>2016-04-27T04:14:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-04-27:/2016/04/27/ssl-encryption-from-lets-encrypt/</id><summary type="html">&lt;p&gt;If you've been following my site at all, you'll now notice that it, along with the apps hosted on it, are encrypted via SSL! I decided to take the time to set it up because I take security and privacy very seriously. Even though I'm the primary user on my …&lt;/p&gt;</summary><content type="html">&lt;p&gt;If you've been following my site at all, you'll now notice that it, along with the apps hosted on it, are encrypted via SSL! I decided to take the time to set it up because I take security and privacy very seriously. Even though I'm the primary user on my site, and the one posting the most data, I still have left a few areas for readers to give their two cents, and as &lt;a href="http://stackoverflow.com/a/4495612/4770727"&gt;this StackOverflow user points out&lt;/a&gt;, connections should be encrypted anytime you transmit information that shouldn't be made public. E-mail addresses, for example, are not something you want to freely give out, unless you don't mind having your inbox filled with spam and potentially getting it and any accounts you have set up with it hacked. Anyways, here's how I got it to work:&lt;/p&gt;
&lt;p&gt;It's really possible thanks to &lt;a href="https://letsencrypt.org/"&gt;Let's Encrypt&lt;/a&gt;, a free, automated SSL certificate authority. So it's pretty much a set-up-and-forget type situation. Which means I can focus more on learning new technologies or improving my existing code instead of worrying about server administration. I'm pretty happy with the setup and one of the coolest things about it is, &lt;a href="https://github.com/letsencrypt/letsencrypt"&gt;it's all open source&lt;/a&gt;. Since I am a user and a fan of their services, I will absolutely have to contribute to the advances once I have time to do so. After all, you have to give back somehow.&lt;/p&gt;
&lt;p&gt;As for the more technical details on getting it to work, Digital Ocean (the company I rent my server from), &lt;a href="https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04"&gt;has a nice tutorial on getting things going&lt;/a&gt;. If you run into any trouble getting it going, feel free to drop a comment or shoot me an email and I'd be happy to help.&lt;/p&gt;</content><category term="Updates"/><category term="encryption"/><category term="privacy"/><category term="security"/><category term="ssl"/><category term="updates"/></entry><entry><title>Linux vs OSX vs Windows for Web Development</title><link href="https://wbrawner.com/2016/04/21/linux-vs-osx-vs-windows-for-web-development/" rel="alternate"/><published>2016-04-21T02:09:00-06:00</published><updated>2016-04-21T02:09:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-04-21:/2016/04/21/linux-vs-osx-vs-windows-for-web-development/</id><summary type="html">&lt;h3&gt;tl;dr&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Linux is great if you are on older hardware, just getting started, or like the most control over your system.&lt;/li&gt;
&lt;li&gt;OSX is great if you appreciate quality design can get past the price.&lt;/li&gt;
&lt;li&gt;Windows is great if you like to have a wide variety of choices and/or …&lt;/li&gt;&lt;/ul&gt;</summary><content type="html">&lt;h3&gt;tl;dr&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Linux is great if you are on older hardware, just getting started, or like the most control over your system.&lt;/li&gt;
&lt;li&gt;OSX is great if you appreciate quality design can get past the price.&lt;/li&gt;
&lt;li&gt;Windows is great if you like to have a wide variety of choices and/or are on a budget.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Growing up, my home computer always ran Windows. From Windows 98 all the way to Windows 8.1, I used it almost without interruption. I used Macs occasionally in school, and when I was in high school, my parents bought one for our home computer. Once I started learning to code, I started learning Linux as well, and actually dual booted it with Windows for a while before removing Windows altogether and only running Linux for a few months. I've used all three of the major operating systems at one point in my life, for an extended period of time. Seeing as I'm a web developer, I probably use my computer a bit more than the average user and put a bit more demand on it as well. By no means does that mean that I don't run typical programs like iTunes and Outlook, however, so I can still give an opinion from a standard user's perspective of the three.&lt;/p&gt;
&lt;h3&gt;Linux&lt;/h3&gt;
&lt;p&gt;About a year ago, I left Windows to give Linux a shot. At the time, I was just learning to code and all the references and tutorials I read said that the best programming operating systems were OSX and Linux, and that Windows complicated everything. I also saw several job postings that required knowledge of Linux systems so I figured it was my best shot, especially considering I didn't have the money for a MacBook.
I started off with Ubuntu - the standard version that ships with Unity - but also tried out some of the flavors like Xubuntu and Lubuntu, and eventually branched out to other distros (read "distributions" or "variations", for those who aren't familiar with Linux-speak) like openSUSE, Fedora, and Arch. My two favorites are Ubuntu and Arch. I really like how easy everything is to set up and get going with Ubuntu. Of all the various Linux distros, I feel like Ubuntu is the most commercially ready, and has the biggest chance of someday being a serious competitor for the desktop (and possibly mobile) market share. Arch is great because you literally have to put together your operating system from scratch, with nothing more than a basic installation that provides no more than a console. I learned so much about Linux in general from using Arch, and I truly found it enjoyable. What I didn't find so enjoyable about it, was that sometimes, things didn't quite work as well as I would hope, and for a primary workstation, I need to have a solid machine that I can count on to get the job done. Unfortunately, Arch couldn't provide that for me. I would love to run it on a spare computer, however, if for nothing else than to further learn about Linux. Overall, Linux provided me a great environment to learn on and I'm very happy with it.&lt;/p&gt;
&lt;p&gt;For me, from a standard user's perspective, Linux is not a solid choice. Many distros, like Debian, are pretty adamant about not using any proprietary software, and even distros like Ubuntu that embrace it are still limited by the willingness of the companies to port their software to Linux. In my experience, these ported versions are often outdated and unstable, assuming you can even find them for your distro. This isn't usually an issue for Debian- and Fedora-based distros but other newer distros are often left out. Software isn't the only problem, either. I've had numerous issues trying to find drivers just to get various features of my computer to work with the proprietary hardware, and even then there are some things (like my fingerprint reader) that I never could find drivers for. Don't get me wrong though, Linux is still a great operating system. If you only ever use your computer for basic text editing and web browsing, or you prefer to purchase your music or use web app versions of popular programs, you'd probably be fine with Linux. For someone like me, however, who likes to use tools like Spotify, iTunes, Steam, and Office, to name a few, Linux just doesn't make the cut. Granted, there are alternatives that exist for these, but I was never content to use them.&lt;/p&gt;
&lt;p&gt;From a developer's perspective, on the other hand, Linux is fantastic. Considering that many web servers today run Ubuntu, Debian, or CentOS, to name a couple, you're only about 5 minutes away from a basic web server setup on a fresh installation with nothing else. The advantage of working on a machine that's running the same OS as your server is that your code almost never fails after deployment due to differences in environments. Tools like Docker remove these advantages and give them to everyone though, so I don't think Linux is worth the extra effort unless you're just starting out and learning the ropes, or you're on a really tight budget and Windows or OSX is eating up too many system resources for you to actually be able to get any work done.&lt;/p&gt;
&lt;p&gt;While I don't think Linux is practical enough for desktop use, at least not for me, I love it for servers. At home, I run a Raspberry Pi with Raspbian that serves as my home router and cloud/media server. I haven't had any trouble with it at all and absolutely love it. Somewhere down the line, I may even get a second one to use as my development environment to free up some memory and storage on my laptop. And, as I stated earlier, it's the primary server OS used in my work environment.&lt;/p&gt;
&lt;p&gt;Another thing that I must admit that I truly appreciate about Linux is the community behind it. There are hundreds of forums and groups and IRC channels dedicated to Linux in general or its various distributions, full of people who are willing and able to help anyone who asks, and not even with things necessarily related directly to Linux. While learning to program, I received help on many occasions and learned a lot from the Linux community. I highly recommend checking out some Linux forums, even if you have questions regarding something that has nothing to do with Linux. It would of course have to be at least related to open source software and programming, though. If you go asking about how to set up iCloud backups or using advanced functions in Microsoft Word, you may get lucky and come across someone who actually knows, or you may end up with no further along than when you started.&lt;/p&gt;
&lt;h3&gt;OSX&lt;/h3&gt;
&lt;p&gt;One of my favorite things about Macs is their aesthetics. Inside and out, they're just gorgeous machines with a beautiful operating system to go with them. However, quality comes with a price and Macs are a prime example of that. With prices upwards of a grand, you'll need to drop a sizable amount of money on one or else go the used/refurbished route (which I have had very bittersweet experiences with myself.)&lt;/p&gt;
&lt;p&gt;As a user, Macs are great. The App Store provides you with access to thousands of secure and reliable (most of the time at least) apps, and you can always find what you're looking for online with a quick search if the App Store lets you down. You can pretty much run anything without any problems, so for standard users who can get past the price, Macs are a solid option. They are very durable too, so it may be worth the investment in the long run, unless you're one of those people who always have to have the latest tech. One thing I must say about proprietary software as opposed to open source software, is that there is generally less openness in regards to content as well. Take, for example, purchasing a movie in iTunes. That movie is only accessible from devices made from Apple. Got an Android tablet? Tough luck. Windows phone? Should've got an iPhone. I realize that almost any major multimedia provider out there imposes these restrictions on the content you purchase from them, but at least buying a movie from, say, the Google Play Store, gives you access to it on Android and iPhone devices through their app (possibly Windows as well, but I'm not 100% certain, at least not for mobile.) You either have to be willing to commit to a certain provider, or else find third-party services that are independent of any OS.&lt;/p&gt;
&lt;p&gt;As a web developer, Macs are also pretty good. I never really got into local web development on my Mac, so I can't speak for how good or bad MAMP setups are, but I did find comfort in the command line being relatively similar to that of Linux's. Having a plethora of development tools that look as good as the rest of the OS is also pretty nice, and for designers I'd say OSX is a must-have. And again, with tools like Docker and Vagrant, you can pretty much get up and running with no trouble whatsoever.&lt;/p&gt;
&lt;p&gt;I've never used OSX on a server, so I really couldn't say anything about them. I don't imagine it's cheap though, since nothing produced by Apple is.&lt;/p&gt;
&lt;h3&gt;Windows&lt;/h3&gt;
&lt;p&gt;With great power, comes great responsibility. Windows is probably the least secure OS out there, but I think it's also the most versatile as far as software goes. No matter what you want to do on your computer, it's almost certain that you can find some piece of software that can at least somewhat accomplish the task you are taking on. You just have to be always vigilant against viruses. Granted, if you only download files from trusted sources and only open emails that appear to be safe, you should be fine. It's still a good idea to have an active firewall and antivirus running, but for the most part, a little common sense will get you a long way. Part of the reason for so many viruses is because Windows is hands-down the most popular OS. According to Net Market Share, between 2015 and 2016, Windows &lt;a href="https://www.netmarketshare.com/operating-system-market-share.aspx?qprid=10&amp;amp;qpcustomd=0&amp;amp;qpsp=2015&amp;amp;qpnp=2&amp;amp;qptimeframe=Y"&gt;held around 85% of the total market share&lt;/a&gt;. That's some serious control there. Having that many users means they must be doing something right. Generally speaking, Windows computers are more affordable for the average user, and being honest here, if you take care of your computer, it will last you more than long enough. Furthermore, this goes without saying, but anyone who even remotely thinks about PC gaming will absolutely need Windows.&lt;/p&gt;
&lt;p&gt;When it comes to developing, I'm relatively new to Windows. I've been on Windows fairly consistently since Windows 98, before I decided to switch to Linux and later to Mac, then back to Linux, and then back again to Windows. I found that Linux was a bit too unstable for my needs, and lacked many pieces of software that I enjoy using in both my personal and professional uses of my computer. Macs are nice but they're really expensive, and even more so to get a decent development machine. With Windows, I get the perfect balance between stability and cost-effectiveness. I'm still learning the ropes, and figuring things out (I'm looking at you, PowerShell), but so far, I like what I'm seeing. I'm also very excited to be able to &lt;a href="https://blogs.windows.com/buildingapps/2016/03/30/run-bash-on-ubuntu-on-windows/"&gt;run bash on Windows&lt;/a&gt;, and with Windows phones soon allowing you to sync and &lt;a href="http://www.winbeta.org/news/first-look-messaging-everywhere-beta-windows-10-windows-10-mobile"&gt;send messages from your desktop&lt;/a&gt;, I may have to look into getting one of them as well.&lt;/p&gt;
&lt;p&gt;I haven't been able to work with Windows servers yet either, though I will as soon as I get the chance. From what I can tell, Windows is a bit more popular among enterprise-level IT systems, so it's certainly worth the time investment. The Amazon Free Tier actually offers various versions of Windows Server, so I will absolutely be playing around with that once I have some down time.&lt;/p&gt;
&lt;h3&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;All three OSes are great in their own regards, and deserve credit where credit is due. I personally have chosen to stick with Windows, because it's what feels the most comfortable to me, and best addresses my needs. After having grown up with it, it's only a matter of time before I get back into the hang of it and truly learn to appreciate it. Even once I have the budget for a higher-end computer, I'd rather try out the latest Surface Pro or Surface Book. At the end of the day, it all boils down to personal preference (your budget may have something to say about your preference too, however), so I recommend trying out all three and seeing which works best for you. Linux can be run from a USB stick so you don't even have to put your computer or your wallet at risk to try it out.&lt;/p&gt;</content><category term="Opinions"/><category term="amazon"/><category term="desktop"/><category term="linux"/><category term="mac"/><category term="osx"/><category term="server"/><category term="ubuntu"/><category term="windows"/></entry><entry><title>My Home Cloud Server/Router with a Raspberry Pi</title><link href="https://wbrawner.com/2016/04/02/my-home-cloud-serverrouter-with-a-raspberry-pi/" rel="alternate"/><published>2016-04-02T12:38:00-06:00</published><updated>2016-04-02T12:38:00-06:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2016-04-02:/2016/04/02/my-home-cloud-serverrouter-with-a-raspberry-pi/</id><summary type="html">&lt;p&gt;My apartment doesn't have wireless internet, but I do have ethernet access. In the past, I've used my laptop to create a wireless access point so that I could use my phone and tablet without worrying about running through my cellular data, but that was inconvenient because it basically turned …&lt;/p&gt;</summary><content type="html">&lt;p&gt;My apartment doesn't have wireless internet, but I do have ethernet access. In the past, I've used my laptop to create a wireless access point so that I could use my phone and tablet without worrying about running through my cellular data, but that was inconvenient because it basically turned my laptop into a desktop. A Raspberry Pi solved that issue for me.&lt;/p&gt;
&lt;p&gt;I grabbed a model 2 B from &lt;a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16813300006&amp;amp;cm_re=raspberry_pi-_-13-300-006-_-Product"&gt;Newegg&lt;/a&gt;, and it came with all the necessities so that I could get up and running. Once I had it set up, I configured the SSH server to start up at boot, and set up dnsmasq and hostapd. Hostapd uses the USB wireless adapter to create a wireless network that is fed from the ethernet connection. Dnsmasq manages the connections and assigns IP addresses to all of my connected devices. No more stationary laptops for me!&lt;/p&gt;
&lt;p&gt;I also went ahead and took the next step and set up my pi to run as a cloud server for all of my storage needs. I grabbed a 4 TB external drive so that I would be sure not to run out of space any time soon, and created an encrypted drive using encfs. I then added the entry for my drive into the fstab so that it would connect on boot, and configured it with a samba share for remote access. Now all I have to do is connect it, SSH in to decrypt the drive, and then I can safely access my files from any device at my apartment. I would set up port forwarding and a strict set of firewalls for access to it from anywhere in the world, but I unfortunately don't have access to the router at the apartment and my requests for it have been denied. For now though, this will take care of my needs.&lt;/p&gt;</content><category term="Updates"/></entry><entry><title>Workout Generator Updates</title><link href="https://wbrawner.com/2015/12/19/workout-generator-updates/" rel="alternate"/><published>2015-12-19T19:15:00-07:00</published><updated>2015-12-19T19:15:00-07:00</updated><author><name>William Brawner</name></author><id>tag:wbrawner.com,2015-12-19:/2015/12/19/workout-generator-updates/</id><summary type="html">&lt;p&gt;After much consideration, I've decided to take the workout generator I've been developing open source. I've always viewed it as a learning experience for myself, and a canvas of sorts on which I could develop my skills. With it being open source, I hope that other interested developers will join …&lt;/p&gt;</summary><content type="html">&lt;p&gt;After much consideration, I've decided to take the workout generator I've been developing open source. I've always viewed it as a learning experience for myself, and a canvas of sorts on which I could develop my skills. With it being open source, I hope that other interested developers will join in and help me create something incredible, and that I can learn a thing or two from the code they contribute.&lt;/p&gt;
&lt;p&gt;Additionally, I've moved it off of Heroku and onto the same server that hosts this site. The reasoning behind this was that Heroku put many limitations on the growth of the app. I was only allowed a certain amount of bandwidth and usage before I would have to pay. My current hosting plan here allows for unlimited bandwidth and storage, so it seemed to me to be more logical to move it here. It is still accessible from the home page, and &lt;a href="http://workout-generator.wbrawner.com/"&gt;http://workout-generator.wbrawner.com/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you would like to contribute to the code, you can find the repository at &lt;a href="https://github.com/wbrawner/workoutgenerator"&gt;https://github.com/wbrawner/workoutgenerator&lt;/a&gt;.&lt;/p&gt;</content><category term="Updates"/><category term="open source"/><category term="workout-generator"/></entry></feed>