<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ruslan Osipov - Productivity</title>
    <description>Recent posts in Productivity category on Ruslan Osipov.</description>
    <link>https://rosipov.com/</link>
    <atom:link href="https://rosipov.com/blog/categories/productivity.xml" rel="self" type="application/rss+xml" />
    <pubDate>Mon, 13 Apr 2026 16:21:22 +0000</pubDate>
    <lastBuildDate>Mon, 13 Apr 2026 16:21:22 +0000</lastBuildDate>
    <generator>Jekyll v4.4.1</generator>
    
      <item>
        <title>Turns out Windows has a package manager</title>
        <description>&lt;p&gt;I have a Windows 11 PC, and something that really annoyed me about Windows for decades is the inability to update all installed programs at once. It’s just oh-so-annoying to have to update a program manually, which is worse for things I don’t use often - meaning every time I open a program, I have to deal with update pop-ups.&lt;/p&gt;

&lt;p&gt;I was clearly living under a rock, because all the way in 2020 Microsoft introduced &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;winget&lt;/code&gt; package manager which lets you install, and more importantly update packages.&lt;/p&gt;

&lt;p&gt;It’s as simple as opening a command line (ideally as administrator, so you don’t have to keep hitting yes on the permission prompt for every program), and runinng &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;winget upgrade --all&lt;/code&gt;. Yup, that’s it. You’ll update the vast majority of software you have installed. Some software isn’t compatible, but when I ran the command for the first time, Windows updated a little over 20 packages, which included the apps I find myself having to update manually the most often.&lt;/p&gt;

&lt;p&gt;To avoid having to do this manually, I’ve used windows &lt;strong&gt;Task Scheduler&lt;/strong&gt; to create a new weekly task which runs a &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;winget-upgrade-all.ps1&lt;/code&gt; file, which consists of a single line:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;winget upgrade --all --silent --accept-package-agreements --accept-source-agreements
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I just had to make sure &lt;em&gt;Run with the highest privileges&lt;/em&gt; is enabled in task settings. So long, pesky update reminders. My Windows apps will finally stay up-to-date, hopefully.&lt;/p&gt;
</description>
        <pubDate>Mon, 24 Nov 2025 14:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/turns-out-windows-has-a-package-manager/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/turns-out-windows-has-a-package-manager/</guid>
        
        
        <category>Technology</category>
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>The generational curse of productivity</title>
        <description>&lt;p&gt;My daughter’s grandma is visiting, making me reflect on my upbringing more.&lt;/p&gt;

&lt;p&gt;I grew up in a culture that heavily values working hard. My mother was a hard worker, my father was a hard worker, their parents were hard workers, and so on up to 7 generations (or so my grandmother’s genealogical records say). This meant sitting down to relax wasn’t really something valuable - further, “why are you sitting down? It’s daytime” was a common phrase I’ve heard thrown around.&lt;/p&gt;

&lt;p&gt;I wasn’t abused into working non-stop, mind you (in fact, my mom loved me very much), but I did pick up a lot of the core beliefs about hard work, the value of the work, and what makes a good hard-working person “good”.&lt;/p&gt;

&lt;p&gt;This had quite a few upsides. I wouldn’t get tired when I needed to work - be it physically or mentally. Or more or less, I wouldn’t really be bothered by feelings of fatigue. You just push through, naturally. That made studying and working easier. A 16 hour shift during the sowing season? Not a problem. Study late into the night? Easy. Crunch time in the office? No worries.&lt;/p&gt;

&lt;p&gt;This mindset has set me up with a decent academic performance, and a string of jobs which eventually ended up in a career in the heart of Silicon Valley, and a career I’ve done well for myself in.&lt;/p&gt;

&lt;p&gt;The Silicon Valley mindset didn’t help. There’s this ever-present push to be more productive, to grow, and to spend every minute of your day getting better, faster, stronger (I touched on this briefly when I wrote &lt;a href=&quot;/blog/in-defense-of-quality/&quot;&gt;in defense of quality&lt;/a&gt;). This just worked to reinforce the mindset I already have.&lt;/p&gt;

&lt;p&gt;I spent many evenings and weekends reading self-improvement or programming books (which is reflected in the content of my blog about a decade ago) or taking classes. I tried to get really good at my hobbies, so that I don’t waste time stagnating. No time to waste.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/smell-the-flowers.jpg&quot; alt=&quot;Smell the flowers (credit: https://www.instagram.com/shencomix/).&quot; /&gt;&lt;/p&gt;

&lt;p&gt;You see, there are negative aspects to believing that hard work is the only measure of “goodness”, because ever since I was a kid sitting down, relaxing, and not doing much was frowned upon. Oh, don’t get me wrong - I got to play plenty, but the play had to be enriching, useful, and valuable to my growth as an individual. Otherwise it’s “grumble-grumble” and “we’re going to throw away this computer some day”.&lt;/p&gt;

&lt;p&gt;I find myself taking these beliefs into adulthood. Despite much self-work (a patient, loving, and caring companion helps), I still sometimes find myself worried that I’m not being productive, or doing the right thing.&lt;/p&gt;

&lt;p&gt;I saw this play out even during my time off. I’d spend days organizing documents and tackling long-delayed paperwork, instead of taking the time to focus on things I’d rather do instead. Work, work never ends.&lt;/p&gt;

&lt;p&gt;A decade ago I still played video games and watched shows I love, but I saw the activity as a waste of time. And I’d feel guilty every time I’d engage in any form of entertainment, and sometimes I’d even engage in mental gymnastics to try to prove to myself that what I’m doing is done to improve my own qualities as a human being, like playing a game to learn a new language or maybe pick up a skill I could use in a real life.&lt;/p&gt;

&lt;p&gt;After much rediscovery, self-love, and care I try not to do that anymore. I work hard, yes, but I don’t beat myself up for relaxing and smelling the roses. I love my video gaming hobbies, I enjoy miniature painting, reading science fiction, and picking up short-lived but fulfilling interests here and there.&lt;/p&gt;

&lt;p&gt;Going on paternity leave this year has been a great experience in slowing down. Yes, taking care of an infant is a lot of work, but there’s much downtime to enjoy life (I recently wrote about &lt;a href=&quot;/blog/reflections-on-my-paternity-leave/&quot;&gt;reflections on my paternity leave&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;I’m not working to build some sort of a portfolio of interests and I’m not trying to turn every hobby into a side-gig or be the most efficient hobbyist to grace this Earth. There’s a balance I’ve been missing, and slowing down has been doing wonders for my wellbeing. Maybe the most productive thing I’ve done was to finally stop trying to be productive.&lt;/p&gt;
</description>
        <pubDate>Mon, 06 Oct 2025 14:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/the-generational-curse-of-productivity/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/the-generational-curse-of-productivity/</guid>
        
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Brainstorming terrible ideas in a group</title>
        <description>&lt;p&gt;Years ago a colleague of mine taught me a brainstorming technique that I find particularly useful. Thanks, Meagan.&lt;/p&gt;

&lt;p&gt;Here’s the thing. Often, when brainstorming in a group, even with a good degree of psychological safety, participants are often worried about appearing like idiots, or having bad ideas. There’s a reputation to maintain after all, and we’re all taught to think before we speak. I find this group brainstorming method to be useful to get around this mental block.&lt;/p&gt;

&lt;p&gt;You create four buckets for solutions to a problem:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Ideal&lt;/strong&gt;: If I had a long time horizon to solve this problem&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Realistic&lt;/strong&gt;: If I had limited time and resources&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Wasteful&lt;/strong&gt;: If I didn’t care about time and resources at all&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Harmful&lt;/strong&gt;: If I wanted to sabotage the problem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And participants are tasked with populating each bucket. Here’s the fun part: actively harmful and wasteful solutions often lead to the best outcomes.&lt;/p&gt;

&lt;p&gt;Let’s walk through the example. Say you have a team wiki that’s neglected and out-of-date. You’re trying to figure out how to solve this problem. Here are the ideas:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Ideal&lt;/strong&gt;: Hire technical writers to constantly audit and rewrite the documentation.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Realistic&lt;/strong&gt;: Implement a mandatory wiki cleanup day, where each team member is assigned a portion of the wiki to update.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Wasteful&lt;/strong&gt;: Award $500 to whoever contributed the most pages to the wiki each year.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Harmful&lt;/strong&gt;: Set content to self-destruct after 3 months. If the content is important, someone will write it again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All of these ideas have problems. Technical writers will not have the context and could put undue communication burden on the team, company mandates are never fun, encouraging quantity of contribution can lead to decrease in quality, and deleting the data defeats the purpose of having a wiki in the first place.&lt;/p&gt;

&lt;p&gt;But this gets you thinking - maybe the harmful idea isn’t so harmful after all. Maybe a staleness banner on pages, with a name of the last editor and a nudge to them could help keep the wiki up-to-date.&lt;/p&gt;

&lt;p&gt;In my experience, “Wasteful” and “Harmful” buckets have a disproportionate number of responses, many of which start as jokes (“fire everyone”, “reboot every 5 minutes”, “use carrier pigeons”), and improve upon iterations into the winning ideas.&lt;/p&gt;
</description>
        <pubDate>Mon, 29 Sep 2025 14:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/brainstorming-terrible-ideas-in-a-group/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/brainstorming-terrible-ideas-in-a-group/</guid>
        
        
        <category>Productivity</category>
        
        <category>Work</category>
        
      </item>
    
      <item>
        <title>In defense of quality</title>
        <description>&lt;p&gt;The Internet whispers a constant message: you should be doing more. I remembered a video I stumbled upon a while back. Some productivity influencer, barely old enough to grow a mustache, was detailing their morning routine. They were up at 3 am, of course. By the time the sun rose, they’d read an entire book, run ten miles, and meditated on a mountaintop while simultaneously coding a new killer app, all fueled by a kale smoothie that cost more than my lunch.&lt;/p&gt;

&lt;p&gt;I didn’t feel inspired. I felt tired.&lt;/p&gt;

&lt;p&gt;There’s a constant pressure in the background of modern life to keep up. The informational landscape has gotten particularly good at creating an illusion of scarcity, a fear that you’re falling behind. This is doubly true if you work in tech, where productivity and growth are treated not just as a badge of honor, but as a competitive sport. You must consume more, learn faster, ship quicker.&lt;/p&gt;

&lt;p&gt;But this pressure is a trap. It pushes us further towards ever-increasing quantity, while the real value - in our work, in our thinking, and in our lives - has always been found in the deliberate pursuit of quality.&lt;/p&gt;

&lt;p&gt;Let’s be clear: this feeling isn’t your fault. It’s a feature, not a bug. The platforms where we spend our time are engineered for this exact purpose. The endless scrolls, the auto-playing videos, the short-form feeds that evaporate from memory the second they’re gone - it’s all optimized for one thing: for you to watch it from beginning to end, and then watch more just like it. It’s content designed to be consumed and to do nothing else.&lt;/p&gt;

&lt;p&gt;This ecosystem thrives on the illusion of knowledge. We have endless summaries, TL;DRs, and AI-powered tools that can give you the synopsis of any book in seconds. We skim headlines and read the bullet points, mistaking this fleeting familiarity for understanding. We are becoming masters of the shallow factoid, the talking point without substance.&lt;/p&gt;

&lt;p&gt;This isn’t a new thought. “&lt;a href=&quot;https://www.science.org/doi/10.1126/science.1207745&quot;&gt;Google Effects on Memory: Cognitive Consequences of Having Information at Our Fingertips&lt;/a&gt;” (Sparrow et al., 2011) showed that we don’t bother remembering information we believe we can easily look up later. More recently, “&lt;a href=&quot;https://pmc.ncbi.nlm.nih.gov/articles/PMC8612631/&quot;&gt;People mistake the internet’s knowledge for their own&lt;/a&gt;” (Ward, 2021) took it a step further, finding that when we have access to the internet, we often mistake its knowledge for our own. We don’t just offload the facts; we internalize the false confidence of knowing, without ever having done the work.&lt;/p&gt;

&lt;p&gt;A couple of years ago, I read Greg McKeown’s &lt;a href=&quot;/blog/essentialism-a-practical-guide-to-less/&quot;&gt;Essentialism&lt;/a&gt;. The core concept isn’t revolutionary, but the way I engaged with it was for me. I read it slowly. A little bit each morning, with a cup of coffee. I took notes in the margins, underlining passages, connecting the ideas to my own experiences. It became a paced, deeply personal experience. I’d mull over a chapter for days, bringing up concepts in conversations with my wife or colleagues. Because I gave the ideas time to breathe, they began to stick. They integrated themselves into my thinking in a way that no summary or 10-minute video review ever could. The book holds a place in my head not because of what it said, but because of how I listened.&lt;/p&gt;

&lt;p&gt;This is the difference between knowing about something and understanding it. We internalize concepts slowly. Mastery and satisfaction don’t come from the frantic consumption of a hundred different things, but from immersing yourself in one thing, from wrestling with it, from letting it change you. It’s the long email thread with a friend debating a single concept. It’s the quiet hour spent thinking, not just consuming. That is where the real work happens.&lt;/p&gt;

&lt;p&gt;This mindset of quantity over quality bleeds into other areas of our life. It shows up at work, rebranded as “growth mindset.” On the surface, it’s wonderful. Who wouldn’t want to grow? But it can be a bit of a grift. The corporate mandate to be “constantly upskilling” - often on your own time and at your own expense - isn’t always for your benefit. It’s for the company’s. It ensures the workforce is perpetually churning, learning the next new framework without ever pausing to question if it’s better than the last.&lt;/p&gt;

&lt;p&gt;Worse, this mindset even poisons our leisure. Go search for a new hobby. You won’t just find tutorials; you’ll find guides on how to monetize it, how to build a personal brand around it, how to become the most efficient and optimized practitioner of it. I just want to watch TV and paint miniatures; I have no desire to win a trophy or launch a Patreon for my technique. The pressure to get better, faster, stronger turns the very activities meant to be a refuge from work into just another form of it.&lt;/p&gt;

&lt;p&gt;The solution for me wasn’t to learn faster, but to learn better, which often means learning slower. This requires making a conscious choice to step away from the algorithm. I turned off my YouTube history, which mercifully nukes the recommendation feed and the YouTube Shorts (here’s what my YouTube home page looks like).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/youtube-history-off.png&quot; alt=&quot;YouTube with the history off is a different experience. Yes, I&apos;m bougie, my wife pays for YouTube Premium.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I left sites like Reddit years ago and haven’t missed them. Instead, I’ve returned to powerful tools like RSS or email. Subscribing directly to a person’s blog or newsletter is an act of defiance. It’s a choice to engage with a whole person’s train of thought, complete with their quirks and tangents, rather than consuming the single, out-of-context snippet that an algorithm decided was worthy of your attention.&lt;/p&gt;

&lt;p&gt;This post was inspired by Nikhil’s &lt;a href=&quot;https://www.unsungnovelty.org/posts/04/2025/you-dont-need-ai-summaries-tldr-or-to-be-on-top-of-things/&quot;&gt;You don’t need AI summaries, tldr or to be on top of things&lt;/a&gt;, which I’ve read back in April, and it’s been since sitting as a starred article in my RSS reader. I’d occasionally get back to scan through it, think about the message and take notes about what I’d like to say in response. And I’m glad I took my time and gave Nikhil’s post the mindspace it deserved.&lt;/p&gt;

&lt;p&gt;I’ve leaned into more of a evangelist approach in this article, and I know I’ve simplified the topic. The older I get, the more allergic I feel to dealing in absolutes, but I felt like there’s a good message here. For completeness sake, algorithmic discovery isn’t all bad: it can help us engage in broad variety of content we wouldn’t otherwise seek out, and it can provide a platform to people who deserve it at virtually no cost to them. This piece isn’t about selling a new anti-productivity framework or joining another counter-culture trend. But I think there’s something to be said about reclaiming agency in an increasingly noisy world. By choosing depth over breadth, and quality over quantity, I found more genuine understanding, satisfaction, and a little more peace.&lt;/p&gt;
</description>
        <pubDate>Mon, 07 Jul 2025 14:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/in-defense-of-quality/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/in-defense-of-quality/</guid>
        
        
        <category>Philosophy</category>
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Back up your digital life</title>
        <description>&lt;p&gt;Our digital life increasingly exists primarily in the cloud. Documents, photos, emails, passwords: all of this resides in the cloud. And be it One Drive, iCloud, Google Drive, or Dropbox - you don’t really own any of it.&lt;/p&gt;

&lt;p&gt;We trust these companies with our digital life and take their reliability for granted, but it’s worth remembering that nothing in this world is a guarantee. The likelihood of an outright failure of these services is relatively low; Google, for example, stores copies of all data in data centers across three geographic locations (often across multiple regions). Microsoft, Amazon, Apple and other giants follow equivalent policies. The real threat with this storage is bureaucracy. Your account can be erroneously flagged and banned: automated systems that constantly scan for policy violations aren’t perfect and can misfire. Your account can get hacked, even with a strong password and two factor authentication. Navigating account restore process and getting access back can take weeks, months, or be altogether impossible.&lt;/p&gt;

&lt;p&gt;Because of this, local backups are critical if you care about your data - which you probably do.&lt;/p&gt;

&lt;h3 id=&quot;3-2-1-backup-strategy&quot;&gt;3-2-1 backup strategy&lt;/h3&gt;

&lt;p&gt;A common, straightforward, and widely used rule of data backups is referred to as the “3-2-1 rule”:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Keep &lt;strong&gt;three&lt;/strong&gt; copies of your data.&lt;/li&gt;
  &lt;li&gt;Use &lt;strong&gt;two&lt;/strong&gt; types of media for storage.&lt;/li&gt;
  &lt;li&gt;Keep &lt;strong&gt;one&lt;/strong&gt; copy off-site.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/3-2-1-backup-rule.png&quot; alt=&quot;The 3-2-1 backup rule illustrated: 3 copies, across 2 medias, with 1 stored off-site.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In fact, you’ll be hard-pressed to find a cloud service provider who doesn’t subscribe to some (likely more complex) variation of this rule.&lt;/p&gt;

&lt;p&gt;We’ll satisfy the 3-2-1 backup rule with a dedicated backup drive and a home computer you likely already have:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;✔️ Keep three copies of your data: (1) in the cloud, (2) on a dedicated backup drive, and (3) on a home device you already have.&lt;/li&gt;
  &lt;li&gt;✔️ Use two types of media for storage: (1) in the cloud, and (2) on our backup drive.&lt;/li&gt;
  &lt;li&gt;✔️ Keep one copy off-site: you’ll keep your backup drive at home, which is a different location from the cloud data centers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;use-an-external-hdd-for-backups&quot;&gt;Use an external HDD for backups&lt;/h3&gt;

&lt;p&gt;Solid state drives - SSDs - are all the rage today: they’re blazingly fast and have become relatively affordable. But you don’t want an SSD for a backup: SSDs reliability isn’t great when left unpowered: with the low end of failures occurring at merely the one-year mark. And since it’s a backup, you’ll want to leave it unpowered.&lt;/p&gt;

&lt;p&gt;No, for this you’ll want a hard drive - an HDD. We’ll be trading read/write speed for reliability. External hard drives are affordable, don’t need to be powered to store the data, have been around for ages, and degrade more slowly. A quality hard drive should be mostly reliable for 5-7 years, and can be repurposed to a tertiary backup storage after that. Set a reminder in the future for yourself to do that.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/reminder-to-replace-backup-drive.png&quot; alt=&quot;A digital reminder for April 1, 2030 which says &amp;quot;Backup drive probably needs to be replaced (downgrade the drive to tertiary backup storage).&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, some data can be recovered from a failed HDD, while failed SSDs are largely unrecoverable.&lt;/p&gt;

&lt;p&gt;Survey your space needs, and use a hard drive a few times the size for scalability. I use a &lt;a href=&quot;https://amzn.to/4iKFIqd&quot;&gt;4 Tb Seagate portable HDD&lt;/a&gt;, and it’s working just fine.&lt;/p&gt;

&lt;h3 id=&quot;use-an-existing-device-for-tertiary-storage&quot;&gt;Use an existing device for tertiary storage&lt;/h3&gt;

&lt;p&gt;You likely already have some devices you could use at home. Maybe a laptop you’re currently using, or an old desktop tower you haven’t plugged in for years. Using this device will help ensure reliability and longevity of your data.&lt;/p&gt;

&lt;p&gt;If you don’t have anything you can use, or your existing storage is too small - violating the 3-2-1 backup rule is better than having no backup at all. Use an external HDD, which you can downgrade to tertiary storage once you replace it in 5-7 years.&lt;/p&gt;

&lt;h3 id=&quot;on-encryption&quot;&gt;On encryption&lt;/h3&gt;

&lt;p&gt;Encrypting or not encrypting your backups is a personal choice.&lt;/p&gt;

&lt;p&gt;You’ll likely be backing up important documents, which makes encryption critical for security. If the backup gets stolen, your whole life can be turned upside down (although this possibility still exists today if someone hacks into your cloud account).&lt;/p&gt;

&lt;p&gt;However, because backups tend to live a long time, encryption can have downsides: tools can change, and most importantly you can forget your password. You also can’t decrypt a partially recovered backup: it’s all or nothing.&lt;/p&gt;

&lt;p&gt;If you choose to encrypt, consider using established and mature open source encryption tooling like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gpg&lt;/code&gt; (I wrote about &lt;a href=&quot;https://rosipov.com/blog/gpg-usage/&quot;&gt;how to use GPG&lt;/a&gt; all the way back in 2012).&lt;/p&gt;

&lt;p&gt;It’s not all or nothing either: you can choose to only encrypt sensitive documents, but leave less sensitive media like photos, videos, or music unencrypted.&lt;/p&gt;

&lt;p&gt;I do not encrypt my backups because I worry about forgetting my password by the time I need to recover the backup. I have a tendency to get in my own way: I couldn’t recover some writing I’ve backed up in 2012 because I couldn’t figure out what the password was. How fun.&lt;/p&gt;

&lt;h3 id=&quot;extracting-data-from-cloud&quot;&gt;Extracting data from Cloud&lt;/h3&gt;

&lt;p&gt;Internet giants allow you to download all your data in a fairly convenient manner. Google has &lt;a href=&quot;https://takeout.google.com&quot;&gt;Google Takeout&lt;/a&gt;, which lets you download data across services (Google Drive, Photos, email, etc). Apple allows you to &lt;a href=&quot;https://support.apple.com/en-us/102208&quot;&gt;request a copy of your data&lt;/a&gt;, and Microsoft allows you to &lt;a href=&quot;https://account.microsoft.com/privacy/privacy-request&quot;&gt;submit a privacy request&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Don’t forget about other service providers who store your data like email providers or password managers.&lt;/p&gt;

&lt;h3 id=&quot;back-up-regularly&quot;&gt;Back up regularly&lt;/h3&gt;

&lt;p&gt;Set up a routine you’ll follow. For me, it’s every year. I won’t follow a more rigorous backup routine, and the trade-off of losing a year worth of data is worth the convenience of infrequent backups.&lt;/p&gt;

&lt;p&gt;As our lives become more intertwined with the digital world, protecting your data is essential. By following the 3-2-1 backup strategy and using reliable storage, you can safeguard your data against unexpected mishaps. Regular backups and smart encryption choices will help keep your digital life secure and accessible. So, take a moment to set up your backups today - you’ll thank yourself later for the peace of mind that comes with knowing your data is safe.&lt;/p&gt;
</description>
        <pubDate>Thu, 20 Mar 2025 18:15:00 +0000</pubDate>
        <link>https://rosipov.com/blog/back-up-your-digital-life/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/back-up-your-digital-life/</guid>
        
        
        <category>Productivity</category>
        
        <category>Technology</category>
        
      </item>
    
      <item>
        <title>Essentialism: A Practical Guide to Less</title>
        <description>&lt;p&gt;I’ve thoroughly enjoyed &lt;a href=&quot;https://amzn.to/3QUpyyb&quot;&gt;Essentialism&lt;/a&gt;, a book that encapsulates the simple yet powerful notion of “do fewer things, do them well.” There’s not much else to it. While this philosophy is straightforward, it’s the way Greg McKeown presents and reinforces this message that makes the book truly compelling.&lt;/p&gt;

&lt;p&gt;Having Essentialism in physical form proved invaluable. I filled the margins with notes, worked through exercises alongside the text, and took the time to fully absorb the material as I progressed.&lt;/p&gt;

&lt;p&gt;Essentialism is not a new concept, but the key takeaway is the author’s focus on truly internalizing the message. “Focus on things that matter, trim the excess” is a simple motto to remember, yet challenging to implement. Throughout my life, I’ve adopted many of essentialist practices in one form or another, from guarding my calendar to learning to say “no” to prioritizing essential projects. However, over time, clutter inevitably creeps in.&lt;/p&gt;

&lt;p&gt;McKeown wisely focuses on routines that support the essentialist lifestyle, emphasizing the importance of dedicated time for reevaluation and recentering. He suggests establishing routines that prevent slipping into the frantic “onto the next thing” mentality so prevalent in the modern corporate world.&lt;/p&gt;

&lt;p&gt;An analogy that particularly resonated with me is the closet metaphor. While you can declutter your closet once, it will eventually refill with clothes you don’t need. To keep your closet tidy, you need to have a regular time to reevauate your outfits, know where the nearest donation center is, how to get there, and what hours is it open. Similarly, McKeown provides methodologies to regularly reevaluate our priorities, supporting the rigorous process of regularly discarding the non-essential.&lt;/p&gt;

&lt;p&gt;Essentialism extensively focuses on routines, practices, and exercises. The edition I read includes a “21-day Essentialism Challenge,” a helpful list of concrete activities corresponding to each chapter. While some prompts, like “take a nap” or “play with a child for 10 minutes” are a bit silly (where am I supposed to find a child on a Tuesday, Greg?), many steps effectively reinforce and integrate the material into your daily life, such as “design your ideal calendar,” “practice saying no gracefully,” or “schedule a personal offsite.”&lt;/p&gt;

&lt;p&gt;The latter suggestion, scheduling a personal offsite, left a significant impression on me. It’s time dedicated to strategizing around your personal and professional goals. While I occasionally reflect on my career and life, McKeown elevates this practice into a ritual – a full day focused on self-reflection, planning, and deliberate action.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://amzn.to/3QUpyyb&quot;&gt;Essentialism&lt;/a&gt; is a helfpul book that prompts the reader to think about the routines one can put in place to change the way we approach life. It’s a reminder that less can indeed be more, and that by focusing on what truly matters, we can create a life of greater purpose, meaning, and fulfillment.&lt;/p&gt;

</description>
        <pubDate>Fri, 24 Nov 2023 20:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/essentialism-a-practical-guide-to-less/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/essentialism-a-practical-guide-to-less/</guid>
        
        
        <category>Reviews</category>
        
        <category>Productivity</category>
        
        <category>Work</category>
        
      </item>
    
      <item>
        <title>Thoughts, Energy, Attention</title>
        <description>&lt;p&gt;I find it easy to get caught up in whatever is on my mind. That’s why I find mindfulness practices particularly helpful, and T.E.A. - Thoughts, Energy, Attention - is something I’ve been using on and off for a few years to clear my head and focus on work and decisions that matter to me.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/thoughts-energy-attention.png&quot; alt=&quot;A drawing of a tea cup with Thoughts, Energy, Attention written next to it.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It’s short and simple, and only takes few minutes:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Thoughts&lt;/strong&gt;: What’s on my mind now?
    &lt;ul&gt;
      &lt;li&gt;Is my train of thought helpful? What can be done to change it?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Energy&lt;/strong&gt;: How am I feeling?
    &lt;ul&gt;
      &lt;li&gt;How is my energy level? Can I maintain or improve it?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Attention&lt;/strong&gt;: What matters to me?
    &lt;ul&gt;
      &lt;li&gt;What should I focus on? What should I accomplish?&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve seen a common variation of the same acronym stand for Time, Energy, Attention - but I found that didn’t work well for me. Maybe that’s because I’m terrible at estimating or understanding time, or maybe that’s because the most important decisions sometimes end up not taking any time at all. Either way, I try not to concern myself with time. Hence: Thoughts, Energy, Attention.&lt;/p&gt;

&lt;p&gt;You can read more about T.E.A. in this &lt;a href=&quot;https://blog.google/documents/103/T.E.A_Check-in_Guide_-_External_.pdf/&quot;&gt;PDF from Google&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Thu, 20 Jul 2023 15:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/thoughts-energy-attention/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/thoughts-energy-attention/</guid>
        
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>The Eisenhower matrix</title>
        <description>&lt;p&gt;The Eisenhower matrix, sometimes known as the priority matrix, is an invaluable
planning tool, and something I have been consistently using for the better part
of the last decade.&lt;/p&gt;

&lt;p&gt;As someone who has a short attention span and easily gets overwhelmed, I find
Eisenhower matrix to be an invaluable tool in allowing me to focus on what’s
important, rather than what’s right in front of me.&lt;/p&gt;

&lt;p&gt;Oh, I still struggle to make sure that things that are important to me are
what matters to others, but that’s a whole different battle - at the very least
I’m able to keep my own head straight, and that’s a win in my book.&lt;/p&gt;

&lt;p&gt;Without any further ado, I present to you the decision making framework
developed and popularized by Dwight D. Eisenhower, the 34th president of the
United States (and clearly a notorious efficiency nut).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/eisenhower-matrix.png&quot; alt=&quot;Picture of an Eisenhower matrix: vertical axis titled &amp;quot;Importance&amp;quot;, horizontal axis titled &amp;quot;Urgency&amp;quot;, and four quadrants titled &amp;quot;Do now&amp;quot;, &amp;quot;Schedule&amp;quot;, &amp;quot;Delegate&amp;quot;, and &amp;quot;Eliminate&amp;quot;.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It’s pretty simple, really. Take everything from your long single-file To-Do
list, and place it on the matrix based on its urgency and importance. Work
through the matrix in the following order:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Urgent and important: get these done, now.&lt;/li&gt;
  &lt;li&gt;Important, but not urgent: decide when you want to do these, actively make
time for yourself to work on those.&lt;/li&gt;
  &lt;li&gt;Urgent, but not important: delegate (read on below if you have no one to
delegate to).&lt;/li&gt;
  &lt;li&gt;Not urgent and not important: take time to eliminate these tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;do-now-a-common-pitfall&quot;&gt;Do now: a common pitfall&lt;/h2&gt;

&lt;p&gt;It’s easy to throw everything into the “urgent and important” pile. In reality,
that’s not often the case. If you find yourself throwing everything in the first
quadrant - I implore you to think of your tasks in relative terms. Out of
everything on your mind, I’m sure some things are more important than others.&lt;/p&gt;

&lt;p&gt;I find that over time most of my work shifts into a single quadrant (usually the
“important, but not urgent”), and I find it helpful to redistribute those, or
populate the matrix from scratch.&lt;/p&gt;

&lt;h2 id=&quot;schedule-mindful-use-of-time&quot;&gt;Schedule: mindful use of time&lt;/h2&gt;

&lt;p&gt;One of the goals of the Eisenhower Matrix is to increase visibility into how you
spend your time. While it’s easy to spend most of the time in the “urgent and
important” quadrant, the best work happens in the “important, but not urgent”
section of the matrix. That’s where the best use of your time is, and that’s
where most of the energy and attention should be spent.&lt;/p&gt;

&lt;p&gt;Otherwise you’re just running around like a chicken with its head cut off,
although I can sympathise with the difficulty of getting out of the urgency
trap. It’s not trivial, and probably downright impossible in some cases.&lt;/p&gt;

&lt;p&gt;This is where the biggest pitfall of the Eisenhower matrix lays in my
experience. You want to maximize amount of time spent in the “schedule”
quadrant, but you don’t want to end up with a massive list that becomes a yet
another To Do list, because &lt;a href=&quot;https://rosipov.com/blog/why-i-threw-away-my-to-do-list/&quot;&gt;one dimensional To-Do lists suck&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;delegate-to-whom&quot;&gt;Delegate: to whom?&lt;/h2&gt;

&lt;p&gt;Not everyone has someone to delegate work to. Or not everything can be
delegated. In these cases, I treat the “delegate” bucket the same as
“eliminate”. Hopefully that won’t come back to bite me in the future.&lt;/p&gt;

&lt;h2 id=&quot;eliminate-its-hard&quot;&gt;Eliminate: it’s hard&lt;/h2&gt;

&lt;p&gt;I really like following up on things, to a fault. I don’t like leaving loose
ends, unanswered emails, or unspoken expectations. I find it helpful to schedule
time to explicitly eliminate certain work, and communicate explicit expectations
to everyone around me about that. Because of that, that’s where the most of my
procrastination happens. Telling people “no” isn’t always easy, and I still
don’t have the best process for combing through the “Eliminate” quadrant.&lt;/p&gt;

&lt;p&gt;I know many people are a lot more comfortable letting unimportant things quietly
fall through the cracks, and there’s nothing wrong with that.&lt;/p&gt;

</description>
        <pubDate>Mon, 10 Jul 2023 15:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/the-eisenhower-matrix/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/the-eisenhower-matrix/</guid>
        
        
        <category>Productivity</category>
        
        <category>Work</category>
        
      </item>
    
      <item>
        <title>High stakes email checklist</title>
        <description>&lt;p&gt;I’m making a little cheat sheet for myself. As I progress in my career, much of
my work revolves around communication, and I’d be remiss if I don’t share a
formal framework I use. I like checklists, spreadsheets, and anything else that
organizes the world around me, and it’s fun to make one about communications.&lt;/p&gt;

&lt;h2 id=&quot;checklist&quot;&gt;Checklist&lt;/h2&gt;

&lt;p&gt;This is a checklist for high stakes emails, let’s dig in:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Goals&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;What are you trying to accomplish? Why? (It could be worth asking why
multiple times.)&lt;/li&gt;
      &lt;li&gt;Will this email help you accomplish the goal?&lt;/li&gt;
      &lt;li&gt;Can the goal be summarized in a single sentence? If not, it’s probably not
specific enough.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Audience&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;Who is the audience?&lt;/li&gt;
      &lt;li&gt;What does the audience care about? How can you connect the subject of your
email to things they care about?&lt;/li&gt;
      &lt;li&gt;Does every recipient need to be there? Who’s missing?&lt;/li&gt;
      &lt;li&gt;What action do you want the reader to take? Is there a clear call for
action? For executive communications (who have notoriously short attention
span), you’ll want to both start and end with the same call for action.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Content&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;Is there a nuance that would be lost in email that requires face to face
conversation? Does this need to be an email?&lt;/li&gt;
      &lt;li&gt;Does every sentence and paragraph support your goal?&lt;/li&gt;
      &lt;li&gt;Does this need a TL;DR?&lt;/li&gt;
      &lt;li&gt;Is the narrative structure in place? Is there a clear beginning, middle, and
end? No need to write a novel, but without this the content risks being
disjoined.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Impulse&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;Is now the best time to send it? Friday afternoon is almost always a no-no,
unless you purposely want the reader to pay less attention to the issue.&lt;/li&gt;
      &lt;li&gt;If this was shared broadly, would you rephrase it? If yes - you definitely
should.
        &lt;ul&gt;
          &lt;li&gt;To double down, if email is about someone, write as if that someone will
eventually see it. It’s fine to be candid, it’s not fine to be rude.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Are you angry? Upset? I get notoriously cranky in the late afternoon, and
avoid sending anything important until the next day - or, if time sensitive,
until taking a short break or a walk.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;example&quot;&gt;Example&lt;/h2&gt;

&lt;p&gt;Let’s apply this to an example. Say, I’m writing a book, and the editor I’m
working with hasn’t been responsive. I’ve tried talking to them about it, but
they’re not responsive. I think it’s the time to escalate to their supervisor.&lt;/p&gt;

&lt;p&gt;Here’s the quick, dirty, and impulsive draft I would write:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Hello X,&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;Y hasn’t been responsive when reviewing the chapters, and it’s really
difficult to get back to chapters after a whole week passes by. By then I
don’t even have the context! I’ve raised this multiple times and to no avail.
Can you please get Y to be more responsive or find another editor for me to
work with? I haven’t been able to make meaningful progress in a month!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Pretty brusque, isn’t it? I don’t normally dissect every email like this, but
sometimes it helps to take a closer look and formalize the decision making
behind each sentence. Thankfully, much of this becomes habitual over time.&lt;/p&gt;

&lt;h3 id=&quot;goals&quot;&gt;Goals&lt;/h3&gt;

&lt;p&gt;First things first, I want the editor to be more responsive. Why? To have a
shorter feedback loop when it comes to making changes. Why? To make it easier
to write - it’s difficult to come back to the chapter after a long amount of
time passed. Why? This pushes back timelines for each chapter.&lt;/p&gt;

&lt;p&gt;I don’t really care about how to achieve this goal: the same person can be
more responsive, or maybe I get a new point of contact to work with. Maybe
there are other options I haven’t considered.&lt;/p&gt;

&lt;p&gt;To summarize in a single sentence, the goal is to “reduce the feedback loop”.&lt;/p&gt;

&lt;h3 id=&quot;audience&quot;&gt;Audience&lt;/h3&gt;

&lt;p&gt;The audience is the editor’s supervisor, or maybe someone else from the
editorial team who’ll have the incentive to escalate.&lt;/p&gt;

&lt;p&gt;I know that the timelines are very important to this publisher, which is
something I can use. I can frame the concerns around impacts of the timeline -
even if it’s not something I necessarily care about myself.&lt;/p&gt;

&lt;p&gt;Since there are multiple ways to achieve my goal and I don’t particularly care
about how, I can make the call for action open ended. I’m doing this because I’m
comfortable with either outcomes - like the editor not being to improve response
times, but the publisher providing more leniency around the schedule - which,
while isn’t ideal, still helps.&lt;/p&gt;

&lt;h3 id=&quot;content&quot;&gt;Content&lt;/h3&gt;

&lt;p&gt;As multiple people can help me accomplish a goal, and I might not be aware of
all of relevant parties - email format works best.&lt;/p&gt;

&lt;p&gt;Narrative structure here is simple - I have a problem (the beginning), here’s why
it’s bad (the middle), let’s fix it (the end).&lt;/p&gt;

&lt;p&gt;This email is short enough not to require a TL;DR.&lt;/p&gt;

&lt;h3 id=&quot;impulse&quot;&gt;Impulse&lt;/h3&gt;

&lt;p&gt;As my concern is about a particular person, I have to talk about them. I don’t
want to avoid candor, but I can approach the situation with empathy and
assumption of best intentions something along the lines of: “I understand X has
other commitments”. Focusing on facts and leading with empathy would help here.&lt;/p&gt;

&lt;p&gt;Having an unresponsive editor is definitely frustrating, so it’s worth taking a
step back, and maybe paying extra attention - there’s no use having frustration
show through.&lt;/p&gt;

&lt;h3 id=&quot;the-result&quot;&gt;The result&lt;/h3&gt;

&lt;p&gt;After running through the checklist, we end up with (what I hope is) a better,
more actionable, and less icky email:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Hello X,&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;When working with Y, it takes up to a week for me to receive feedback on the
chapters I wrote. I understand Y is working with multiple engagements, but
I’m concerned about the timelines for the book. If we continue as is, it’s
likely we’ll have to push publishing date by X months.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;Could you help me find a resolution here?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It’s short, omits unnecessary details, and leaves the reader with a clear (but
open ended) call for action. Now, all that’s left is to schedule send that
email in a morning, and wait for a response!&lt;/p&gt;
</description>
        <pubDate>Thu, 06 Jul 2023 20:05:13 +0000</pubDate>
        <link>https://rosipov.com/blog/high-stakes-email-checklist/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/high-stakes-email-checklist/</guid>
        
        
        <category>Work</category>
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Adjusting to working from home</title>
        <description>&lt;p&gt;Like many, I moved to working from home during the COVID-19 pandemic. Parts of California enacted shelter-in-place order back in March, and it’s been over a month and a half since then. I briefly worked from home back in 2013 as a freelancer - and I really got the whole work/life balance thing wrong. So this time around I’ve decided to approach remote work with a plan.&lt;/p&gt;

&lt;p&gt;My day begins around 7 or 8 am, without too much deviation from schedule. I used to bike to work before the pandemic, and I try to head out for a 30 minute ride in a morning a few days a week. There aren’t a lot of people out early, and I love starting my day with some light cardio.&lt;/p&gt;

&lt;p&gt;I share breakfast and coffee with my partner, often while catching up on our favorite morning TV show. At the moment I’m being educated on Avatar: The Last Airbender. Ugh, Azula!&lt;/p&gt;

&lt;p&gt;Breakfast is followed by a calendar sync. We check if either of us have overlapping or sensitive meetings. That way we know which calls either of us needs to take in another room - and which are okay to have in our workspace. Both of our desks are in the living room, and we use &lt;a href=&quot;https://amzn.to/3ferNbP&quot;&gt;noise cancelling headphones&lt;/a&gt; throughout the day to help with focus. During the day we convert our bedroom to an ad hoc conference room.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/wfh-setup.jpg&quot; alt=&quot;A picture of my work-from-home setup.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;By 9 am, I have my desk set up: I replace my personal laptop with its corporate-issued counterpart. An &lt;a href=&quot;https://amzn.to/2SwMCpc&quot;&gt;external webcam&lt;/a&gt; helps with the image quality, and a dedicated &lt;a href=&quot;https://amzn.to/2W0vREV&quot;&gt;display&lt;/a&gt;, keyboard (&lt;a href=&quot;http://www.vortexgear.tw/vortex2_2.asp?kind=47&amp;amp;kind2=220&amp;amp;kind3=&amp;amp;kind4=999&quot;&gt;Vortex Pok3r&lt;/a&gt; with &lt;a href=&quot;https://drop.com/buy/91600&quot;&gt;Matt3o Nerd DSA&lt;/a&gt; key cap set), and a mouse (&lt;a href=&quot;https://amzn.to/2SwNWbE&quot;&gt;Glorious Model O-&lt;/a&gt;) alleviate the cramped feeling I get when using a laptop.&lt;/p&gt;

&lt;p&gt;Most importantly, I’m showered, groomed, and dressed by this time. While working in whatever I slept in has worked well for occasional remote Fridays, it proved to be unsustainable for prolonged remote work. Whenever I wasn’t dressed for work, I found myself slowly drifting towards the couch, and trading a laptop for my phone. In fact, some days I dress up even more than I used to when going to the office!&lt;/p&gt;

&lt;p&gt;This is where the clear separation between home and work is established. I’m fully dressed and have my workstation set up: it’s work time!&lt;/p&gt;

&lt;p&gt;I spend the next few hours busy with heads down work, usually working on a design, writing some code, or doing anything which requires concentration. Playing something like a &lt;a href=&quot;https://rainycafe.com/&quot;&gt;Rainy Cafe&lt;/a&gt; in the background helps me stay in the zone.&lt;/p&gt;

&lt;p&gt;Back in the office, 11 am used to be my workout time: a gym buddy of mine would consistency exercise at 11 am, and I adopted the habit of joining him over the past few years. I decided not to move the time slot: at 11 am I change into my workout clothes and exercise: 30 to 45 minutes of bodyweight exercises or online classes use up the remainder of my morning willpower. I’m so glad there are thousands of YouTube videos to keep me company!&lt;/p&gt;

&lt;p&gt;My partner and I alternate cooking, and the next hour or so is reserved for cooking, lunch together, and cleanup. Remember the noise cancelling headphones? We haven’t heard (and often seen) each other since morning! Getting to share lunch daily has definitely been the highlight of staying at home for me.&lt;/p&gt;

&lt;p&gt;After that - back to work: design reviews, meetings, busywork.&lt;/p&gt;

&lt;p&gt;I wrap up around 5 pm, and make a point not to work past that. I swap out my work laptop for my own (even if I’m not planning to use it), and stow it away for the night. Disassembling my setup paired with showering and changing into house clothes creates a solid dividing line between work and home.&lt;/p&gt;

&lt;p&gt;Cooking dinner together and evening activities follow, but that’s a story for another time. Stay healthy and productive!&lt;/p&gt;

</description>
        <pubDate>Mon, 04 May 2020 17:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/adjusting-to-wfh/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/adjusting-to-wfh/</guid>
        
        
        <category>Productivity</category>
        
        <category>Work</category>
        
      </item>
    
      <item>
        <title>Google Drive on Linux with rclone</title>
        <description>&lt;p&gt;Recently Dropbox hit me with the &lt;a href=&quot;https://help.dropbox.com/accounts-billing/settings-sign-in/computer-limit&quot;&gt;following announcement&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Basic users have a three device limit as of March 2019.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Being the “basic” user, and relying on Dropbox across multiple machines, I got unreasonably upset (“How dare you deny me free access to your service?!”) and started looking for a replacement.&lt;/p&gt;

&lt;p&gt;I already store quite a lot of things in Google Drive, so it seemed like a no brainer: I migrated all my machines to Google Drive overnight. There was but only one problem: Google Drive has official clients for Windows and Mac, but there’s nothing when it comes to Linux.&lt;/p&gt;

&lt;p&gt;I found the Internets to be surprisingly sparse on the subject, and I had to try multiple solutions and spent more time than I’d like researching options.&lt;/p&gt;

&lt;p&gt;The best solution for me turned out to be &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rclone&lt;/code&gt;, which mounts Google Drive as a directory. It requires &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rclone&lt;/code&gt; service to be constantly running in order to access the data, which is a plus for me - I’ve accidentally killed Dropbox daemon in the past and had to deal with conflicts in my files.&lt;/p&gt;

&lt;p&gt;Install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rclone&lt;/code&gt; (&lt;a href=&quot;https://rclone.org/install/&quot;&gt;instructions&lt;/a&gt;):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;curl https://rclone.org/install.sh | sudo bash
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;From then on, &lt;a href=&quot;https://rclone.org/drive/&quot;&gt;rclone website some documentation&lt;/a&gt; when it comes to the setup. I found it somewhat difficult to parse, so here it is paraphrased:&lt;/p&gt;

&lt;p&gt;Launch &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rclone config&lt;/code&gt; and follow the prompts:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n) New remote&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;name&amp;gt; remote&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Type of storage to configure: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Google Drive&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Leave &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;client_id&amp;gt;&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;client_secret&amp;gt;&lt;/code&gt; blank&lt;/li&gt;
  &lt;li&gt;Scope: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;1 \ Full access to all files&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Leave &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;root_folder_id&amp;gt;&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;service_account_file&amp;gt;&lt;/code&gt; blank&lt;/li&gt;
  &lt;li&gt;Use auto config? &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Configure this as a team drive? &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;Is this OK? &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From here on, you can interact with your Google Drive by running &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rclone&lt;/code&gt; commands (e.g. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rclone ls remote:&lt;/code&gt; to list top level files). But I am more interested in a continuous running service and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mount&lt;/code&gt; is what I need:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rclone mount remote: $HOME/Drive
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now my Google Drive is accessible at &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/Drive&lt;/code&gt;. All that’s left is to make sure the directory is mounted on startup.&lt;/p&gt;

&lt;p&gt;For Ubuntu/Debian, I added the following line to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/rc.local&lt;/code&gt; (before &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;exit 0&lt;/code&gt;, and you need &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo&lt;/code&gt; access to edit the file):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;rclone mount remote: $HOME/Drive
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;For my i3 setup, all I needed was to add the following to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/i3/config&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;exec rclone mount remote: $HOME/Drive
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It’s been working without an issue for a couple of weeks now - and my migration from Dropbox turned out to be somewhat painless and quick.&lt;/p&gt;

</description>
        <pubDate>Sun, 23 Jun 2019 07:00:00 +0000</pubDate>
        <link>https://rosipov.com/blog/google-drive-on-linux-with-rclone/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/google-drive-on-linux-with-rclone/</guid>
        
        
        <category>CLI</category>
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Desktop notifications from Chrome Secure Shell</title>
        <description>&lt;p&gt;For the past year or two I’ve been working in the cloud. I use Chrome &lt;a href=&quot;https://chrome.google.com/webstore/detail/secure-shell/pnhechapfaindjhompbnflcldabbghjo?hl=en&quot;&gt;Secure Shell&lt;/a&gt; to connect to my machines, and it works rather well. In fact, I moved away from my work Linux/Mac laptops towards an &lt;a href=&quot;http://amzn.to/2hv68Ck&quot;&gt;HP Chromebook&lt;/a&gt;, which fullfilled both requirements I had: a browser and a terminal. One thing I missed about a Linux machine though is lack of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;notify-send&lt;/code&gt;-like functionality, especially when working with long-running builds.&lt;/p&gt;

&lt;p&gt;Yesterday I pinged hterm team for assistance with this matter, and turns out recent release of Secure Shell supports Chrome desktop notifications! Furthermore, two amazing engineers (thanks Andrew and Mike!) crafted an &lt;a href=&quot;https://chromium-review.googlesource.com/c/601549/3/hterm/etc/hterm-notify.sh&quot;&gt;hterm-notify&lt;/a&gt; script, which propagates notifications to Chrome, and by extent to desktop!&lt;/p&gt;

&lt;p&gt;I made a few tiny changes, mainly since I don’t use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;screen&lt;/code&gt;, and tmux sets my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$TERM&lt;/code&gt; to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;screen-256color&lt;/code&gt; for some reason:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/sh
# Copyright 2017 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# Write an error message and exit.
# Usage: &amp;lt;message&amp;gt;
die() {
  echo &quot;ERROR: $*&quot;
  exit 1
}

# Send a notification.
# Usage: [title] [body]
notify() {
  local title=&quot;${1-}&quot; body=&quot;${2-}&quot;

  case ${TERM-} in
  screen*)  # This one&apos;s really tmux
    printf &apos;\ePtmux;\e\e]777;notify;%s;%s\a\e\\&apos; &quot;${title}&quot; &quot;${body}&quot;
    ;;
  *)        # This one&apos;s plain hterm
    printf &apos;\e]777;notify;%s;%s\a&apos; &quot;${title}&quot; &quot;${body}&quot;
    ;;
  esac
}

# Write tool usage and exit.
# Usage: [error message]
usage() {
  if [ $# -gt 0 ]; then
    exec 1&amp;gt;&amp;amp;2
  fi
  cat &amp;lt;&amp;lt;EOF
Usage: hterm-notify [options] &amp;lt;title&amp;gt; [body]

Send a notification to hterm.

Notes:
- The title should not have a semi-colon in it.
- Neither field should have escape sequences in them.
  Best to stick to plain text.
EOF

  if [ $# -gt 0 ]; then
    echo
    die &quot;$@&quot;
  else
    exit 0
  fi
}

main() {
  set -e

  while [ $# -gt 0 ]; do
    case $1 in
    -h|--help)
      usage
      ;;
    -*)
      usage &quot;Unknown option: $1&quot;
      ;;
    *)
      break
      ;;
    esac
  done

  if [ $# -eq 0 ]; then
    die &quot;Missing message to send&quot;
  fi
  if [ $# -gt 2 ]; then
    usage &quot;Too many arguments&quot;
  fi

  notify &quot;$@&quot;
}
main &quot;$@&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Throwing this in as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/bin/notify&lt;/code&gt; (not forgetting to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chmod +x&lt;/code&gt; and having &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/bin&lt;/code&gt; in the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PATH&lt;/code&gt;) I can get a notification when a particular long running command is complete:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;sleep 30 &amp;amp;&amp;amp; notify Hooray &quot;The sleep&apos;s done!&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Fri, 04 Aug 2017 17:33:16 +0000</pubDate>
        <link>https://rosipov.com/blog/desktop-notifications-from-chrome-secure-shell/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/desktop-notifications-from-chrome-secure-shell/</guid>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Profiling slow bashrc</title>
        <description>&lt;p&gt;I’ve recently noticed that it takes a long time for my bash to load. I’ve found
&lt;a href=&quot;http://stackoverflow.com/a/5015179/2578489&quot;&gt;following StackOverflow answer&lt;/a&gt; to be useful, and I based my solution to find a
startup time hog in my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bashrc&lt;/code&gt; upon it.&lt;/p&gt;

&lt;p&gt;First off, add following few lines to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/etc/bash.bashrc&lt;/code&gt;,
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.bash_profile&lt;/code&gt;, or wherever you’d like to begin tracing the script:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;PS4=&apos;+ $(date &quot;+%s.%N&quot;)\011 &apos;
exec 3&amp;gt;&amp;amp;2 2&amp;gt;/tmp/bashstart.$$.log
set -x
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And add following few lines where you want to stop the trace:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;set +x
exec 2&amp;gt;&amp;amp;3 3&amp;gt;&amp;amp;-
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now start your bash session (you can simply open a new terminal Window for
that). The above will create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/tmp/bashstart.&amp;lt;PID&amp;gt;.log&lt;/code&gt;. To analyze it, I wrote
a little Python script:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;import argparse
import heapq

parser = argparse.ArgumentParser(description=&apos;Analyze bashstart log for speed.&apos;)
parser.add_argument(&apos;filename&apos;, help=&apos;often /tmp/bashstart.&amp;lt;PID&amp;gt;.log&apos;)
parser.add_argument(&apos;-n&apos;, default=20, help=&apos;number of results to show&apos;)
args = parser.parse_args()
filename, n = args.filename, int(args.n)

with open(filename, &apos;r&apos;) as f:
    q = []
    prev_time = None
    for line in f.readlines():
        line = line.split()
        if &apos;+&apos; not in line[0] or len(line) &amp;lt; 3:
            continue
        text = &apos; &apos;.join(line[2:])
        seconds, nanoseconds = line[1].split(&apos;.&apos;)
        time = int(nanoseconds)
        diff = time - prev_time if prev_time is not None else 0
        prev_time = time
        heapq.heappush(q, (diff, text))

for diff, text in heapq.nlargest(n, q):
    print float(diff) / 1000000000, &apos;s:&apos;, text
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Save it as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bashprofile.py&lt;/code&gt;, and run it as follows (replace file name with an
appropriate):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;python bashprofile.py /tmp/bashstart.2831.log -n 20
0.050056909 s: _powerline_init_tmux_support
0.045323022 s: _powerline_setup_prompt
0.044722024 s: _powerline_setup_prompt
0.044423727 s: &apos;[&apos; -f /usr/local/google/home/ruslano/.local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh &apos;]&apos;
0.044364097 s: &apos;[&apos; -f /usr/local/google/home/ruslano/.local/lib/python2.7/site-packages/powerline/bindings/bash/powerline.sh &apos;]&apos;
0.044137159 s: _powerline_init_tmux_support
0.015839574 s: __shell_name=bash
0.010850276 s: command which which
0.010105462 s: PS2=&apos;\[\]  \[\] \[\]&apos;
0.010000598 s: PS3=&apos; Select variant  &apos;
0.009837956 s: complete -F _svn -o default -X &apos;@(*/.svn|*/.svn/|.svn|.svn/)&apos; svn
0.009767517 s: PS2=&apos;\[\]  \[\] \[\]&apos;
0.0095753 s: PS3=&apos; Select variant  &apos;
0.007915565 s: other_utils=(ant automake autoreconf libtoolize make mount patch readlink)
0.00771205 s: for script in version functions/selector cd functions/cli cli override_gem
0.007008299 s: for gnu_util in &apos;&quot;${gnu_utils[@]}&quot;&apos;
0.00693653 s: complete -F _crow crow
0.006803049 s: complete -F _svn -o default -X &apos;@(*/.svn|*/.svn/|.svn|.svn/)&apos; svn
0.006672906 s: for script in version functions/selector cd functions/cli cli override_gem
0.005912399 s: for entry in &apos;${scripts[@]}&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In my example, &lt;a href=&quot;https://github.com/powerline/powerline&quot;&gt;Powerline&lt;/a&gt; turned out to be a massive hog. Looks like I’ll
have to troubleshoot the speed or plain disable it.&lt;/p&gt;

&lt;p&gt;Don’t forget to remove the lines you added to your bash configuration files
after you’re done profiling.&lt;/p&gt;

</description>
        <pubDate>Wed, 15 Jul 2015 17:07:53 +0000</pubDate>
        <link>https://rosipov.com/blog/profiling-slow-bashrc/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/profiling-slow-bashrc/</guid>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Managing cd bookmarks with apparix</title>
        <description>&lt;p&gt;A couple of months ago I discovered apparix: a set of commands which augment
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cd&lt;/code&gt; with bookmarks. It really is an amazing feeling when you zap between
multiple directories far away just with a couple of keystrokes! Apparix
provides three commands I use daily: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;to&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bm&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apparix&lt;/code&gt; (program
suggests aliasing last one to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;als&lt;/code&gt;). Here’s how I use it:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;$ pwd
/Users/ruslan
$ apparix
--- portals
--- expansions
--- bookmarks
j dotfiles     /Users/ruslan/.dotfiles
j blog         /Users/ruslan/Projects/ruslanosipov.github.io
$ to blog
$ pwd
/Users/ruslan/Projects/ruslanosipov.github.io
$ cd source/_posts
$ bm posts
added: posts -&amp;gt; /Users/ruslan/Projects/ruslanosipov.github.io/source/_posts
$ to dotfiles
$ pwd
/Users/ruslan/.dotfiles
$ to posts
$ pwd
/Users/ruslan/Projects/ruslanosipov.github.io/source/_posts
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The example above is self explanatory: you can see how over the span of a year
apparix saves hours of navigating directories you frequent.&lt;/p&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;If you don’t like reading manuals, installation might be a confusing. But in
reality it’s straightforward, you just need to add some functions or aliases to
your shell’s configuration file.&lt;/p&gt;

&lt;p&gt;Install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;apparix&lt;/code&gt; using your favorite package manager, and then pipe examples
apparix offers into your shell’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rc&lt;/code&gt; file.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;apparix --shell-examples &amp;gt;&amp;gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Open your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.bashrc&lt;/code&gt; (or another corresponding configuration file), and pick the
preferred way of using apparix: you’ll see functions for bash and aliases for
csh given as examples. Pick whatever works for your shell, source your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rc&lt;/code&gt;
file, and you’re all set!&lt;/p&gt;

&lt;p&gt;Happy jumping!&lt;/p&gt;
</description>
        <pubDate>Sat, 21 Feb 2015 00:25:45 +0000</pubDate>
        <link>https://rosipov.com/blog/managing-cd-bookmarks-with-apparix/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/managing-cd-bookmarks-with-apparix/</guid>
        
        <category>apparix</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Ranger - the CLI file manager</title>
        <description>&lt;p&gt;Ranger is a lightweight but powerful file manager with Vi-like key bindings.
It shines at exploring file trees, looking for specific files, and performing
bulk operations on folders and files. Three column layout will be very similar
to Mac OS X users: center column shows contents of the current directory, left
column lists contents of a parent directory, and the right column contains
preview for the selected file or folder.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/ranger-file-preview.png&quot; alt=&quot;File preview screen in Ranger: parent directory in the left column, current directory in the center column, and selected file preview in the left column.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Ranger supports movement with familiar to Vi users &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;h&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;j&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;k&lt;/code&gt;, and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;l&lt;/code&gt; keys,
has internal command line which is invoked with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:&lt;/code&gt;, as well as many other
features and key bindings similar to Vi. Another great selling point - Ranger
can be extended with custom commands and key bindings. Utility is written in
Python, therefore all the commands are nothing more than Python scripts.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/ranger-marking-files.png&quot; alt=&quot;Marking files for deletion in Ranger.  Files highlighted in yellow will be deleted by executing `:delete` command.&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;installation&quot;&gt;Installation&lt;/h2&gt;

&lt;p&gt;Ranger is easy to install and can be found in most public repositories, just
install &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ranger&lt;/code&gt; package using your favorite package manager. While you’re at
it, you may want to install some external utilities to help Ranger properly
display file previews (list is taken from &lt;a href=&quot;https://wiki.archlinux.org/index.php/ranger&quot;&gt;ArchWiki page on Ranger&lt;/a&gt;):&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;atool&lt;/code&gt; for archives.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;highlight&lt;/code&gt; for syntax highlighting.
![for image previews]]CII.(libcaca&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;)(&lt;/code&gt;))&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lynx&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;w3m&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elinks&lt;/code&gt; for HTML.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mediainfo&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;perl-image-exiftool&lt;/code&gt; for media file information.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;poppler&lt;/code&gt; (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pdftotext&lt;/code&gt;) for PDF.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;transmission-cli&lt;/code&gt; for BitTorrent information.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;w3m&lt;/code&gt; for image previews.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After all the dependencies are installed, quickly start up &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ranger&lt;/code&gt;, exit it
with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;q&lt;/code&gt;, and run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ranger --copy-config=all&lt;/code&gt; to generate configuration files in
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/ranger&lt;/code&gt;.&lt;/p&gt;

&lt;h2 id=&quot;usage&quot;&gt;Usage&lt;/h2&gt;

&lt;p&gt;Here are a few of the key bindings and commands I found useful:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Use spacebar to select files one by one. By selecting multiple files, you can
perform bulk operations on them. Use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;V&lt;/code&gt; to perform visual selection.
Lowercase &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;v&lt;/code&gt; reverses current selection. For instance, you can run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:delete&lt;/code&gt;
after selecting multiple files and folders.&lt;/li&gt;
  &lt;li&gt;As mentioned above, execute &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:delete&lt;/code&gt; to remove currently selected file (or
files).&lt;/li&gt;
  &lt;li&gt;To fullscreen a preview window, hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i&lt;/code&gt;. Hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i&lt;/code&gt; again to return the preview
window to it’s normal size.&lt;/li&gt;
  &lt;li&gt;Vi’s &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gg&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;G&lt;/code&gt; allow you to jump to the top and bottom of the file list
respectively.&lt;/li&gt;
  &lt;li&gt;Hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;zh&lt;/code&gt; to toggle hidden files display.&lt;/li&gt;
  &lt;li&gt;As in Vim, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/&lt;/code&gt; searches for a file in a current buffer, while &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;n&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;N&lt;/code&gt; let
you navigate to the next and previous matches respectively.&lt;/li&gt;
  &lt;li&gt;Similarly, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:filter&lt;/code&gt; allows you to only limit your view to the files matching
a pattern. It’s also interactive - changes are applied as you type.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you’re an avid Vim user, you’ll find using Ranger surprisingly intuitive.
Otherwise you might get confused and scared away, probably for a good reason.
Ranger is designed to provide Vi-like feel for file browsing, and it does that
job well.&lt;/p&gt;

</description>
        <pubDate>Mon, 09 Feb 2015 03:33:16 +0000</pubDate>
        <link>https://rosipov.com/blog/ranger-the-cli-file-manager/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/ranger-the-cli-file-manager/</guid>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Power of the command line</title>
        <description>&lt;p&gt;&lt;em&gt;Disclaimer: I am not advocating any specific tools or methodologies, but
sharing a workflow I find to be efficient and pleasant.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I am a huge fan of working with CLI applications. I use Vim for editing code,
composing emails, and various kinds of writing. When I have to manipulate huge
amounts of email, I use Mutt: it’s intuitive tagging and regular expression
engine are extremely useful for the task. I employ &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;awk&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grep&lt;/code&gt;, and
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sed&lt;/code&gt; - Linux utilities which allow for precise and fast text manipulation.&lt;/p&gt;

&lt;p&gt;However, I would not use CLI browsers like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;elinks&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;w3m&lt;/code&gt;, and the idea of
reading every email in Mutt gives me the creeps. I love the visualization web
browser offers, something text-based prompt is not able to provide. And it
doesn’t have to.&lt;/p&gt;

&lt;p&gt;There are two components to most of the tasks performed on a computer: analyzing
output and entering input. Certain tasks employ one component more than the
other. In most modern applications it’s rare to have both solid control from
the user perspective and a pleasant informative UI. With increased visual
component, it’s more time consuming to make the application do what you need,
especially if your needs are esoteric. With more editing power, visual display
becomes less complex in order to make editing tasks easier.&lt;/p&gt;

&lt;h2 id=&quot;where-visual-tools-fall-short&quot;&gt;Where visual tools fall short&lt;/h2&gt;

&lt;p&gt;What is the alternative? Using multiple programs with different levels of
control to accomplish one task: to edit text. Each of the programs excels in
it’s own field: word processing software allows for beautiful fonts and document
presentation, IDE lets you access aggregated meta information about your
application. But most of the IDEs and word processors lack the powerful tools
needed to manipulate the foundation of what user is working with - plain text.&lt;/p&gt;

&lt;h2 id=&quot;ode-to-plain-text&quot;&gt;Ode to plain text&lt;/h2&gt;

&lt;p&gt;I spend a lot of time writing and editing plain text. Be it source code, emails,
documentation, or even blog posts. These tasks take up significant amount of my
day, and it is only logical to substitute some of the visual presentation
capabilities for effectiveness.&lt;/p&gt;

&lt;p&gt;It is hard to mentally process data which is not explicitly and unambiguously
visible: different levels of headings, hidden meta information. Unlike more
obscuring formats, plain text is all there is - it has nothing to hide. If you
don’t see it - it’s not there. If you do see it - you know exactly what it is.&lt;/p&gt;

&lt;p&gt;One of my favorite tips from “&lt;a href=&quot;http://amzn.to/1yRe6Th&quot;&gt;Pragmatic Programmer&lt;/a&gt;” goes:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Use a single editor well&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So I learned one editor well, and now I use it for all my writing and editing
needs. I don’t have to jump between IDE, browser, and office software. Most of
the text I edit is manipulated with one editor. There is only one set of key
bindings to know, one skill to master and hone. Fast, without any additional
thought, using single text editor and all of it’s powerful features is imprinted
in muscle memory. One less task to worry about.&lt;/p&gt;

&lt;p&gt;I write my documents in Markdown format, and later convert them to the desired
output using &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;pandoc&lt;/code&gt;: be it an HTML page, PDF, or a Microsoft Word document. I
use Vim, so I can rearrange paragraphs or manipulate lines within a couple of
keystrokes. Since I spend so much time editing text, I also touch type, which
makes me even more effective at the given task.&lt;/p&gt;

&lt;h2 id=&quot;harness-the-power-of-the-command-line&quot;&gt;Harness the power of the command line&lt;/h2&gt;

&lt;p&gt;When it comes to bulk manipulating files or working with version control -
there is no better candidate then command line applications. There’s no need to
go through a number of obscure menus, ticking and unticking checkboxes, and
hoping that your desired result can be achieved with a program’s GUI.&lt;/p&gt;

&lt;p&gt;Let’s look at a few scenarios some users face in their daily workflow.&lt;/p&gt;

&lt;h3 id=&quot;creating-a-backup&quot;&gt;Creating a backup&lt;/h3&gt;

&lt;p&gt;With GUI, you’d have to take multiple steps:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Right click &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;file&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Left click on “Copy”.&lt;/li&gt;
  &lt;li&gt;Right click on some empty space.&lt;/li&gt;
  &lt;li&gt;Left click on “Paste”.&lt;/li&gt;
  &lt;li&gt;Right click on a newly created copy.&lt;/li&gt;
  &lt;li&gt;Left click on “Rename”.&lt;/li&gt;
  &lt;li&gt;Switch to a keyboard.&lt;/li&gt;
  &lt;li&gt;Type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;file.bak&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The above steps can be sped up using shortcuts like &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-c&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-v&lt;/code&gt;, but not by
much. Here’s an alternative in bash:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;cp file{,.bak}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;While first variant would do great for a novice or a casual user - the second
method would be much more preferred by an experienced user whose concern is
speed.&lt;/p&gt;

&lt;h3 id=&quot;recursively-bulk-replacing-text-in-a-directory&quot;&gt;Recursively bulk replacing text in a directory&lt;/h3&gt;

&lt;p&gt;Let’s assume we want to do a bulk replace text in a directory and all it’s
subdirectories. We have our trusted IDE, let’s assume this IDE is already
configured to work with a desired directory.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Open your IDE.&lt;/li&gt;
  &lt;li&gt;Select “Edit” menu.&lt;/li&gt;
  &lt;li&gt;Select “Find and Replace” submenu.&lt;/li&gt;
  &lt;li&gt;Click on a “Find” input field.&lt;/li&gt;
  &lt;li&gt;Switch to a keyboard.&lt;/li&gt;
  &lt;li&gt;Type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;function_to_replace&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Switch to a mouse.&lt;/li&gt;
  &lt;li&gt;Click on “Replace” input field.&lt;/li&gt;
  &lt;li&gt;Switch to a keyboard.&lt;/li&gt;
  &lt;li&gt;Type &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;new_function_name&lt;/code&gt;.&lt;/li&gt;
  &lt;li&gt;Switch to a mouse.&lt;/li&gt;
  &lt;li&gt;Enable “Search in subdirectories” checkbox.&lt;/li&gt;
  &lt;li&gt;Click “OK”.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Again, this can be shortened a bit with some keyboard shortcuts, but not by
much. You still have to switch between keyboard and a mouse a total of 4 times,
and you still have to click through all the menus. This does get time consuming
if you do this often. Now let’s try to perform the same task in command line:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;find . -type f | xargs sed -i &apos;s/function_to_replace/new_function_name/g&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Much faster, if you’re able to memorize the structure. And remembering what the
commands do is much easier than it looks. Especially with the help of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;man&lt;/code&gt; or,
even better, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;bro&lt;/code&gt; (see &lt;a href=&quot;http://bropages.org&quot;&gt;http://bropages.org&lt;/a&gt; for latter).&lt;/p&gt;

&lt;p&gt;The above example demonstrates one of the biggest advantages of command line
interfaces: an ability to redirect an output of one program into another,
chaining the tools together. In this example, we first get a list of all files
use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;find&lt;/code&gt; tool, and then run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sed&lt;/code&gt; tool on each of those files in order to
replace the text.&lt;/p&gt;

&lt;p&gt;An output from any CLI tool can be fed into any other CLI tool. This allows for
countless possibilities and high adaptability to unscripted scenarios.&lt;/p&gt;

&lt;h2 id=&quot;is-it-worth-learning-cli-tools-over-their-gui-counterparts&quot;&gt;Is it worth learning CLI tools over their GUI counterparts?&lt;/h2&gt;

&lt;p&gt;This depends on what your intentions are. If you’re a power user who writes and
edits a lot of text or manipulates bulk amounts of text on a daily basis - than
it’s definitely worth it. Time spent learning these tools will pay off. But if
you’re a casual user whose needs end with writing an occasional email or two -
then you probably don’t need to worry about this.&lt;/p&gt;

&lt;p&gt;Hell, if you’ve read this far - this means you’re the former case. I can
practically guarantee that you will benefit from employing command line tools
and modal editors over their GUI counterparts.&lt;/p&gt;

&lt;p&gt;I’ve put together a table for comparison between two. Indeed, there are
different times when either GUI or CLI tools excel:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Factor&lt;/th&gt;
      &lt;th&gt;CLI&lt;/th&gt;
      &lt;th&gt;GUI&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;Ability to combine/chain tools&lt;/td&gt;
      &lt;td&gt;Yes&lt;/td&gt;
      &lt;td&gt;No&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Easy to learn&lt;/td&gt;
      &lt;td&gt;No&lt;/td&gt;
      &lt;td&gt;Yes&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Efficient for a novice user&lt;/td&gt;
      &lt;td&gt;No&lt;/td&gt;
      &lt;td&gt;Yes&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Efficient for an experienced user&lt;/td&gt;
      &lt;td&gt;Yes&lt;/td&gt;
      &lt;td&gt;No&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Good for occasional use&lt;/td&gt;
      &lt;td&gt;No&lt;/td&gt;
      &lt;td&gt;Yes&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Good for repetitive tasks&lt;/td&gt;
      &lt;td&gt;Yes&lt;/td&gt;
      &lt;td&gt;No&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;Presents visual information well&lt;/td&gt;
      &lt;td&gt;No&lt;/td&gt;
      &lt;td&gt;Yes&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;As you can see - both CLI and GUI programs have their pluses and minuses. CLI
tools seem to appeal to experienced users, while GUI tools are great for novice
users and do excel in representing visual information. No matter what kind of
interface you prefer, it’s crucially important to use the right tool for the job.&lt;/p&gt;

</description>
        <pubDate>Fri, 06 Feb 2015 21:13:49 +0000</pubDate>
        <link>https://rosipov.com/blog/power-of-the-command-line/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/power-of-the-command-line/</guid>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Beyond grep</title>
        <description>&lt;p&gt;I search for things a lot, especially in my code. Or even worse - someone else’s
code. For years &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grep&lt;/code&gt; served as an amazing tool for this: fast, simple, and
yet powerful. That was until I discovered &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt; for myself. An incredibly easy
to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grep&lt;/code&gt; implementation built to work with large (or not really) code
trees.&lt;/p&gt;

&lt;p&gt;A lot can be said to enforce superiority of &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt; over &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;grep&lt;/code&gt; when it comes to
working with code, and it’s all said here: &lt;a href=&quot;http://beyondgrep.com/why-ack/&quot;&gt;ack’s features&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Amazing thing is - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt; doesn’t even need a tutorial. Learning progression is
natural and “just happens” by researching necessary use cases as the need
arises (&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt; has a great manual entry).&lt;/p&gt;

&lt;p&gt;Here’s a typical use example for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ack --shell &apos;gr[ae]y&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Searches all shell script files in the current code tree for any occurrences of
“gray” or “grey”. It will search &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.sh&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.zsh&lt;/code&gt;, and just about dot-anything;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt; will even check shebang lines for you.&lt;/p&gt;

&lt;p&gt;Ease of use, the fact that it’s ready to use out of the box, extensive file
types, native support for Perl’s regular expressions: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ack&lt;/code&gt; does really good
job at searching through code.&lt;/p&gt;

&lt;p&gt;Download it from &lt;a href=&quot;http://beyondgrep.com&quot;&gt;Beyond grep&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Sun, 21 Sep 2014 19:18:31 +0000</pubDate>
        <link>https://rosipov.com/blog/beyond-grep/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/beyond-grep/</guid>
        
        <category>ack</category>
        
        <category>grep</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Effective search with Mutt</title>
        <description>&lt;p&gt;I generally don’t use Mutt for everyday emails - I find smooth non-monospace
fonts to be more pleasant to the eye, and the visualization my browser offers
is hard to beat. The main use-case for me is composing long emails: Mutt lets
me use my favorite text editor, which speeds up the editing of long and
carefully composed responses.&lt;/p&gt;

&lt;p&gt;Recently I added a new use-case to my work flow: searching through emails.
Mutt has a powerful built-in regular-expressions engine, which is something the
web Gmail client is missing.&lt;/p&gt;

&lt;p&gt;Mutt has two ways of finding things: search and limit. “Search” just jumps from
one matching letter to another, something along the lines what &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/&lt;/code&gt; command does
in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;less&lt;/code&gt;, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;more&lt;/code&gt;, or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt;. “Limit” is something I am more used to with the
web client, and it’s what I use the most.&lt;/p&gt;

&lt;h2 id=&quot;using-limits&quot;&gt;Using limits&lt;/h2&gt;

&lt;p&gt;Limit works the way regular search works in Gmail: it limits the view to
conversations matching the query. Hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;l&lt;/code&gt;, and enter a search query.&lt;/p&gt;

&lt;p&gt;By default, Mutt will only search through the subject lines, but this behaviour
can be changed by prefixing the command with a special identifier. For
instance, searching for &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~b oranges&lt;/code&gt; will limit the view to all the messages
which mention “oranges” in the message body. Here are a couple I use the most:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~b&lt;/code&gt; – Search in the message body.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~B&lt;/code&gt; – Search in the whole message.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~f&lt;/code&gt; – Message originated from the user.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~Q&lt;/code&gt; – Messages which have been replied to.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find full list in the &lt;a href=&quot;http://www.sendmail.org/~ca/email/mutt/manual-4.html#ss4.2&quot;&gt;Mutt Advanced Usage Manual&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Patterns can be chained to produce narrower results: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~f joe ~B apples&lt;/code&gt;. This
will search for a message mentioning “apples” coming from an author whose name
contains “joe”.&lt;/p&gt;

&lt;h3 id=&quot;caching-mail-for-faster-search&quot;&gt;Caching mail for faster search&lt;/h3&gt;

&lt;p&gt;You may find that searching whole messages is slow, especially if you have more
than a couple hundred messages to search through. That’s because by default
Mutt does not store messages for local use. This can be changed by specifying
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;header_cache&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;message_cachedir&lt;/code&gt; variables in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.muttrc&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;set header_cache     = &quot;$HOME/Mail&quot;
set message_cachedir = &quot;$HOME/Mail&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now, after you perform your first search, it will cache every message you open,
making all the consecutive searches lightning fast.&lt;/p&gt;

&lt;p&gt;Oh, and keep in mind, Mutt stores messages and headers in plain text, so make
sure the cache directory is not shared with anyone but yourself.&lt;/p&gt;

</description>
        <pubDate>Sat, 02 Aug 2014 20:32:51 +0000</pubDate>
        <link>https://rosipov.com/blog/effective-search-with-mutt/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/effective-search-with-mutt/</guid>
        
        <category>mutt</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Three favorite bash tricks</title>
        <description>&lt;p&gt;I spend most of my development time in the shell - be it editing text with Vim
or executing various console commands. I have quite a number of tricks in my
daily repertoire, and I would like to share three tips today.&lt;/p&gt;

&lt;h2 id=&quot;edit-current-command-with-a-text-editor&quot;&gt;Edit current command with a text editor&lt;/h2&gt;

&lt;p&gt;I often end up having to change a long command I just typed, and using arrow
keys to get to the correct spot is not favorable. Bash has the feature which
lets you edit current command in a text editor of your choice. Hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl + x&lt;/code&gt;,
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl + e&lt;/code&gt; (or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl + x + e&lt;/code&gt;), and you will be dropped into your text editor.
Now you are able to edit the command, and it will be executed as soon as your
write the file and exit the editor.&lt;/p&gt;

&lt;p&gt;You can use an editor of your choice by adding following line to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.bashrc&lt;/code&gt;
file:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;export EDITOR=vim
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt; with the name of your favorite editor.&lt;/p&gt;

&lt;p&gt;Update: It looks like for some machines setting &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;EDITOR&lt;/code&gt; variable is not
enough. In this case, you also need to set &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;VISUAL&lt;/code&gt; environment variable.&lt;/p&gt;

&lt;h2 id=&quot;edit-recent-command&quot;&gt;Edit recent command&lt;/h2&gt;

&lt;p&gt;You can edit your recent commands in a text editor of your choice by executing
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fc beginning_of_the_command&lt;/code&gt;. For instance, if you run &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fc l&lt;/code&gt;, you will open
most recent command starting with the letter “l”.&lt;/p&gt;

&lt;p&gt;You can execute &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fc&lt;/code&gt; without any arguments to edit last executed command.&lt;/p&gt;

&lt;h2 id=&quot;bash-history-autocomplete&quot;&gt;Bash history autocomplete&lt;/h2&gt;

&lt;p&gt;Another great feature - “reverse intelligent search”. If you hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl + r&lt;/code&gt; in
your shell, you’ll be greeted by the following prompt:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;(reverse-i-search)`&apos;:
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Start typing a part of the command from your history, and you’ll see suggestions
popping up. Hit &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Enter&lt;/code&gt; to pick the command (you’ll be able to edit it before
executing), or push &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ctrl + g&lt;/code&gt; to return back.&lt;/p&gt;

&lt;p&gt;Like any of these tips? Have some of your own? Don’t hesitate to share those in
the comments section down below.&lt;/p&gt;
</description>
        <pubDate>Fri, 25 Jul 2014 01:41:10 +0000</pubDate>
        <link>https://rosipov.com/blog/three-favorite-bash-tricks/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/three-favorite-bash-tricks/</guid>
        
        <category>bash</category>
        
        <category>vim</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Zero mail inbox</title>
        <description>&lt;p&gt;I use email a lot. Maybe not as much as some, but I receive and send a fair
share of mail each day. You might find it odd, but I love using email. It’s a
pleasant and calm experience, and sorting through a pile of messages every
morning rewards me with a sense of achievement. There are, however, few tricks
I have up my sleeve, and I would like to share them today. These tips will not
necessarily make you more productive, but they will provide you a with a more
pleasant and peaceful experience of managing your inbox.&lt;/p&gt;

&lt;p&gt;But first, I would like to set the scene…&lt;/p&gt;

&lt;h2 id=&quot;the-wonderful-mailbox-app&quot;&gt;The wonderful Mailbox app&lt;/h2&gt;

&lt;p&gt;I started using iOS email client called &lt;a href=&quot;http://www.mailboxapp.com&quot;&gt;Mailbox&lt;/a&gt; a little over a year ago,
shortly after a release. Back then, before it was acquired by Dropbox, you had
to wait in order for the company to grow their servers. I patiently waited “in
line” for almost a month and I finally was able to transfer all my accounts to
this wonderful mail client.&lt;/p&gt;

&lt;p&gt;It was worth waiting for. Right after starting, Mailbox archived all the
conversations in my inbox, and presented me with a list of unread emails which
looked an awful lot like a To-Do list. You can read and reply, archive the
important letters, delete junk, or resend a conversation to yourself after a
certain time span as a reminder. This is an extremely simple idea, but it is
essentially what anyone’s inbox is: a list of things which need to be done.
Some emails have to be replied to, some have to be acted upon in some other
way. The ones that don’t get archived are deleted right away.&lt;/p&gt;

&lt;p&gt;Mailbox turned my trash-filled inbox into a clean list of items I need to do.
Since then, there never was an email I forgot to reply to, nor an important
thing I forgot to do. Inbox can be referred to as “To Do”, and an archive as
“Done”. This scheme makes it nearly impossible to miss anything of importance.&lt;/p&gt;

&lt;p&gt;Unfortunately, Mailbox is an iOS-only application, and I started noticing the
shortcomings of the desktop experience. And I do use desktop mail far more
often than mobile. I decided to have a set of rules for managing my inbox; and
this is the workflow I have been successfully using for over a year.&lt;/p&gt;

&lt;h2 id=&quot;workflow-outside-of-the-mailbox-app&quot;&gt;Workflow outside of the Mailbox app&lt;/h2&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/zero-mail-inbox-in-gmail.png&quot; alt=&quot;Having clean inbox is rewarding.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I only use Gmail, and there probably are ways to have the same experience on
other platforms. However, the Mailbox app works only with Gmail.&lt;/p&gt;

&lt;p&gt;The first thing which needs to be done in order to start using the zero mail
inbox workflow - is to empty it from all the read mail. Thankfully, the Mailbox
app archives all your previous conversations the moment you install it.&lt;/p&gt;

&lt;p&gt;Next, there has to be a way to implement a “snooze” button. There are always
times when you can’t reply to an email, but don’t exactly want to keep it in
your inbox (what an eyesore). Gmail does not provide a native way to resend
your emails at later times, but I found a Chrome extension called
&lt;a href=&quot;https://chrome.google.com/webstore/detail/snooze-your-email-for-gma/pbmfoncgccdhoknelpglaacbgkclcape&quot;&gt;“Snooze Your Email for Gmail”&lt;/a&gt;, which adds a simple “Snooze” button to the
Gmail UI.&lt;/p&gt;

&lt;p&gt;Now that these two things are taken care of, there is a simple set of rules to
be used when a new email comes in:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;em&gt;Delete.&lt;/em&gt; Is it a notification? Does it require saving for future
reference? A lot of things should be deleted. Bills, notifications,
messages from robots: these don’t have to be saved. Items in Gmail trash
live for 30 days, which is enough time to find something in case of an
emergency. In addition, most of this information is available from some
another source anyway.&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Snooze.&lt;/em&gt; Do you have time right now to read/reply/act upon this email?
Remind yourself about it in a few hours or days instead.&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Archive.&lt;/em&gt; Conversation with a real person you might want to reference to
later? I save all the email chains from humans, just in case I have to
search through them at a later date.&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Reply and archive.&lt;/em&gt; Self-explanatory. Act upon and save for future
reference.&lt;/li&gt;
  &lt;li&gt;&lt;em&gt;Let it be.&lt;/em&gt; This is an eyesore version of using the “Snooze” button. You
usually want to do this only if there are more important emails to read and
act upon before getting to this one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ideally, when you keep items in your inbox - this means they have to be acted
upon in some way. There is no reason not to archive or delete conversations
which don’t require actions.&lt;/p&gt;

&lt;h2 id=&quot;bonus-point-labels&quot;&gt;Bonus point: labels&lt;/h2&gt;

&lt;p&gt;This is a recent addition to my repertoire. I found myself often searching
through certain sets of email, and hence Gmail does not support regular
expressions it’s quite a big pain in the neck for me when I can’t remember
certain details. I created a set of thematic labels, which group emails by
projects, products, and teams. And I started religiously assigning them to all
the emails I archive. First it takes a bit of work, but after a while it
becomes easy to identify a pattern and create filters to assist yourself with
categorization.&lt;/p&gt;

&lt;p&gt;As a result, I can  narrow down a search to a thematic subset of emails, saving
myself a lot of time and frustration.&lt;/p&gt;

</description>
        <pubDate>Wed, 02 Jul 2014 20:36:42 +0000</pubDate>
        <link>https://rosipov.com/blog/zero-mail-inbox/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/zero-mail-inbox/</guid>
        
        <category>email</category>
        
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Why I threw away my &quot;To Do&quot; list</title>
        <description>&lt;p&gt;I enjoy organizing things. I am accustomed to keeping neat “To Do” lists,
written notes, and just about anything that will let me arrange my tasks
instead of actually accomplishing them. I recently stopped writing things down,
and the results were pleasantly surprising…&lt;/p&gt;

&lt;p&gt;I was keeping a list of things I would need to complete. I organized it by
priorities, and at some point I even used Gina’s fancy
“&lt;a href=&quot;http://todotxt.com&quot;&gt;Todo.txt&lt;/a&gt;” wrapper for managing it.&lt;/p&gt;

&lt;p&gt;What I realized after using such a scheme, is that my list was growing longer
and longer with every week. After a while, the number of tasks became hard to
manage, and the number of tasks became permanent residents on my task list. Why
did this happen? Well for one, I turned my list into a “check box machine”.
Complete a task, check off a check box. There was no mindfulness about it: I
was just completing task after task. “All right, this one is done, let’s move
to a next one.” - this is what was constantly running through my head.
Secondly, by writing down a task on my list in the first place, my brain would
register it as being completed, and then I’d go on with my day. Needless to
say, certain tasks would sit on my list for an indefinite amount of time.&lt;/p&gt;

&lt;p&gt;After a while, I deleted my “To Do” list. Instead, every day I ask myself a
simple question: “What should I do today to succeed at what I am trying to
accomplish?”. This way, work becomes achievement driven. I started choosing
tasks which provide the biggest impact, dedicating some days just to minor
“clean up” tasks which I didn’t deem important enough for productive days.&lt;/p&gt;

&lt;p&gt;I threw away my “To Do” list, and I am glad I did it. I love being mindful
about my day, I know exactly what I need to accomplish in order to succeed.
It’s easy to get caught up in a daily route, and forget that your life isn’t
just a list of things to do, but a number of goals you want to reach. By not
relying on a written manifesto cluttered with tasks, I am forced to concentrate
on the bigger picture, where what I set out to accomplish has the highest
possible impact on my life and career.&lt;/p&gt;
</description>
        <pubDate>Sat, 07 Jun 2014 19:11:54 +0000</pubDate>
        <link>https://rosipov.com/blog/why-i-threw-away-my-to-do-list/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/why-i-threw-away-my-to-do-list/</guid>
        
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Why should you learn to touch type?</title>
        <description>&lt;p&gt;I have a confession to make. Up until recently I did not know how to touch
type. I would do what most people around me did: push the keys however which
way I felt; make a typo; look down at the keyboard to find the letter I
mistyped; repeat the whole process. I would put out up to 50 words per minute
with this method, with an embarrassing error rate (which usually went up if I
was showing something to someone). I am now terrified to think about those
times.&lt;/p&gt;

&lt;p&gt;It wasn’t until I stumbled upon Steve Yegge’s article
“&lt;a href=&quot;http://steve-yegge.blogspot.com/2008/09/programmings-dirtiest-little-secret.html&quot;&gt;Programming’s Dirtiest Little Secret&lt;/a&gt;”, that I fully understood the
implications of not developing proper typing technique.&lt;/p&gt;

&lt;p&gt;Picture the following: programmer Clara is working in a small software company.
Clara doesn’t use any fancy IDEs nor extendible editors like emacs or vim.
Clara uses Windows’ default “Notepad” program to write and edit her source
code. She is defending herself by saying that she doesn’t need any advanced
features, and that she knows every keyword she needs to use by heart. She
spends hours tediously searching for the files on her computer, opening them in
Notepad, holding down arrow keys to get to whichever chunk of code she needs to
edit (or even worse - lifts her hands off a keyboard and uses a mouse to
navigate the file). Her editor only goes back one step with the “undo”
operation… But Clara has good memory and she can re-type the code she erased.&lt;/p&gt;

&lt;p&gt;What do you think of Clara? You might say that she is wasting her time and she
should learn herself a robust editor. And of course, you will be right.&lt;/p&gt;

&lt;p&gt;One day, Clara’s company hired a new tech lead - Jane. Jane noticed that Clara
is very slow at accomplishing tasks assigned to her. So Jane showed Clara how
to save a lot of time by using an advanced editor she uses. Suddenly Clara
discovered a whole new world in front of her: it became much easier to read the
code with parts of it highlighted, and the new text editor showed her when she
would make a typo or a big error - even before Clara compiled the code. And
Clara didn’t even have to re-invent the code she deleted, she could just travel
down the undo tree back to the time when she erased the code: all of a sudden
it felt like she had access to a time machine! Jane even told her that there
are plugins which can write some code for Clara! How amazing is that? It took a
while for Clara to learn how to use the new editor, but after a few months,
Clara became almost as fast at doing her job as Jane. Maybe Clara even received
a promotion from doing so many things in a short period of time.&lt;/p&gt;

&lt;p&gt;If you don’t know how to touch type - you are Clara. You are wasting your time.
You look ridiculous to your colleagues when you stare down at your keyboard
while typing. Interviewers secretly laugh at you when you make five errors in a
four-letter word. You are frustrated by even the remote possibility of having
to write more than you absolutely have to.&lt;/p&gt;

&lt;p&gt;Writing is a big part of the job as a software engineer. You write code,
documentation, ask questions. Most importantly, you have to communicate with
your colleagues and users. Most of this interaction is written: it’s a great
form of communication for the job - written notes can be saved and searched
through later. As a software engineer, you bring value to your company and its
users. And due to the arcane nature of the craft, communication becomes
crucial. You can be the smartest programmer in the world and you can write the
best piece of software out there, but no one will know about it unless you
communicate why is it so great, what it does, and how to use it.&lt;/p&gt;

&lt;p&gt;By learning how to type properly, you turn a keyboard into an extension of your
hand. All you have to do in order to type - is just think of words and
sentences. Your muscle memory does the rest.&lt;/p&gt;

&lt;p&gt;I now type somewhere between 60 and 80 words per minute with what I find to be
a low error rate - and I have been touch typing now for little over a month. If
you care for your craft, you have no excuse for not mastering a proper typing
technique.&lt;/p&gt;

</description>
        <pubDate>Sat, 31 May 2014 19:33:15 +0000</pubDate>
        <link>https://rosipov.com/blog/why-should-you-learn-to-touch-type/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/why-should-you-learn-to-touch-type/</guid>
        
        
        <category>Writing</category>
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Elegant Mutt setup for use with Gmail</title>
        <description>&lt;p&gt;I have been using Mutt for a while now. Wouldn’t say that it saves my time, but
nor does it extend the amount of time I spend reading email. For me, the best
part about Mutt is that it lets me use text editor of my choice - Vim.
Everything else - keyboard shortcuts, minimalist design, and simplicity -
already exists in Gmail.&lt;/p&gt;

&lt;p&gt;I found configuration below to work really well for my needs: all of the
important for me Gmail features are translated. Here’s my &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.muttrc&lt;/code&gt; file:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;bind editor &amp;lt;space&amp;gt; noop
set alias_file        = &apos;~/.mutt/aliases.txt&apos;
set copy              = no
set display_filter    = &apos;$HOME/.mutt/aliases.sh&apos;
set edit_headers
set editor            = &quot;vim +/^$ ++1&quot;
set folder            = &quot;imaps://imap.gmail.com/&quot;
set hostname          = &quot;gmail.com&quot;
set imap_check_subscribed
set imap_pass         = &quot;$PASSWORD&quot;
set imap_user         = &quot;$USERNAME&quot;
set mail_check        = 5
set move              = no
set postponed         = &quot;+[Gmail]/Drafts&quot;
set spoolfile         = &quot;+INBOX&quot;
set text_flowed       = yes
unset imap_passive
unset record

# Gmail-style keyboard shortcuts
macro index ga &quot;&amp;lt;change-folder&amp;gt;=[Gmail]/All Mail&amp;lt;enter&amp;gt;&quot; &quot;Go to all mail&quot;
macro index gd &quot;&amp;lt;change-folder&amp;gt;=[Gmail]/Drafts&amp;lt;enter&amp;gt;&quot; &quot;Go to drafts&quot;
macro index gi &quot;&amp;lt;change-folder&amp;gt;=INBOX&amp;lt;enter&amp;gt;&quot; &quot;Go to inbox&quot;
macro index gs &quot;&amp;lt;change-folder&amp;gt;=[Gmail]/Starred&amp;lt;enter&amp;gt;&quot; &quot;Go to starred messages&quot;
macro index gt &quot;&amp;lt;change-folder&amp;gt;=[Gmail]/Trash&amp;lt;enter&amp;gt;&quot; &quot;Go to trash&quot;
macro index,pager d &quot;&amp;lt;save-message&amp;gt;=[Gmail]/Trash&amp;lt;enter&amp;gt;&amp;lt;enter&amp;gt;&quot; &quot;Trash&quot;
macro index,pager y &quot;&amp;lt;save-message&amp;gt;=[Gmail]/All Mail&amp;lt;enter&amp;gt;&amp;lt;enter&amp;gt;&quot; &quot;Archive&quot;

source $alias_file
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It is quite self-explanatory, and includes such nice features as:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Automatically adding addresses from read emails to address book (see
below).&lt;/li&gt;
  &lt;li&gt;Using vim as a text editor, with an ability to edit message
headers/recipients from within vim.&lt;/li&gt;
  &lt;li&gt;Ability to access all the default Gmail folders: All mail, Drafts, Inbox,
Starred, Trash.&lt;/li&gt;
  &lt;li&gt;Key bindings to delete and archive messages bound to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d&lt;/code&gt; and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;y&lt;/code&gt;
respectfully (I am a huge fun of a zero-mail inbox).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You might also want to have your password encrypted by GPG as opposed to
leaving it in plain text in your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.muttrc&lt;/code&gt; file. You can read how to do this
here: &lt;a href=&quot;https://rosipov.com/blog/using-mutt-with-gpg/&quot;&gt;Using Mutt with GPG&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As you may have noticed, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.muttrc&lt;/code&gt; above sets &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;display_filter&lt;/code&gt; to
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$HOME/.mutt/aliases.sh&lt;/code&gt;. This script is being executed every time you read an
email, and it collects email address to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$HOME/.mutt/aliases.txt&lt;/code&gt;. Contents of
the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;aliases.sh&lt;/code&gt; are below:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/sh

MESSAGE=$(cat)

NEWALIAS=$(echo &quot;${MESSAGE}&quot; | grep ^&quot;From: &quot; | sed s/[\,\&quot;\&apos;]//g | awk &apos;{$1=&quot;&quot;; if (NF == 3) {print &quot;alias&quot; $0;} else if (NF == 2) {print &quot;alias&quot; $0 $0;} else if (NF &amp;gt; 3) {print &quot;alias&quot;, tolower($(NF-1))&quot;-&quot;tolower($2) $0;}}&apos;)


if grep -Fxq &quot;$NEWALIAS&quot; $HOME/.mutt/aliases.txt; then
    :
else
    echo &quot;$NEWALIAS&quot; &amp;gt;&amp;gt; $HOME/.mutt/aliases.txt
fi

echo &quot;${MESSAGE}&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Source: &lt;a href=&quot;http://wcaleb.org/blog/mutt-tips&quot;&gt;W. Caleb McDaniel&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This script will create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;aliases.txt&lt;/code&gt; file containing email addresses for
search and auto completion of email-addresses.&lt;/p&gt;

</description>
        <pubDate>Wed, 28 May 2014 21:33:55 +0000</pubDate>
        <link>https://rosipov.com/blog/elegant-mutt-setup-for-use-with-gmail/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/elegant-mutt-setup-for-use-with-gmail/</guid>
        
        <category>mutt</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Using Mutt with GPG</title>
        <description>&lt;p&gt;Mutt is a great command line email client, but it does not offer a built-in way
to store passwords. But that’s where GPG comes in. A while back I wrote an
article on how to use GPG to store your passwords: &lt;a href=&quot;https://rosipov.com/blog/gpg-usage/&quot;&gt;GPG Usage&lt;/a&gt;, this is a more
practical note about using GPG to store your passwords for mutt. This note
implies that you already have installed and configured GPG (which you can learn
how to do in above linked article).&lt;/p&gt;

&lt;p&gt;First you will have to record a password to a GPG file. Replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$PASSWORD&lt;/code&gt;
with your password and &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$ACCOUNT&lt;/code&gt; with a desired account alias. You probably
want to prefix this command with a space, to avoid writing your password to a
history file.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;echo &apos;$PASSWORD&apos; | gpg --use-agent -e &amp;gt; ~/.passwd/$ACCOUNT.gpg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Next, open your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.muttrc&lt;/code&gt; file and add following line:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;set imap_pass = &quot;`gpg --use-agent --quiet --batch -d ~/.passwd/$ACCOUNT.gpg`&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Again, replace &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$ACCOUNT&lt;/code&gt; with the same account alias you specified earlier.
Now you don’t have to re-enter your password every time you start Mutt.&lt;/p&gt;

</description>
        <pubDate>Wed, 28 May 2014 19:11:52 +0000</pubDate>
        <link>https://rosipov.com/blog/using-mutt-with-gpg/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/using-mutt-with-gpg/</guid>
        
        <category>gpg</category>
        
        <category>mutt</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Remap your Caps Lock</title>
        <description>&lt;p&gt;The following three paragraphs are an angry &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Caps Lock&lt;/code&gt; rant. Feel free to skip
past it or join me by commenting below.&lt;/p&gt;

&lt;p&gt;I’ve had it with &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Caps Lock&lt;/code&gt;! How many times did I accidentally press it while
hitting the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;A&lt;/code&gt; key! How many times did I mean &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Tab&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Shift&lt;/code&gt;! There is an
obvious problem with the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Caps Lock&lt;/code&gt; placement, and there being only a
millimeter of space to designate it from an adjacent key, it is quite difficult
to notice when you accidentally press it.&lt;/p&gt;

&lt;p&gt;Pushing &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Caps Lock&lt;/code&gt; is more tolerable when typing, but while using keyboard
controlled software it’s a real pain; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vim&lt;/code&gt; turns into a beeping ravaging
nightmare, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;vimperator&lt;/code&gt; messes up all your bookmarks… Same thing with
websites supporting keyboard shortcuts.&lt;/p&gt;

&lt;p&gt;When was the last time I ever used &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Caps Lock&lt;/code&gt;? Over ten years ago, when I was
playing a video game that used &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Caps Lock&lt;/code&gt; to switch between running and
walking. Em… Seriously? Time to put an end this nonsense.&lt;/p&gt;

&lt;h2 id=&quot;linux-and-mac&quot;&gt;Linux and Mac&lt;/h2&gt;

&lt;p&gt;Drop this into your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/bin/capslockremap&lt;/code&gt;, and don’t forget to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;chmod +x
~/bin/capslockremap&lt;/code&gt;. Now run the script with root privileges (that’ll last you
until the next restart).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/sh

# This temporarily remaps the Caps Lock key to a Control key.
# The keyboard will return to the previous settings after a
# reboot. The Linux console and the X Window system each
# handles keypresses separately, so each must be remapped
# separately. First remap the X keyboard since this does not
# require root access.

# Remap the Caps Lock key to a Control key for
# the X Window system.
if type setxkbmap &amp;gt;/dev/null 2&amp;gt;&amp;amp;1; then
fi

# You have to be root to remap the console keyboard.
if [ &quot;$(id -u)&quot; != &quot;0&quot; ]; then
  echo &quot;This script is not running as root so&quot;
  echo &quot;the console Caps Lock cannot be remapped.&quot;
  echo &quot;Perhaps you forgot to run this under sudo.&quot;
  echo &quot;Note that this problem does not effect X.&quot;
  echo &quot;This only effects the consoles running on&quot;
  echo &quot;Alt-f1 through Alt-f6.&quot;
  exit 2
fi
# Remap the CapsLock key to a Control key for the console.
(dumpkeys | grep keymaps; echo &quot;keycode 58 = Control&quot;) | loadkeys
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;windows&quot;&gt;Windows&lt;/h2&gt;

&lt;p&gt;Download &lt;a href=&quot;http://technet.microsoft.com/en-us/sysinternals/bb897578.aspx&quot;&gt;Sysinternals Ctrl2Cap v2.0&lt;/a&gt;, run it as Administrator with
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;install&lt;/code&gt; flag: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ctrl2cap.exe /install&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Source &lt;a href=&quot;http://www.noah.org/wiki/CapsLock_Remap_Howto&quot;&gt;CapsLock Remap Howto - Noah.org&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Thu, 12 Sep 2013 01:26:15 +0000</pubDate>
        <link>https://rosipov.com/blog/remap-your-caps-lock/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/remap-your-caps-lock/</guid>
        
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Git pretty log output</title>
        <description>&lt;p&gt;This alias has been around the web for quite some time, but it does look
fantastic indeed.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/posts/git-pretty-log.png&quot; alt=&quot;An output of `git pretty-log` alias.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To add the alias &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git pretty-log&lt;/code&gt;, execute the following command (join string
prior to executing):&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git config alias.pretty-log &apos;log --graph --pretty=format:&quot;%Cred%h%Creset
-%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&amp;lt;%an&amp;gt;%Creset&quot;&apos;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</description>
        <pubDate>Fri, 14 Jun 2013 01:31:02 +0000</pubDate>
        <link>https://rosipov.com/blog/git-pretty-log-output/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/git-pretty-log-output/</guid>
        
        <category>git</category>
        
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Download gists from prompt</title>
        <description>&lt;p&gt;I wrote a little script to download gists from the command prompt.&lt;/p&gt;

&lt;p&gt;Generate your Github API Token under Settings -&amp;gt; Applications, change it within
a script, and then:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;chmod +x shgist.py
mv shgist.py ~/bin/shgist
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Where ~/bin is a directory in your path. Now you can use it as shgist file to
quickly download your gists (&lt;a href=&quot;https://gist.github.com/ruslanosipov/5599377&quot;&gt;Gist on Github&lt;/a&gt;).&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/usr/bin/env python

# Ruslan Osipov
# Usage: shgist keywords
# Description: Gists downloader

import urllib
import urllib2
import sys
import json

token = &apos;Personal API Access Token&apos;  # Github Settings -&amp;gt; Applications

class Gist:
    def __init__(self, token):
        &quot;&quot;&quot;
        token -- str, github token
        &quot;&quot;&quot;
        self.token = token
        self.url = &apos;https://api.github.com&apos;

    def find_by_name(self, keywords):
        &quot;&quot;&quot;
        keywords -- list of strings
        &quot;&quot;&quot;
        gists, urls = self._get_gists()
        for i, gist in enumerate(gists):
            for keyword in keywords:
                if keyword not in gist:
                    del gists[i]
                    del urls[i]
                    break
        if len(gists) == 0:
            print &quot;Sorry, no gists matching your description&quot;
            return
        if len(gists) == 1:
            self._download_gist(gists[0], urls[0])
            return
        for i, gist in enumerate(gists):
            print i, gist
        while True:
            num = raw_input(&quot;Gist number, &apos;q&apos; to quit: &quot;)
            if num == &apos;q&apos;:
                print &quot;Quiting...&quot;
                return
            try:
                num = int(num)
                if 0 &amp;lt;= num &amp;lt; len(gists):
                    break
                print &quot;Number should be within specified range&quot;
            except:
                print &quot;Only integers or &apos;q&apos; are allowed&quot;
        self._download_gist(gists[num], urls[num])

    def _download_gist(self, name, url):
        &quot;&quot;&quot;
        name -- str, filename
        url -- str, raw gist url
        &quot;&quot;&quot;
        print &quot;Downloading %s...&quot; % name
        gist = self._send_get_request(url)
        open(name, &apos;wb&apos;).write(gist)

    def _get_gists(self):
        &quot;&quot;&quot;
        Returns 2 lists which should be treated as ordered dict
        &quot;&quot;&quot;
        url = &apos;/gists&apos;
        response = self._send_get_request(self.url + url)
        response = json.loads(response)
        gists, urls = [], []
        for gist in response:
            for name, meta in gist[&apos;files&apos;].items():
                gists.append(name)
                urls.append(meta[&apos;raw_url&apos;])
        return gists, urls

    def _send_get_request(self, url):
        &quot;&quot;&quot;
        url -- str
        &quot;&quot;&quot;
        headers = {
                &apos;Authorization&apos;: &apos;token &apos; + self.token
                }
        request = urllib2.Request(url, headers=headers)
        response = urllib2.urlopen(request)
        return response.read()

argv = sys.argv[1:]
if not len(argv):
    print &quot;Usage: shgist keywords&quot;
    sys.exit(0)

gist = Gist(token)
gist.find_by_name(argv)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Fri, 17 May 2013 18:52:02 +0000</pubDate>
        <link>https://rosipov.com/blog/download-gists-from-prompt/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/download-gists-from-prompt/</guid>
        
        <category>gist</category>
        
        <category>github</category>
        
        <category>python</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Rename commit author in git</title>
        <description>&lt;p&gt;In some extremely rare cases you end up pushing data to the repo with the wrong
credentials. If you are the only author and you’re as picky as I am, it can be
corrected easily:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git filter-branch -f --env-filter
&quot;GIT_AUTHOR_NAME=&apos;Stan Smith&apos;;
GIT_AUTHOR_EMAIL=&apos;stansmith@cia.gov&apos;;
GIT_COMMITTER_NAME=&apos;Stan Smith&apos;;
GIT_COMMITTER_EMAIL=&apos;stansmith@cia.gov&apos;;&quot; HEAD
git push --force
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In the case of there being multiple people working on a project, you may want
to use the following gist posted by anonymous:
&lt;a href=&quot;https://gist.github.com/anonymous/2523336/&quot;&gt;https://gist.github.com/anonymous/2523336/&lt;/a&gt; (again, followed by &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git push
--force&lt;/code&gt;).&lt;/p&gt;
</description>
        <pubDate>Fri, 15 Mar 2013 00:09:02 +0000</pubDate>
        <link>https://rosipov.com/blog/rename-commit-author-in-git/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/rename-commit-author-in-git/</guid>
        
        <category>git</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Mintty color scheme (Cygwin)</title>
        <description>&lt;p&gt;&lt;img src=&quot;/images/posts/mintty-softer-color-scheme.png&quot; alt=&quot;Softer colors for mintty.&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I find the default cygwin color palette to be a bit ugly, so here’s one that
has softer colors. Add the following lines to your &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.minttyrc&lt;/code&gt; and restart
cygwin in order to apply changes.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ForegroundColour = 131, 148, 150
BackgroundColour =   0,   0,   0
CursorColour     = 220,  50,  47

Black            =   7,  54,  66
BoldBlack        =   0,  43,  54
Red              = 220,  50,  47
BoldRed          = 203,  75,  22
Green            =   0, 200, 132
BoldGreen        =   0, 200, 132
Yellow           = 204, 204, 102
BoldYellow       = 204, 204, 102
Blue             = 102, 153, 204
BoldBlue         = 102, 153, 204
Magenta          = 211,  54, 130
BoldMagenta      = 108, 113, 196
Cyan             =  42, 161, 152
BoldCyan         = 147, 161, 161
White            = 238, 232, 213
BoldWhite        = 253, 246, 227
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Update (December 2018): This theme is now packaged with the default Mintty
distribution! Pull up Mintty/Cygwin and check for a theme called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rosipov&lt;/code&gt; (I
didn’t pick the name).&lt;/p&gt;
</description>
        <pubDate>Wed, 13 Mar 2013 19:35:28 +0000</pubDate>
        <link>https://rosipov.com/blog/mintty-color-scheme-cygwin/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/mintty-color-scheme-cygwin/</guid>
        
        <category>cygwin</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>Use vim commands in a browser</title>
        <description>&lt;p&gt;I’ve been giving preference to a keyboard over mouse since I discovered vim for
myself, as it’s a faster and more convenient way to go. I am a Chrome user and
recently I found an amazing plugin: &lt;a href=&quot;http://vimium.github.com&quot;&gt;Vimium&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;It does exactly what the name suggests, allowing you to use vim-like commands
in your browser. You can freely move, switch between tabs, work with forms and
click links using familiar vim key bindings.&lt;/p&gt;

&lt;p&gt;A two minute long introductory video explains basic commands and you’re all
set! I’ve been using Vimium for over a week now, an amusing experience which
allows you to throw your mouse in a dark corner (well, not exactly: Vimium
still has some issues with over-bloated ajax pages, not to mention Flash and
other nasty stuff).&lt;/p&gt;

&lt;p&gt;Check it out: &lt;a href=&quot;http://vimium.github.com&quot;&gt;http://vimium.github.com/&lt;/a&gt;.&lt;/p&gt;

</description>
        <pubDate>Sun, 24 Feb 2013 05:35:27 +0000</pubDate>
        <link>https://rosipov.com/blog/use-vim-commands-in-a-browser/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/use-vim-commands-in-a-browser/</guid>
        
        <category>vimium</category>
        
        
        <category>Vim</category>
        
        <category>Productivity</category>
        
      </item>
    
      <item>
        <title>Git: merge two repositories</title>
        <description>&lt;p&gt;Today I had to merge changes from one repository into another. Let’s assume you
want to merge &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;beta&lt;/code&gt; into &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;alpha&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Operations are performed in repo alpha:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;git remote add beta_repo git@rosipov.com:beta.git
git fetch beta_repo
git merge beta_repo/master
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;In this case, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;beta_repo&lt;/code&gt; is the name you pick for remote.&lt;/p&gt;

&lt;p&gt;If you just need to cherry-pick a certain commit from &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;beta&lt;/code&gt; you can omit the
last step and replace it with the cherry-pick.&lt;/p&gt;

&lt;p&gt;More on the topic of remotes: &lt;a href=&quot;http://git-scm.com/book/ch2-5.html&quot;&gt;http://git-scm.com/book/ch2-5.html&lt;/a&gt;.&lt;/p&gt;
</description>
        <pubDate>Thu, 21 Feb 2013 20:09:07 +0000</pubDate>
        <link>https://rosipov.com/blog/git-merge-two-repositories/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/git-merge-two-repositories/</guid>
        
        <category>git</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>GPG Usage</title>
        <description>&lt;p&gt;To encrypt and decrypt files in Linux there is a utility called &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gpg&lt;/code&gt; (Gnu
Privacy Guard). This is a short GPG tutorial.&lt;/p&gt;

&lt;h2 id=&quot;quick-usage-example&quot;&gt;Quick usage example&lt;/h2&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg -c foo.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It will prompt you for the passphrase and a confirmation. Now you will have the
encrypted &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;foo.txt.gpg&lt;/code&gt; file. To decrypt a file:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg -d foo.txt.gpg
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This will forward the output to the console. You can output it into a file:&lt;/p&gt;

&lt;p&gt;gpg -d foo.txt.gpg &amp;gt; foo.txt&lt;/p&gt;

&lt;h2 id=&quot;gpg-keyring&quot;&gt;GPG keyring&lt;/h2&gt;

&lt;p&gt;This is all secure, but not quite enough if you are paranoid. Keys are what
makes &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gpg&lt;/code&gt; great. Let’s generate a private key:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg --gen-key
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And create an ASCII version of a public key:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg --armor --export &quot;John Doe&quot; --output johndoe.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Public key &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;johndoe.txt&lt;/code&gt; can be freely distributed. Now you can encrypt files
for yourself only:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg -e -r &quot;John Doe&quot; foo.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Now if you decrypt a file it will require the passphrase you specified while
generating a key. To encrypt a file for someone else you should have this
person’s public key.&lt;/p&gt;

&lt;p&gt;Let’s assume Stan Smith sent you a key, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stansmith.txt&lt;/code&gt;. You import it using:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg --import stansmith.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And encrypt the file:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gpg -e -r &quot;Stan Smith&quot; foo.txt
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</description>
        <pubDate>Wed, 26 Dec 2012 20:00:22 +0000</pubDate>
        <link>https://rosipov.com/blog/gpg-usage/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/gpg-usage/</guid>
        
        <category>gpg</category>
        
        <category>linux</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
      <item>
        <title>GUI git difftool for Windows</title>
        <description>&lt;p&gt;A quick note on how to set up GUI difftool to use with git on Windows (Git
Bash, Cygwin, etc…).&lt;/p&gt;

&lt;p&gt;Download and install GUI diff tool of your choice, get the path to executable.&lt;/p&gt;

&lt;p&gt;Create &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;difftool.sh&lt;/code&gt; in directory included in your path (for example
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C:\Users\{username}\bin&lt;/code&gt; in Git Bash). Let’s take SourceGear’s DiffMerge as an
example.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;#!/bin/sh
&quot;C:/Program Files/SourceGear/Common/DiffMerge/sgdm.exe&quot; &quot;$1&quot; &quot;$2&quot; | cat
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And in your ~/.gitconfig:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[diff]
    tool = diffmerge
[difftool &quot;diffmerge&quot;]
    difftool.sh &quot;$LOCAL&quot; &quot;$REMOTE&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And difftool is available via &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git difftool&lt;/code&gt; command now.&lt;/p&gt;
</description>
        <pubDate>Thu, 06 Dec 2012 20:02:24 +0000</pubDate>
        <link>https://rosipov.com/blog/gui-git-difftool-for-windows/</link>
        <guid isPermaLink="true">https://rosipov.com/blog/gui-git-difftool-for-windows/</guid>
        
        <category>git</category>
        
        <category>windows</category>
        
        
        <category>Productivity</category>
        
        <category>CLI</category>
        
      </item>
    
  </channel>
</rss>
