<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://mockra.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://mockra.com/" rel="alternate" type="text/html" /><updated>2026-05-25T02:49:47+00:00</updated><id>https://mockra.com/feed.xml</id><title type="html">David Ratajczak</title><subtitle>David Ratajczak — engineer at GitHub, based in Sacramento.</subtitle><author><name>David Ratajczak</name><email>david@mockra.com</email></author><entry><title type="html">Vim and Tmux Essentials</title><link href="https://mockra.com/2017/05/04/tmux-vim" rel="alternate" type="text/html" title="Vim and Tmux Essentials" /><published>2017-05-04T00:00:00+00:00</published><updated>2017-05-04T00:00:00+00:00</updated><id>https://mockra.com/2017/05/04/tmux-vim</id><content type="html" xml:base="https://mockra.com/2017/05/04/tmux-vim"><![CDATA[<p>If you’ve always been curious about improving your workflow with tmux, but not
sure where to start, here’s a quick start with the essentials. The first thing
we’re going to start with is navigation.</p>

<p>A quick word of warning, these directions are for tmux 2.4, and are
incompatible with older versions.</p>

<p>You’ll want to add these commands to your <code class="language-plaintext highlighter-rouge">~/.tmux.conf</code> file. They’ll give you
the ability to seamlessly switch between vim and tmux panes using a control +
movement key(hjkl).</p>

<pre><code class="language-tmux">  # smart pane switching with awareness of vim splits
  bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim &amp;&amp; tmux send-keys C-h) || tmux select-pane -L"
  bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim &amp;&amp; tmux send-keys C-j) || tmux select-pane -D"
  bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim &amp;&amp; tmux send-keys C-k) || tmux select-pane -U"
  bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim &amp;&amp; tmux send-keys C-l) || tmux select-pane -R"
  bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim &amp;&amp; tmux send-keys 'C-\\') || tmux select-pane -l"
</code></pre>

<p>Once you’ve setup your tmux config, you’ll also need to install a vim plugin.</p>

<div class="language-vim highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  Plug <span class="s1">'christoomey/vim-tmux-navigator'</span>
</code></pre></div></div>

<p>The next thing we’re going to do is install <a href="https://github.com/benmills/vimux">Vimux</a>,
which will let you easily interact with tmux from vim.</p>

<div class="language-vim highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  Plug <span class="s1">'benmills/vimux'</span>
</code></pre></div></div>

<p>Once we’ve installed vimux, we’ll want to setup our testrunner to take
advantage of tmux. I personally use
<a href="https://github.com/janko-m/vim-test">vim-test</a>, which can be set to use vim
with the following command in your vimrc:</p>

<div class="language-vim highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="k">let</span> test#strategy <span class="p">=</span> <span class="s2">"vimux"</span>
</code></pre></div></div>

<p>The last thing we’ll want to do is setup a shortcut for quickly fullscreening
our vimux pane. This is useful for viewing test output, or if we want to check
git history, etc..</p>

<div class="language-vim highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="nb">map</span> <span class="p">&lt;</span>Leader<span class="p">&gt;</span>z <span class="p">:</span>VimuxZoomRunner<span class="p">&lt;</span>CR<span class="p">&gt;</span>
</code></pre></div></div>

<p>These are just the basics, and there’s a lot more you can do to boost your
productivity with tmux. I think these are a good starting point for a saner
test environment in vim though.</p>

<p>If you want to dig deeper, feel free to check out my
<a href="https://github.com/mockra/dotfiles">dotfiles</a>.</p>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[If you’ve always been curious about improving your workflow with tmux, but not sure where to start, here’s a quick start with the essentials. The first thing we’re going to start with is navigation.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Benefits of Pairing</title><link href="https://mockra.com/2016/12/28/benefits-of-pairing" rel="alternate" type="text/html" title="Benefits of Pairing" /><published>2016-12-28T00:00:00+00:00</published><updated>2016-12-28T00:00:00+00:00</updated><id>https://mockra.com/2016/12/28/benefits-of-pairing</id><content type="html" xml:base="https://mockra.com/2016/12/28/benefits-of-pairing"><![CDATA[<p>A common misconception I’ve found in regards to pairing is that it’s mostly done to improve code quality. While that’s certainly one of the many benefits, I think the most important benefits are related to culture and knowledge sharing.</p>

<h3 id="culture">Culture</h3>

<p>One of the more difficult tasks for an engineering manager is building a shared culture among the team. Pairing is one of the best tools for accomplishing this goal. An easy example would be if you’re looking to establish TDD as a common practice.</p>

<p>It’s one thing to tell your developers to use TDD and even give a demonstration of its benefits, but if you want to ensure they’re following it, the best way is to pair with them. If you’re pairing on a regular basis and test drive all of the features while pairing, the other developers will start to adopt TDD and even bring new developers up to speed when pairing with them.</p>

<p>You’ve now established a culture of using TDD that will continue even if you stop pairing with your developers. The practice of pairing will ensure that your developers that use TDD currently will instill that habit upon new team members.</p>

<h3 id="knowledge-sharing">Knowledge Sharing</h3>

<p>One of the many issues a growing team will encounter is the concept of isolated knowledge. If only one person knows how the new billing system works, product managers, engineers, and stake holders will all need to go to that one person with questions.</p>

<p>One of the best ways to mitigate this issue is through pairing. If you establish a culture of pairing, you’ll at a minimum have at least two people with knowledge of any given feature. This also allows for healthy discussion between engineers when it comes to building out new functionality around those features. It will also help drive discussion when it comes to grooming or estimating stories.</p>

<p>If your team is in the habit of rotating pairs, pretty soon your entire team will have a good idea of how each feature works. Your engineers will no longer get calls while on vacation, because anyone on the team is capable of answering those questions.</p>

<h3 id="getting-started">Getting Started</h3>

<p>Introducing pairing to your team can be a challenge depending on your engineers. A lot of developers can be pretty averse to the idea of pairing if they don’t have experience with it. I think slowly introducting the concept is the right approach, as well as keeping it optional for each team.</p>

<p>A low barrier option to introduce pairing is by forcing code reviews to be a process that requires a pair. Paired code reviews are a great practice in general, because it’s a lot easier to relate to the original author when you’re talking to them while reviewing. This helps avoid some of the tensions that can arise through text based reviews. It will also help lower cycle time, because engineers need to actively seek a reviewer.</p>

<p>Once developers are in the habit of pairing for code reviews, you can start marking stories or features as items that need to be paired on. More complex stories or ones with a lot of stake holders are great use cases for pairing. Pairing on those stories will help with knowledge share, and get developers used to the idea of pairing.</p>

<p>I’ve found that once the ball starts rolling on pairing, engineers will usually jump on pretty quickly.</p>

<h3 id="tools">Tools</h3>

<p><a href="https://screenhero.com/">ScreenHero</a> will allow you to share your entire screen with your pair and provides voice chat. This is useful for paired code reviews which require a browser typically, as well as for when developers switch to a browser while working on a feature.</p>

<p><a href="https://tmate.io/">Tmate</a> is another great option, but has limitations for code review, as well as feature work that can’t be done in the terminal. You’ll also need a way to communicate with your pair. I’ve found <a href="https://discordapp.com/">Discord</a> to be a great option there.</p>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[A common misconception I’ve found in regards to pairing is that it’s mostly done to improve code quality. While that’s certainly one of the many benefits, I think the most important benefits are related to culture and knowledge sharing.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Add Swap to Ubuntu</title><link href="https://mockra.com/2016/11/29/ubuntu-swap" rel="alternate" type="text/html" title="Add Swap to Ubuntu" /><published>2016-11-29T00:00:00+00:00</published><updated>2016-11-29T00:00:00+00:00</updated><id>https://mockra.com/2016/11/29/ubuntu-swap</id><content type="html" xml:base="https://mockra.com/2016/11/29/ubuntu-swap"><![CDATA[<p>If you’ve been playing around with Elixir on small web servers, you’ve probably
noticed that you run out of memory building your application. An easy solution
to this problem is adding swap space to your server. Here’s a quick setup guide
for Ubuntu.</p>

<p>The first thing we’ll need to do is allocate space for our swap file.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  sudo fallocate -l 1G /swapfile
</code></pre></div></div>

<p>Once that’s done, we’ll need to enable our file, mark it, and turn it on with
these commands</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  sudo chmod 600 /swapfile

  sudo mkswap /swapfile

  sudo swapon /swapfile
</code></pre></div></div>

<p>Once that’s done, we’ll want to make our swap file permanent. This way the swap
sticks around even when we reboot our server, or if it crashes.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
</code></pre></div></div>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[If you’ve been playing around with Elixir on small web servers, you’ve probably noticed that you run out of memory building your application. An easy solution to this problem is adding swap space to your server. Here’s a quick setup guide for Ubuntu.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Elixir Web Scraping with Floki</title><link href="https://mockra.com/2016/09/06/elixir-web-scraping-floki" rel="alternate" type="text/html" title="Elixir Web Scraping with Floki" /><published>2016-09-06T00:00:00+00:00</published><updated>2016-09-06T00:00:00+00:00</updated><id>https://mockra.com/2016/09/06/elixir-web-scraping-floki</id><content type="html" xml:base="https://mockra.com/2016/09/06/elixir-web-scraping-floki"><![CDATA[<p>One thing I end up working with in all languages is the ability to scrape data
from a web page. I’ve been pretty happy with the tools available in Elixir for
doing so, here’s a quick preview.</p>

<p>In this snippet, we’re going to be crawling my personal blog using
<a href="https://github.com/edgurgel/httpoison">HTTPoison</a> and
<a href="https://github.com/philss/floki">Floki</a>.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  posts = "https://www.mockra.com"

  body = HTTPoison.get!(index_url, [], hackney: [:insecure]).body

  posts = Floki.find(index_body, "section.post")
</code></pre></div></div>

<p>You’ll quickly notice something strange about the options we’re passing to
HTTPoison. I’ve run into an issue when crawling some websites due to a bad
certificate, so this is a work around for now. You can find more details about
the issue <a href="https://github.com/benoitc/hackney/issues/240">here</a>.</p>

<p>Once we get the content body, we can pass it into Floki to search for the information we want. In this example we’re grabbing the posts on the index page. If we wanted to get the title of the first post, we could do so with:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  posts
  |&gt; List.first
  |&gt; Floki.raw_html
  |&gt; Floki.find("h3")
  |&gt; Floki.text
</code></pre></div></div>

<p>This is a bit of a crude example, but in this case, we’re grabbing the first
post from the list and converting it back to html. This lets us use the find
function again to grab the h3 element for the post. We then use <code class="language-plaintext highlighter-rouge">Floki.text</code> to
get the post title.</p>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[One thing I end up working with in all languages is the ability to scrape data from a web page. I’ve been pretty happy with the tools available in Elixir for doing so, here’s a quick preview.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Scheduled Tasks with Elixir</title><link href="https://mockra.com/2016/08/25/scheduled-tasks-with-elixir" rel="alternate" type="text/html" title="Scheduled Tasks with Elixir" /><published>2016-08-25T00:00:00+00:00</published><updated>2016-08-25T00:00:00+00:00</updated><id>https://mockra.com/2016/08/25/scheduled-tasks-with-elixir</id><content type="html" xml:base="https://mockra.com/2016/08/25/scheduled-tasks-with-elixir"><![CDATA[<p>I’ve been writing several bots and scripts using Elixir lately, and I’ve found
it to be a pretty great option. One of the key tools I’ve been using is the
<a href="https://github.com/c-rack/quantum-elixir">quantum-elixir</a> library.</p>

<p>If you’ve ever used cronjobs before, quantum provides the same type of
functionality. You can setup scheduled tasks to run at specific intervals
through your config file. Here’s an example <code class="language-plaintext highlighter-rouge">config/config.exs</code> file:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  config :quantum, cron: [
    # Every 2 minutes
    "*/2 * * * *": {Mockra.Bot, :run},
  ]
</code></pre></div></div>

<p>In this example, the run function on my bot module will run every 2 minutes.</p>

<p>Once I’ve setup my script and config, I’ll use mix to run my script. I’ll use
the following command in a tmux session:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  MIX_ENV=prod mix run --no-halt
</code></pre></div></div>

<p>I’ve transferred a few ruby and node scripts to Elixir, and the droplet I use
for scripts has dropped from ~85% CPU load to ~1.5%. These are all unoptimized,
but I was pretty surprised by the results.</p>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[I’ve been writing several bots and scripts using Elixir lately, and I’ve found it to be a pretty great option. One of the key tools I’ve been using is the quantum-elixir library.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">OS X - Setup Postgres for Phoenix</title><link href="https://mockra.com/2016/07/21/osx-postgres-phoenix" rel="alternate" type="text/html" title="OS X - Setup Postgres for Phoenix" /><published>2016-07-21T00:00:00+00:00</published><updated>2016-07-21T00:00:00+00:00</updated><id>https://mockra.com/2016/07/21/osx-postgres-phoenix</id><content type="html" xml:base="https://mockra.com/2016/07/21/osx-postgres-phoenix"><![CDATA[<p>Here’s a quick guide for setting up postgres to work with Phoenix. The first
step is installing postgres through homebrew.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew install postgresql
</code></pre></div></div>

<p>After that’s finished, you’ll need to run the setup command while specifying
the utf8 encoding.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  initdb /usr/local/var/postgres -E utf8
</code></pre></div></div>

<p>Once that’s complete you can start/restart postgres through the services command.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew services restart postgresql
</code></pre></div></div>

<p>The final step is creating your default postgres user.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>   createuser -s postgres
</code></pre></div></div>

<p>You can now successfuly run <code class="language-plaintext highlighter-rouge">mix ecto.create</code> assuming you have the following
config in <code class="language-plaintext highlighter-rouge">config/devs.exs</code>.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  config :api, Api.Repo,
    adapter: Ecto.Adapters.Postgres,
    username: "postgres",
    database: "api_dev",
    hostname: "localhost",
    pool_size: 10
</code></pre></div></div>

<p>Feel free to replace the database option with something specific to your
project.</p>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[Here’s a quick guide for setting up postgres to work with Phoenix. The first step is installing postgres through homebrew.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Rails Formulaic - Form Testing</title><link href="https://mockra.com/2016/07/14/rails-formulaic" rel="alternate" type="text/html" title="Rails Formulaic - Form Testing" /><published>2016-07-14T00:00:00+00:00</published><updated>2016-07-14T00:00:00+00:00</updated><id>https://mockra.com/2016/07/14/rails-formulaic</id><content type="html" xml:base="https://mockra.com/2016/07/14/rails-formulaic"><![CDATA[<p>If you’re already using factory girl and want to clean up your test suite, then
the <a href="https://github.com/thoughtbot/formulaic">Formulaic</a> gem is a great option.
It allows you to pass in a hash of attributes to fill out a form.</p>

<p>Here’s an example:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  fill_form_and_submit(:user, :new, attributes_for(:user))
</code></pre></div></div>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[If you’re already using factory girl and want to clean up your test suite, then the Formulaic gem is a great option. It allows you to pass in a hash of attributes to fill out a form.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Productivity Tools</title><link href="https://mockra.com/2016/05/31/productivity-tools" rel="alternate" type="text/html" title="Productivity Tools" /><published>2016-05-31T00:00:00+00:00</published><updated>2016-05-31T00:00:00+00:00</updated><id>https://mockra.com/2016/05/31/productivity-tools</id><content type="html" xml:base="https://mockra.com/2016/05/31/productivity-tools"><![CDATA[<p>With the new responsibilities that come with being a parent, I’ve been thinking
more about how to maximize my productivity and mental space. Here’s a couple
tools/tricks I find the most helpful for my day to day life.</p>

<h2 id="inbox-zero">Inbox Zero</h2>

<p>One of the best things I’ve done for my productivity and mental capacity was a
move towards inbox zero. If you have 5,000 items in your inbox, it’s impossible
to tell what you still need to respond to, or act upon. If your inbox has 6
items in it, it’s easy to see what tasks you need to do, or who you need to get
back to.</p>

<p>By archiving all of the e-mails that I’ve “completed”, I’m able to quickly see
what items need my attention. If there’s a pull request I need to review, it
sits in my inbox until I’ve had the chance to do so. If my wife sends me a
chore list, I can leave it in my inbox until I’ve completed all of the items on
it. Since I’m always looking at my e-mail during the day, it’s an easy way to
keep track of what needs to be done.</p>

<p>I never have to worry about forgetting to respond to an e-mail, or ignoring a
comment on a project management tool. It removes a lot of the stress I used to
feel that came from managing a messy inbox.</p>

<h2 id="aggregated-news">Aggregated News</h2>

<p>For a while, I found myself struggling to keep up with all of the news and
information related to my interests. I was checking Hacker News daily for
programming news, TeamLiquid for the latest Starcraft discussions, etc.. A
while ago, I decided that I was spending way too much time checking news
sources and I needed to cut them out of my daily routine. I decided to settle
on Twitter and E-mail as my primary sources for news.</p>

<p>I signed up for newsletters for Hacker News, Ruby Weekly, Node Weekly, EmberJS,
and many others. I now get a curated list of content once a week from each of
the sources I used to spend time on daily. This allows me to check a bunch of
interesting articles at once, dismiss uninteresting ones, and save good
articles to Pocket for later.</p>

<p>I follow an assortment of developers on Twitter, and I find it a useful
resource for keeping up with the latest trends and ideas in
programming. Since I didn’t see myself being able to cut out Twitter from my
daily routine, I decided to pipe in content from non-developer interests to
Twitter. To this end, I created a <a href="https://github.com/mockra/loudred">Twitter
Bot</a> to tweet the top posts from subreddits
I used to follow. I no longer spend hours on reddit checking news and reading
discussions, the top content I care about is sent to my Twitter feed.</p>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[With the new responsibilities that come with being a parent, I’ve been thinking more about how to maximize my productivity and mental space. Here’s a couple tools/tricks I find the most helpful for my day to day life.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Neovim</title><link href="https://mockra.com/2016/05/23/neovim" rel="alternate" type="text/html" title="Neovim" /><published>2016-05-23T00:00:00+00:00</published><updated>2016-05-23T00:00:00+00:00</updated><id>https://mockra.com/2016/05/23/neovim</id><content type="html" xml:base="https://mockra.com/2016/05/23/neovim"><![CDATA[<p>I recently switched to neovim, and was surprised by how easy the transition
was. You can install neovim on OS X by running:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew install neovim/neovim/neovim
</code></pre></div></div>

<p>The first thing I needed to do was link my vimrc to my nvim config. I did
so with the following command:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  ln -s ~/.vimrc ~/.config/nvim/init.vim
</code></pre></div></div>

<p>Neovim should now look and behave pretty similarly to your standard vim setup.
Depending on your setup, there’s likely a few changes you’ll need to make to
your <code class="language-plaintext highlighter-rouge">.vimrc</code>. Here’s some of the issues I ran into:</p>

<p>I use <code class="language-plaintext highlighter-rouge">vim-test</code> to run tests while in vim, and needed to update my testing
strategy to work with neovim. This was done easily enough by adding the
following to my <code class="language-plaintext highlighter-rouge">.vimrc</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  let test#strategy = "neovim"
</code></pre></div></div>

<p>The switch also messed up my system clipboard commands, so I had to switch to
use the system register. I created the following leader commands for yanking
from vim to my system clipboard:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  map &lt;leader&gt;y "*y&lt;cr&gt;
  nnoremap &lt;leader&gt;yf :let @*=expand("%")&lt;CR&gt;
</code></pre></div></div>

<p>The first command will simply yank my current selection to the clipboard. The
second command will add the current filename to the clipboard.</p>

<p>Those are the only changes I’ve had to make since switching to neovim, and I’ve
been pretty happy with the results so far. I’ll be looking to adapt my current
setup to take more advantage of neovim in the future as well.</p>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[I recently switched to neovim, and was surprised by how easy the transition was. You can install neovim on OS X by running:]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Homebrew Services</title><link href="https://mockra.com/2016/05/09/homebrew-services" rel="alternate" type="text/html" title="Homebrew Services" /><published>2016-05-09T00:00:00+00:00</published><updated>2016-05-09T00:00:00+00:00</updated><id>https://mockra.com/2016/05/09/homebrew-services</id><content type="html" xml:base="https://mockra.com/2016/05/09/homebrew-services"><![CDATA[<p>If you’re like me, you likely have a long list of homebrew packages installed.
You most likely also have quite a few running through <code class="language-plaintext highlighter-rouge">launchd</code>. Starting,
stopping, and restarting these packages has likely been a cumbersome process.
Luckily, there’s an easy solution to your problem in Homebrew Services.</p>

<p>You can install homebrew services by running:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew tap homebrew/services
</code></pre></div></div>

<p>The first thing you’ll want to do from there is see a list of currently running
services, which can be done by running:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew services list
</code></pre></div></div>

<p>Here’s an example of the ouput:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  mysql        stopped
  postgresql   started username LaunchAgents/homebrew.mxcl.postgresql.plist
  redis        started username LaunchAgents/homebrew.mxcl.redis.plist
  rethinkdb    stopped
</code></pre></div></div>

<p>Now that I have homebrew service, I can start <code class="language-plaintext highlighter-rouge">mysql</code> by running:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew services start mysql
</code></pre></div></div>

<p>If I wanted to stop running <code class="language-plaintext highlighter-rouge">redis</code>, I could do that with:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew services stop redis
</code></pre></div></div>

<p>Homebrew services also comes with a handy utility for cleaning up stale
services and unused plists.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  brew services cleanup
</code></pre></div></div>]]></content><author><name>David Ratajczak</name><email>david@mockra.com</email></author><summary type="html"><![CDATA[If you’re like me, you likely have a long list of homebrew packages installed. You most likely also have quite a few running through launchd. Starting, stopping, and restarting these packages has likely been a cumbersome process. Luckily, there’s an easy solution to your problem in Homebrew Services.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://mockra.com/images/dragon.png" /><media:content medium="image" url="https://mockra.com/images/dragon.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>