<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>the art of simplicity</title><link>https://naoko.github.io/</link><description>Recent content on the art of simplicity</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sat, 08 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://naoko.github.io/index.xml" rel="self" type="application/rss+xml"/><item><title>Graph vs. Loop: Not a Fight, Two Different Layers</title><link>https://naoko.github.io/posts/2026-08-08-graph-vs-loop-agents/</link><pubDate>Sat, 08 Aug 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-08-08-graph-vs-loop-agents/</guid><description>&lt;p&gt;A &amp;ldquo;graph engineering just changed how AI agents work — goodbye loops&amp;rdquo; post landed in my feed, and my first reaction was suspicion of the useful kind: &lt;em&gt;wait, is this different from the orchestrator/planner/coder/reviewer setup I already wrote about in the &lt;a href="https://naoko.github.io/posts/2026-04-28-harness-engineering-overview/"&gt;harness cheat sheet&lt;/a&gt;?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Short answer: it&amp;rsquo;s not a competing architecture. It&amp;rsquo;s a different layer.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Orchestrator–worker&lt;/strong&gt; (planner, coder, reviewer) answers &lt;strong&gt;who does the work&lt;/strong&gt; — the role topology.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Graph engineering&lt;/strong&gt; answers &lt;strong&gt;how control and state move between them&lt;/strong&gt; — the execution model.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can run planner/coder/reviewer as an unconstrained loop, or as a graph. Same cast, different wiring. Nobody has to lose.&lt;/p&gt;</description></item><item><title>Give Your Coding Agent a Memory: A Graphify → OKF Pipeline in an Afternoon</title><link>https://naoko.github.io/posts/2026-07-30-coding-agent-memory-graphify-okf/</link><pubDate>Thu, 30 Jul 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-07-30-coding-agent-memory-graphify-okf/</guid><description>&lt;p&gt;My coding agents have a groundhog-day problem. Every session starts from zero: the agent re-reads the same files, rebuilds the same mental model of the same codebase, burns tens of thousands of tokens doing it, and forgets all of it the moment the session ends. Tomorrow it does the whole thing again.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve written before about &lt;a href="https://naoko.github.io/posts/2026-06-28-cheaper-ai-coding-rtk-codegraph/"&gt;trimming what the agent has to read&lt;/a&gt; and about &lt;a href="https://naoko.github.io/posts/2026-07-18-coding-agent-adoption-ladder/"&gt;token-lean context as the rung-3 practice everyone skips&lt;/a&gt;. This is the next piece of the same bet: not just trimming what goes in each session, but &lt;em&gt;keeping&lt;/em&gt; what the agent learns &lt;em&gt;between&lt;/em&gt; them.&lt;/p&gt;</description></item><item><title>The Coding-Agent Adoption Ladder (and How to Climb It)</title><link>https://naoko.github.io/posts/2026-07-18-coding-agent-adoption-ladder/</link><pubDate>Sat, 18 Jul 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-07-18-coding-agent-adoption-ladder/</guid><description>&lt;p&gt;Boris Cherny, who built Claude Code, published &lt;a href="https://x.com/bcherny/status/2077929379661844559"&gt;Steps of AI Adoption&lt;/a&gt; this week: five steps he keeps watching teams climb. I did what everyone does with a maturity ladder and tried to find myself on it. The answer was messy: partially step 2, partially step 3, one foot on each. (The rung names below are my own gloss on his five steps.)&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s the norm. Most devs I know sit somewhere across rungs 1 to 3, rarely on one clean step. So here&amp;rsquo;s the ladder, and what actually changes as you climb, with most of the attention on the 2-to-3 jump where the leverage is.&lt;/p&gt;</description></item><item><title>Two Ways to Stop Your Coding Agent Burning Tokens: RTK and CodeGraph</title><link>https://naoko.github.io/posts/2026-06-28-cheaper-ai-coding-rtk-codegraph/</link><pubDate>Sun, 28 Jun 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-06-28-cheaper-ai-coding-rtk-codegraph/</guid><description>&lt;p&gt;I keep a few Claude Code and Cursor sessions running through the day, and at some point I started actually watching the token counter instead of ignoring it. The thing that struck me wasn&amp;rsquo;t how &lt;em&gt;much&lt;/em&gt; it climbed. It was &lt;em&gt;what&lt;/em&gt; it climbed on. Most of the budget wasn&amp;rsquo;t going on the model reasoning about my problem. It was going on plumbing: &lt;code&gt;ls&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, reading the same file three times to rebuild a call path, scrolling a 400-line &lt;code&gt;cargo test&lt;/code&gt; dump to find the one assertion that failed.&lt;/p&gt;</description></item><item><title>Britain, Bottom to Top: History and Wild Beauty 🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁷󠁬󠁳󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿</title><link>https://naoko.github.io/posts/2026-05-31-uk-anniversary/</link><pubDate>Sun, 31 May 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-05-31-uk-anniversary/</guid><description>&lt;h1 id="britain-bottom-to-top-history-and-wild-beauty-"&gt;Britain, Bottom to Top: History and Wild Beauty 🏴󠁧󠁢󠁥󠁮󠁧󠁿🏴󠁧󠁢󠁷󠁬󠁳󠁿🏴󠁧󠁢󠁳󠁣󠁴󠁿&lt;/h1&gt;
&lt;p&gt;For our 30th anniversary, Coy and I decided to do something we&amp;rsquo;d never done together: rent a car and drive the length of Britain, bottom to top. We landed at London Heathrow and, over the next two and a half weeks, worked our way north - through England, into Wales, up the spine of the Lake District, across the Scottish Highlands and the Isle of Skye, and finally into Edinburgh, where we flew home.&lt;/p&gt;</description></item><item><title>Mud, Mist, and Mountains: The UTMB Snowdonia 25K</title><link>https://naoko.github.io/posts/2026-05-17-utmb-snowdonia-25k/</link><pubDate>Sun, 17 May 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-05-17-utmb-snowdonia-25k/</guid><description>&lt;h1 id="mud-mist-and-mountains-the-utmb-snowdonia-25k"&gt;Mud, Mist, and Mountains: The UTMB Snowdonia 25K&lt;/h1&gt;
&lt;p&gt;This race was the centerpiece of our big UK anniversary trip (the full travel story is over &lt;a href="https://naoko.github.io/posts/2026-05-31-uk-anniversary/"&gt;here&lt;/a&gt;) - but it earned its own page, because the Welsh mountains handed me a race I won&amp;rsquo;t forget.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;d signed up for the &lt;strong&gt;UTMB Snowdonia 25K&lt;/strong&gt;, part of the Ultra-Trail Snowdonia by UTMB weekend, set deep in &lt;strong&gt;Eryri National Park&lt;/strong&gt; (Snowdonia) in northern Wales. On paper: about 25 kilometers and 4,600 feet of climbing. In reality: mud, mist, sheep, and some of the most dramatic mountain running I&amp;rsquo;ve ever done.&lt;/p&gt;</description></item><item><title>The Harness Engineering Cheat Sheet</title><link>https://naoko.github.io/posts/2026-04-28-harness-engineering-overview/</link><pubDate>Tue, 28 Apr 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-04-28-harness-engineering-overview/</guid><description>&lt;h1 id="the-harness-engineering-cheat-sheet"&gt;The Harness Engineering Cheat Sheet&lt;/h1&gt;
&lt;p&gt;I have a Cursor problem. Or maybe an &amp;ldquo;agent session&amp;rdquo; problem more generally — I keep five or six chats open, each with its own slice of context, each in a slightly different state. We have nice skills. We have nice tools to fetch the right context. We have a code-review skill that drops inline comments on a PR. But I still lose track of which window is doing what, and occasionally paste the wrong thing into the wrong session.&lt;/p&gt;</description></item><item><title>I Built an AI Ultrarunner to QA My App</title><link>https://naoko.github.io/posts/2026-03-11-ai-ultrarunner-qa/</link><pubDate>Wed, 11 Mar 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-03-11-ai-ultrarunner-qa/</guid><description>&lt;h1 id="i-built-an-ai-ultrarunner-to-qa-my-app"&gt;I Built an AI Ultrarunner to QA My App&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;ve been building &lt;a href="https://races.naoko.dev"&gt;a race tracking app&lt;/a&gt; for ultrarunners. It lets you manage your race calendar, track gear, write journey entries, and plan your season. The problem? I have no users yet. Just me.&lt;/p&gt;
&lt;p&gt;That means nobody is poking around, trying weird things, or stumbling into edge cases. The app has unit tests, CI checks, type checking — all the usual stuff. But there&amp;rsquo;s a whole class of bugs that only surface when someone actually &lt;em&gt;uses&lt;/em&gt; the thing. Opens the browser, clicks around, creates records, and goes &amp;ldquo;wait, that doesn&amp;rsquo;t look right.&amp;rdquo;&lt;/p&gt;</description></item><item><title>Avalon 50 Miles</title><link>https://naoko.github.io/posts/2026-01-10-avalon-50-miles/</link><pubDate>Sat, 10 Jan 2026 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2026-01-10-avalon-50-miles/</guid><description>&lt;h1 id="running-the-whole-island-avalon-50-miles"&gt;Running the Whole Island: Avalon 50 Miles&lt;/h1&gt;
&lt;p&gt;Two years ago, I ran the &lt;a href="https://www.avalon50.com/"&gt;Avalon 50/50&lt;/a&gt; and did the 50K. It was a beautiful race on Santa Catalina Island, and I loved every bit of it. But the whole time, I kept hearing about the 50-mile course — how it takes you through parts of the island that are normally off-limits to the public, covering nearly the entire island. That thought stayed with me.&lt;/p&gt;</description></item><item><title>Imogene Run</title><link>https://naoko.github.io/posts/2025-09-07-imogene-run/</link><pubDate>Sun, 07 Sep 2025 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2025-09-07-imogene-run/</guid><description>&lt;h1 id="breathing-through-the-sky-my-imogene-pass-run"&gt;Breathing Through the Sky: My Imogene Pass Run&lt;/h1&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2025-09-07/start.jpeg" alt="Start line"&gt;

&lt;/p&gt;
&lt;p&gt;This weekend I had the privilege of lining up at the 52nd annual Imogene Pass Run, one of the most beautiful, brutal, and humbling races I’ve ever attempted.&lt;/p&gt;
&lt;h2 id="the-start-breathless-from-the-first-steps"&gt;The Start: Breathless From the First Steps&lt;/h2&gt;
&lt;p&gt;From the very first few miles, the altitude grabbed hold of me. I was breathing hard right away, trying to find rhythm while surrounded by so many strong runners. The biggest contingent came from Flagstaff, a town that clearly knows how to send mountain-ready athletes.&lt;/p&gt;</description></item><item><title>Running Post Hysterectomy</title><link>https://naoko.github.io/posts/2023-04-01-hysterectomy/</link><pubDate>Sat, 01 Apr 2023 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2023-04-01-hysterectomy/</guid><description>&lt;p&gt;You might be reading this because you are told that Hysterectomy is the best option for removing uterine fibroids which has been bothering you a lot &amp;hellip; but your biggest concern is how soon you can get back to your beloved activity - running.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a bit of a dilemma, isn&amp;rsquo;t it? On one hand, you want to take care of your health and get the surgery done, but on the other hand, the thought of being sidelined from running can be a tough pill to swallow. In fact I postponed for a year or two myself but so glad I got it done.&lt;/p&gt;</description></item><item><title>Refinance</title><link>https://naoko.github.io/posts/2021-02-19-refinance/</link><pubDate>Fri, 19 Feb 2021 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2021-02-19-refinance/</guid><description>&lt;p&gt;realtor.com has great tool to show mortage trend &lt;a href="https://www.realtor.com/mortgage/tools/mortgage-rate-trends/"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2021-02-19/mortgage-trend.png" alt="groot"&gt;

&lt;/p&gt;
&lt;p&gt;Then there is this nerdwallet &lt;a href="https://www.nerdwallet.com/mortgages/refinance-calculator/calculate-refinance-savings"&gt;refinance calculator&lt;/a&gt; can give you precisely what might be your saving etc by entering your current mortgae and projected morgage rate.&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2021-02-19/nerdwallet.png" alt="groot"&gt;

&lt;/p&gt;
&lt;p&gt;from there you can click &amp;ldquo;Get Started&amp;rdquo; link at the bottom to see rates offered.&lt;/p&gt;
&lt;p&gt;I locked rate at 1.75 with points (APR 2.0) last week. You should check it out and see how much you will be saving!
Make sure to consider:&lt;/p&gt;</description></item><item><title>Smile every time you sudo</title><link>https://naoko.github.io/posts/2021-02-18-sudoers-lecture/</link><pubDate>Thu, 18 Feb 2021 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2021-02-18-sudoers-lecture/</guid><description>&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2021-02-18-groot.png" alt="groot"&gt;

&lt;/p&gt;
&lt;p&gt;If you want your terminal prompt to look like this every time you sodo, please continue reading.
note: i did on ubuntu so for other flavor, file path might be slightly different&lt;/p&gt;
&lt;h3 id="step-1-download-this-amazing-ascii-art-text-and-move-to-etcsudoersdsudoerslecture"&gt;step 1. download this amazing ascii art text and move to /etc/sudoers.d/sudoers.lecture&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;❯ curl -O https://caferock.org/chris/groot.txt
❯ sudo cp groot.txt /etc/sudoers.d/sudoers.lecture
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="step-2-edit-etcsudoers-or-etcsudoersdprivacy"&gt;step 2. edit /etc/sudoers (or /etc/sudoers.d/privacy)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;Defaults lecture = always
Defaults lecture_file = /etc/sudoers.d/sudoers.lecture 
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="lets-see-this-magnificent-art-3"&gt;Let&amp;rsquo;s see this magnificent art &amp;lt;3&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;# reset timestamp
❯ sudo -k 
# some sudo command
❯ sudo -l
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description></item><item><title>Don't let your money sleep</title><link>https://naoko.github.io/posts/2020-12-20-grow-your-money/</link><pubDate>Sun, 20 Dec 2020 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2020-12-20-grow-your-money/</guid><description>&lt;h3 id="you-loos-your-money-if-you-have-your-money-in-saving-account"&gt;You loos your money if you have your money in saving account&lt;/h3&gt;
&lt;p&gt;What? How? The best saving rate today is like 0.5%. So if I have $10,000 then
you will earn $50 a year so how that is loosing money?&lt;/p&gt;
&lt;p&gt;Because currency devalued over time (cause of an increase in the money supply is one of the biggest reason) and its rate is shown below:&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2020-12-20/inflation_rate.png" alt="Inflation rate"&gt;

&lt;/p&gt;
&lt;p&gt;You see no year has inflation rate below 0.5% thus you are loosing money although you maybe earning 0.5%.&lt;/p&gt;</description></item><item><title>nvm to manage node version</title><link>https://naoko.github.io/posts/2020-10-25-nvm/</link><pubDate>Sun, 25 Oct 2020 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2020-10-25-nvm/</guid><description>&lt;p&gt;NVM is Node Version Manager is a tool to manage multiple node.js version.&lt;/p&gt;
&lt;h3 id="list-installed-version"&gt;list installed version&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;❯ nvm ls

 v8.17.0
-&amp;gt; v12.9.0
 system
default -&amp;gt; 12.9 (-&amp;gt; v12.9.0)
node -&amp;gt; stable (-&amp;gt; v12.9.0) (default)
stable -&amp;gt; 12.9 (-&amp;gt; v12.9.0) (default)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="list-available-version-on-remote-is-version-14-available-if-so-it-will-list"&gt;list available version on remote (is version 14 available? If so it will list)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;❯ nvm ls-remote 14
 v14.0.0
 v14.1.0
 ...
 v14.13.1
 v14.14.0
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="install-the-version-that-you-would-like"&gt;Install the version that you would like&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;❯ nvm install 14
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="set-version-14-or-another-version-as-default"&gt;Set version 14 (or another version) as default&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;nvm alias default 14
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id="switch-to-version-8-or-another-version"&gt;Switch to version 8 (or another version)&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;❯ nvm use v8
Now using node v8.17.0 (npm v6.14.8)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Cheers!&lt;/p&gt;</description></item><item><title>Install and use fzf</title><link>https://naoko.github.io/posts/2020-07-13-fzf/</link><pubDate>Mon, 13 Jul 2020 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2020-07-13-fzf/</guid><description>&lt;p&gt;fzf is a general-purpose command-line fuzzy finder.
Let&amp;rsquo;s install and make you 10 times more productive!&lt;/p&gt;
&lt;h3 id="install-fzf"&gt;install fzf&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;# clone into ~/.fzf
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
# run install command
~/.fzf/install
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;output: answer &amp;ldquo;y&amp;rdquo; to enable auto-completion and key bindings&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Cloning into &lt;span style="color:#f1fa8c"&gt;&amp;#39;/home/naoko/.fzf&amp;#39;&lt;/span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote: Enumerating objects: 101, &lt;span style="color:#ff79c6"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote: Counting objects: 100% &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;101/101&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;, &lt;span style="color:#ff79c6"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote: Compressing objects: 100% &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;94/94&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;, &lt;span style="color:#ff79c6"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;remote: Total &lt;span style="color:#bd93f9"&gt;101&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;delta 4&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;, reused &lt;span style="color:#bd93f9"&gt;28&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;delta 2&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;, pack-reused &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Receiving objects: 100% &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;101/101&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;, 180.78 KiB | 1.83 MiB/s, &lt;span style="color:#ff79c6"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Resolving deltas: 100% &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;4/4&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;, &lt;span style="color:#ff79c6"&gt;done&lt;/span&gt;.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Downloading bin/fzf ...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - Found in &lt;span style="color:#8be9fd;font-style:italic"&gt;$PATH&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - Creating symlink: bin/fzf -&amp;gt; /usr/bin/fzf
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - Checking fzf executable ... 0.20.0 !&lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; 0.21.1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; % Total % Received % Xferd Average Speed Time Time Time Current
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; Dload Upload Total Spent Left Speed
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#bd93f9"&gt;100&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;637&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;100&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;637&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;1750&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; --:--:-- --:--:-- --:--:-- &lt;span style="color:#bd93f9"&gt;1750&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#bd93f9"&gt;100&lt;/span&gt; 1127k &lt;span style="color:#bd93f9"&gt;100&lt;/span&gt; 1127k &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; 991k &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; 0:00:01 0:00:01 --:--:-- 2597k
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - Checking fzf executable ... 0.21.1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Do you want to &lt;span style="color:#8be9fd;font-style:italic"&gt;enable&lt;/span&gt; fuzzy auto-completion? &lt;span style="color:#ff79c6"&gt;([&lt;/span&gt;y&lt;span style="color:#ff79c6"&gt;]&lt;/span&gt;/n&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; y
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Do you want to &lt;span style="color:#8be9fd;font-style:italic"&gt;enable&lt;/span&gt; key bindings? &lt;span style="color:#ff79c6"&gt;([&lt;/span&gt;y&lt;span style="color:#ff79c6"&gt;]&lt;/span&gt;/n&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; y
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Generate /home/naoko/.fzf.bash ... OK
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Generate /home/naoko/.fzf.zsh ... OK
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Do you want to update your shell configuration files? &lt;span style="color:#ff79c6"&gt;([&lt;/span&gt;y&lt;span style="color:#ff79c6"&gt;]&lt;/span&gt;/n&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; y
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Update /home/naoko/.bashrc:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ff79c6"&gt;[&lt;/span&gt; -f ~/.fzf.bash &lt;span style="color:#ff79c6"&gt;]&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;source&lt;/span&gt; ~/.fzf.bash
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; + Added
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Update /home/naoko/.zshrc:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; - &lt;span style="color:#ff79c6"&gt;[&lt;/span&gt; -f ~/.fzf.zsh &lt;span style="color:#ff79c6"&gt;]&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;source&lt;/span&gt; ~/.fzf.zsh
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; + Added
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Finished. Restart your shell or reload config file.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;source&lt;/span&gt; ~/.bashrc &lt;span style="color:#6272a4"&gt;# bash&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;source&lt;/span&gt; ~/.zshrc &lt;span style="color:#6272a4"&gt;# zsh&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Use uninstall script to remove fzf.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;For more information, see: https://github.com/junegunn/fzf
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="lets-play"&gt;Let&amp;rsquo;s play&lt;/h3&gt;
&lt;h4 id="key-binidngs"&gt;Key Binidngs&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;ctl + r: fuzzy find thorugh your command history&lt;/li&gt;
&lt;li&gt;ctl + t: fuzzy find through the current directory&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="-trigger-command--tab"&gt;&lt;code&gt;**&lt;/code&gt; trigger command + tab&lt;/h4&gt;
&lt;p&gt;It understand context and list only relative stuff. eg:&lt;/p&gt;</description></item><item><title>Pretty JSON in Sublime on Linux</title><link>https://naoko.github.io/posts/2020-05-14-sublime-pretty-json/</link><pubDate>Thu, 14 May 2020 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2020-05-14-sublime-pretty-json/</guid><description>&lt;p&gt;I&amp;rsquo;ve been using &lt;a href="https://jsonlint.com/"&gt;JSONLint&lt;/a&gt; for every JSON prettifier needs.
This site is super because it even format invalid JSON.
For example, standard JSON prettifier won&amp;rsquo;t prettify JSON with key or value enclosed in single quote but this site does but having your local editor do quick prettifier if you have valid JSON or willing to quickly fix with find and replace.&lt;/p&gt;
&lt;p&gt;Sublime is my go to text editor - taking note, prettify JSON etc. So let&amp;rsquo;s do that real quick.&lt;/p&gt;</description></item><item><title>Stanza - A Python NLP Library for Many Human Languages</title><link>https://naoko.github.io/posts/2020-04-12-stanza-/</link><pubDate>Sun, 12 Apr 2020 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2020-04-12-stanza-/</guid><description>&lt;p&gt;I tested out &lt;a href="https://stanfordnlp.github.io/stanza/"&gt;Stanza&lt;/a&gt;.
English tokenizer and definately works.
I ran quick test with Japanese lang and output was somewhat unexpected.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;import stanza

# japanese &amp;#34;ja&amp;#34;, for english model &amp;#34;en&amp;#34;

stanza.download(&amp;#34;ja&amp;#34;)
nlp = stanza.Pipeline(&amp;#34;ja&amp;#34;)
doc = nlp(&amp;#34;皆さんおはようございます！　ご機嫌いかがですか？&amp;#34;)

for i, sentence in enumerate(doc.sentences):
 print(f&amp;#34;===== Sentence {i+1} tokens =====&amp;#34;)
 print(*[f&amp;#34;word: {word.text}\t upos: {word.upos} xpos: {word.xpos}&amp;#34; for word in sentence.words], sep=&amp;#34;\n&amp;#34;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The output is:&lt;/p&gt;</description></item><item><title>Useful Ubuntu Keyboard Shortcuts</title><link>https://naoko.github.io/posts/2020-03-08-ubunut-shortcuts/</link><pubDate>Sun, 08 Mar 2020 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2020-03-08-ubunut-shortcuts/</guid><description>&lt;p&gt;See &lt;a href="https://help.ubuntu.com/stable/ubuntu-help/shell-keyboard-shortcuts.html"&gt;Useful keyboard shortcuts&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Addition to the above:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Super + Space: Change input keyboard&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ctl + Q: Close an application window&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Super + ↑ : Maxmize the application window.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Super → or ← : Move the application window to left | right&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;
Cheers!
&lt;/code&gt;&lt;/pre&gt;</description></item><item><title>Kafka CLI kaf</title><link>https://naoko.github.io/posts/2020-01-25-kafka-cli-kaf/</link><pubDate>Sat, 25 Jan 2020 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2020-01-25-kafka-cli-kaf/</guid><description>&lt;p&gt;Kafka is super popular and powerful data streaming platform but I&amp;rsquo;m surprised by lack of easy cli tool.&lt;/p&gt;
&lt;p&gt;To find out version, there is no such thing as &lt;code&gt;kafka --version&lt;/code&gt; you do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ find /opt/kafka/libs/ -name kafka_&lt;span style="color:#f1fa8c"&gt;\*&lt;/span&gt; | head -1
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;/opt/kafka/libs/kafka_2.13-2.4.0-test-sources.jar
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;where 2.13 is scala version and 2.4.0 is kafka version.&lt;/p&gt;
&lt;p&gt;One tool that I played with is lovely called &lt;a href="https://github.com/birdayz/kaf"&gt;kaf&lt;/a&gt;, &amp;ldquo;Modern CLI for Kafka&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;to list topics, you do:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo bin/kafka-topics.sh --list --bootstrap-server localhost:9092
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;whereas with kaf you do:&lt;/p&gt;</description></item><item><title>Docker Image / Container Cleaning</title><link>https://naoko.github.io/posts/2019-08-25-docker-cleaning/</link><pubDate>Sun, 25 Aug 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-08-25-docker-cleaning/</guid><description>&lt;p&gt;Unused Docker image and container can quickly take up your disk spaces.&lt;/p&gt;
&lt;h3 id="lets-check-disk-usage"&gt;Let&amp;rsquo;s check disk usage&lt;/h3&gt;
&lt;p&gt;Summary of data used. You can add &lt;code&gt;-v&lt;/code&gt; flag for detailed info.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ docker system df
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TYPE TOTAL ACTIVE SIZE RECLAIMABLE
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Images &lt;span style="color:#bd93f9"&gt;87&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;1&lt;/span&gt; 63.39GB 63.17GB &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;99%&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Containers &lt;span style="color:#bd93f9"&gt;1&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; 0B 0B
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Local Volumes &lt;span style="color:#bd93f9"&gt;69&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;1&lt;/span&gt; 2.732GB 2.683GB &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;98%&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Build Cache &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; 0B 0B
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="remove-unused-data"&gt;Remove unused data&lt;/h3&gt;
&lt;p&gt;The following command will remove:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;all stopped containers&lt;/li&gt;
&lt;li&gt;all networks not used by at least one container&lt;/li&gt;
&lt;li&gt;all &lt;strong&gt;dangling images&lt;/strong&gt; (see below fo dangling images)&lt;/li&gt;
&lt;li&gt;all build cache
By default, volumes are not removed to prevent important data from being deleted.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ docker system prune
WARNING! This will remove:
 - all stopped containers
 - all networks not used by at least one container
 - all dangling images
 - all dangling build cache

Are you sure you want to continue? [y/N] y
Deleted Containers:
...
Total reclaimed space: 13.91GB
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Options:&lt;/p&gt;</description></item><item><title>Create and Extract tar.gz on Ubuntu</title><link>https://naoko.github.io/posts/2019-08-07-compress-targz/</link><pubDate>Wed, 07 Aug 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-08-07-compress-targz/</guid><description>&lt;h3 id="create-targz-archives"&gt;Create tar.gz archives&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;tar czf new-tar-file-name.tar.gz file-or-folder-to-archive
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;c - create new archive
z - compress the archive using gzip
f - use archive file&lt;/p&gt;
&lt;h3 id="extract-archives"&gt;Extract archives&lt;/h3&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;tar -xzf tar-file-name.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;x - extract the archive.
z - uncompress the archive using gzip.
f - use archive file.&lt;/p&gt;
&lt;h3 id="lets-do-it"&gt;Let&amp;rsquo;s do it.&lt;/h3&gt;
&lt;p&gt;I only want to compress 3 files.
When I extract archive what I want to see is files in the directory.&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;$ tree file_dir/
file_dir/
├── file1.txt
├── file2.txt
└── file3.txt

$ cd file_dir
$ tar czf files.tar.gz .
tar: .: file changed as we read it

# moved files.tar.gz to different directory
$ tar -xzf files.tar.gz 
$ ls
file1.txt file2.txt file3.txt file_dir files.tar.gz
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Cheers!&lt;/p&gt;</description></item><item><title>Install GraalVM and run ptyhon with debugger</title><link>https://naoko.github.io/posts/2019-04-14-graalvm-started/</link><pubDate>Sun, 14 Apr 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-04-14-graalvm-started/</guid><description>&lt;h3 id="what-is-graalvm"&gt;What is GraalVM?&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;GraalVM is a high-performance, embeddable, polyglot virtual machine for running
applications written in JavaScript, Python, Ruby, R,
JVM-based languages like Java, Scala, Kotlin, and LLVM-based languages such as C and C++.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Here is the &lt;a href="https://www.graalvm.org/docs/"&gt;Official doc link&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hmm&amp;hellip; Okay, I have to see it.&lt;/p&gt;
&lt;h3 id="lets-install"&gt;Let&amp;rsquo;s install&lt;/h3&gt;
&lt;p&gt;Below is the way I installed GraalVM Community Edition on Ubuntu 18.04.
For other platform, the official doc installation
guide is &lt;a href="https://www.graalvm.org/docs/getting-started/#install-graalvm"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# update this number to latest version from here: https://github.com/oracle/graal/releases&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#ff79c6"&gt;=&lt;/span&gt;1.0.0-rc15
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wget https://github.com/oracle/graal/releases/download/vm-&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;/graalvm-ce-&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;-linux-amd64.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;tar -xvzf graalvm-ce-&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;-linux-amd64.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# clean up&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;rm graalvm-ce-&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;-linux-amd64.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# to wherever you want. &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mv graalvm-ce-1.0.0-rc15/ ~/bin/graalvm
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# if you want to make it permanent, put this in your bashrc &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;export&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;PATH&lt;/span&gt;&lt;span style="color:#ff79c6"&gt;=&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;$HOME&lt;/span&gt;/graalvm/bin:&lt;span style="color:#8be9fd;font-style:italic"&gt;$PATH&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now that your graalvm/bin in your path, you&amp;rsquo;ll get the GraalVM versions of those runtimes.&lt;/p&gt;</description></item><item><title>Get my public IP address via CLI</title><link>https://naoko.github.io/posts/2019-04-04-cli-my-ip/</link><pubDate>Thu, 04 Apr 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-04-04-cli-my-ip/</guid><description>&lt;h2 id="how-to-determine-my-public-ip-address-assigned-by-the-isp-via-cli"&gt;How to determine my public IP address assigned by the ISP via CLI&lt;/h2&gt;
&lt;h5 id="use-dig-command"&gt;Use dig command&lt;/h5&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;dig +short myip.opendns.com @resolver1.opendns.com
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id="use-3rd-party"&gt;Use 3rd party&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;curl ifconfig.me
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Cheers!&lt;/p&gt;</description></item><item><title>Fingerprint of PEM ssh key</title><link>https://naoko.github.io/posts/2019-04-03-fingerprint-of-pem/</link><pubDate>Wed, 03 Apr 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-04-03-fingerprint-of-pem/</guid><description>&lt;h3 id="the-problem"&gt;The problem&lt;/h3&gt;
&lt;p&gt;I was on AWS and needed to select SSH Key pair.
It has been a while that I needed to create one that might require SSH Key pair.
So to be sure I got the correct key, I needed to compare fingerprint listed on Key Pair list.
I do have &lt;code&gt;pem&lt;/code&gt; key with name contain &lt;code&gt;aws&lt;/code&gt; so I want to generate finger print for that key.&lt;/p&gt;
&lt;h3 id="how-to-solve-it"&gt;How to solve it&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;openssl pkcs8 -in path/to/private_key_file -nocrypt -topk8 -outform DER | openssl sha1 -c
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;or use AWS tool&lt;/p&gt;</description></item><item><title>Get started with Cython</title><link>https://naoko.github.io/posts/2019-03-24-get-started-with-cython/</link><pubDate>Sun, 24 Mar 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-03-24-get-started-with-cython/</guid><description>&lt;p&gt;Cython is designed as a C-extension for Python.
The developers can use Cython to speed up Python code execution.
Performance gains are most significant in CPU-bound programs.&lt;/p&gt;
&lt;p&gt;Here is some cpu-intense code in python&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# cat compute_it.py &lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; datetime
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; math
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;def&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;main&lt;/span&gt;():
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; t0 &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; datetime&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;datetime&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;now()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; do_math(num&lt;span style="color:#ff79c6"&gt;=&lt;/span&gt;&lt;span style="color:#bd93f9"&gt;30_000_000&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; dt &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; datetime&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;datetime&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;now() &lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; t0
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;print&lt;/span&gt;(&lt;span style="color:#f1fa8c"&gt;&amp;#34;Done in &lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;{:,.2f}&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt; sec&amp;#34;&lt;/span&gt;&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;format(dt&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;total_seconds()))
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;def&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;do_math&lt;/span&gt;(start&lt;span style="color:#ff79c6"&gt;=&lt;/span&gt;&lt;span style="color:#bd93f9"&gt;0&lt;/span&gt;, num&lt;span style="color:#ff79c6"&gt;=&lt;/span&gt;&lt;span style="color:#bd93f9"&gt;10&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	pos &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; start
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	k_sq &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;1000&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;*&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;1000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#ff79c6"&gt;while&lt;/span&gt; pos &lt;span style="color:#ff79c6"&gt;&amp;lt;&lt;/span&gt; num:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		pos &lt;span style="color:#ff79c6"&gt;+=&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		math&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;sqrt((pos &lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; k_sq) &lt;span style="color:#ff79c6"&gt;*&lt;/span&gt; (pos &lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; k_sq))
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;if&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;__name__&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;==&lt;/span&gt; &lt;span style="color:#f1fa8c"&gt;&amp;#39;__main__&amp;#39;&lt;/span&gt;:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; main()
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Took 7.39 sec&lt;/p&gt;</description></item><item><title>list changes of specific line(s) with git</title><link>https://naoko.github.io/posts/2019-03-19-git-blame-and-log/</link><pubDate>Tue, 19 Mar 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-03-19-git-blame-and-log/</guid><description>&lt;p&gt;If you only need to know who was the last person to change the line,
&lt;code&gt;git blame&lt;/code&gt; will do&lt;/p&gt;
&lt;p&gt;To see who modified the code on line # 85 and next 5 lines&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git blame &lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;path&lt;/span&gt;-to-the-file&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt; -L 85,+5
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;output would look like this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;f1f66980053 &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;Naoko 2019-02-25 17:32:25 -0700 85&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; &lt;span style="color:#8be9fd;font-style:italic"&gt;text&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; re.sub&lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;r&lt;span style="color:#f1fa8c"&gt;&amp;#39;{([^\n]+?)}&amp;#39;&lt;/span&gt;, r&lt;span style="color:#f1fa8c"&gt;&amp;#39;{0[\1]}&amp;#39;&lt;/span&gt;, template&lt;span style="color:#ff79c6"&gt;[&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;&amp;#34;text&amp;#34;&lt;/span&gt;&lt;span style="color:#ff79c6"&gt;])&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;50ccaf0f3b8 &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;Naoko 2019-02-16 10:44:54 -0700 86&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; template&lt;span style="color:#ff79c6"&gt;[&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;&amp;#34;text&amp;#34;&lt;/span&gt;&lt;span style="color:#ff79c6"&gt;]&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; text.format&lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;template_vars&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;f373fd241db &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;Tom Bocklisch 2018-07-10 14:33:18 +0200 87&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; except KeyError as e:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;f373fd241db &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;Tom Bocklisch 2018-07-10 14:33:18 +0200 88&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; logger.exception&lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;390792a0008 &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;Tom Bocklisch 2018-11-16 12:51:21 +0100 89&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt; &lt;span style="color:#f1fa8c"&gt;&amp;#34;Failed to fill utterance template &amp;#39;{}&amp;#39;. &amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But often the above information is not good enough.&lt;/p&gt;</description></item><item><title>How to fork and keeping your github repo in sync</title><link>https://naoko.github.io/posts/2019-02-19-fork-in-sync/</link><pubDate>Tue, 19 Feb 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-02-19-fork-in-sync/</guid><description>&lt;h2 id="forking-a-github-repository"&gt;Forking a Github Repository&lt;/h2&gt;
&lt;p&gt;Just click &amp;ldquo;fork&amp;rdquo; button on upper right corner&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2019-02-19/fork-button.png" alt=""&gt;


&lt;em&gt;black tea&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="making-a-local-clone"&gt;Making a Local Clone&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ git clone https://github.com/YOUR_USERNAME/YOUR_FORK.git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="adding-a-remote"&gt;Adding a Remote&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# list current configured remote repository for your fork&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ git remote -v
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# add upstream&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ git remote add upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# list again to see upstream is added&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ git remote -v
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;origin https://github.com/YOUR_USERNAME/YOUR_FORK.git &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;fetch&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;	
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;origin https://github.com/YOUR_USERNAME/YOUR_FORK.git &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;push&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;fetch&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;upstream https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git &lt;span style="color:#ff79c6"&gt;(&lt;/span&gt;push&lt;span style="color:#ff79c6"&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="working-in-a-branch"&gt;Working in a Branch&lt;/h2&gt;
&lt;p&gt;Create and checkout a feature branch.
Personally, I like to set github issue number followed by
summary of issue. This notation &lt;code&gt;GH-${issue_num}&lt;/code&gt; will create a link
to the issue on github.&lt;/p&gt;</description></item><item><title>コンブチャの作り方</title><link>https://naoko.github.io/posts/2019-01-19-how-to-brew-kombucha/</link><pubDate>Sat, 19 Jan 2019 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2019-01-19-how-to-brew-kombucha/</guid><description>&lt;h2 id="準備するもの"&gt;準備するもの&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;スコビー（SCOBY - symbiotic culture of bacteria and yeast)
&lt;ul&gt;
&lt;li&gt;スコビーはどこで手に入れる？ &lt;br&gt;
-　自分で作ることもできるけどお友達にもらったりとかアマゾンでもかえるよ。&lt;/li&gt;
&lt;li&gt;スコビーはスターター紅茶（コンブチャ）と一緒に運ばれてきます。&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;黒紅茶の茶葉
-　ティーバックでもいいけどルースティーリーフのほうがお得なはず。

 &lt;img src="https://naoko.github.io/images/2019-01-19/black-tea.jpg" alt=""&gt;


&lt;em&gt;black tea&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;砂糖（グラニュー糖があ勧め）&lt;/li&gt;
&lt;li&gt;広口のガラス瓶　（熱湯消毒してね）
&lt;ul&gt;
&lt;li&gt;私が使ってるのは 2.5 gallon (9.5 litter) と大きいけど 1 gallon (3.7 litter)
サイズから始めるはよいスタートかとおもいます。ちなみに右の瓶はおよそ1リットルで
左側のがおよそ9.5リットルです。

 &lt;img src="https://naoko.github.io/images/2019-01-19/kombucha-jars.jpg" alt=""&gt;


&lt;em&gt;Kombucha jars&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;キッチンクロスまたはキッチンペーパー&lt;/li&gt;
&lt;li&gt;キッチンクロスを留めるゴムまたは紐&lt;/li&gt;
&lt;li&gt;２次発行用のエアタイトボトルもしくは瓶
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;私はこんなボトルを使ってます。&lt;/p&gt;</description></item><item><title>Install Python on Ubuntu</title><link>https://naoko.github.io/posts/2018-10-15-how-to-install-python-ubuntu/</link><pubDate>Mon, 15 Oct 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-10-15-how-to-install-python-ubuntu/</guid><description>&lt;p&gt;Check the latest version &lt;a href="https://www.python.org/"&gt;here&lt;/a&gt;
At the time of writing, 3.8.0 is the latest and 3.8.5 has release candidate.&lt;/p&gt;
&lt;p&gt;Also make sure you have sqlite3, libbz2-dev and libffi-dev are installed&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt-get install libsqlite3-dev libbz2-dev libffi-dev
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#ff79c6"&gt;=&lt;/span&gt;3.8.5
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;wget https://www.python.org/ftp/python/&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;/Python-&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;.tgz
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;tar xzvf Python-&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;.tgz
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;cd&lt;/span&gt; Python-&lt;span style="color:#f1fa8c"&gt;${&lt;/span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;version&lt;/span&gt;&lt;span style="color:#f1fa8c"&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Linux (or any Unix-like system), the default prefix and exec-prefix are /usr/local.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# thus you should be able to omit --prefix here&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# --enable-optimizations option for significant speed boost (10-20%) but much&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# slower build process&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;./configure --prefix /usr/local --enable-optimizations
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;make
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo make install
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# OR if you want to skip creating the python link then:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo make altinstall
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;in case you want to remove and re-install it again cause some software
was missing before installation&lt;/p&gt;</description></item><item><title>Fun Indoor Training</title><link>https://naoko.github.io/posts/2018-10-03-compare-indoor-cycling/</link><pubDate>Wed, 03 Oct 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-10-03-compare-indoor-cycling/</guid><description>&lt;h3 id="the-goal"&gt;The Goal:&lt;/h3&gt;
&lt;p&gt;Decide on most money worth indoor cycling bike and software options.&lt;/p&gt;
&lt;p&gt;Motivation:
I run almost everyday but some days, my knee hurts and some days it rain on me.
For those reasons, I have been thinking of other cardio option other than
running and swimming. Biking seems so fun with right software and easy on your knee.&lt;/p&gt;
&lt;h3 id="software"&gt;Software&lt;/h3&gt;
&lt;p&gt;Just like computer, without right software device (bike) won&amp;rsquo;t be much useful.
You will be more motivated if software is good (addictive and stress free) and you will hopefully use your
device to the full potential.&lt;/p&gt;</description></item><item><title>How to setup custom domain in Blogger via Namecheap</title><link>https://naoko.github.io/posts/2018-09-03-how-to-setup-custom-domain-in-blogger-and-namecheap/</link><pubDate>Mon, 03 Sep 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-09-03-how-to-setup-custom-domain-in-blogger-and-namecheap/</guid><description>&lt;h3 id="the-goal"&gt;The Goal:&lt;/h3&gt;
&lt;p&gt;You got blog going with Blogger and now ready to setup custom domain!&lt;/p&gt;
&lt;h3 id="how-to-setup-custom-domain"&gt;How to setup custom domain?&lt;/h3&gt;
&lt;p&gt;First, you will need to register your domain.
To register your domain, you want to go through domain registrar.
To become the domain registrar, you will need ICANN Acrediation so you want to go ahead register through registrar instead of becoming one.&lt;/p&gt;
&lt;p&gt;Now there are many of them out there. The popular ones are likely GoDaddy.
I see Google is providing this service too.
I decided go to with &lt;a href="https://www.namecheap.com/"&gt;NameCheap.com&lt;/a&gt;
for a few reasons:&lt;/p&gt;</description></item><item><title>Elasticsearch Access</title><link>https://naoko.github.io/posts/2018-08-22-es-access-from-outside/</link><pubDate>Wed, 22 Aug 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-08-22-es-access-from-outside/</guid><description>&lt;h3 id="the-problem"&gt;The problem:&lt;/h3&gt;
&lt;p&gt;You installed Elasticsearch on server. You can run
&lt;code&gt;curl localhost:9200&lt;/code&gt; and all looks good but the access is denied from outside
when &lt;code&gt;curl &amp;lt;server-ip&amp;gt;:9200&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id="how-to-solve-it"&gt;How to solve it&lt;/h3&gt;
&lt;p&gt;So first thing first. Elasticsearch do need to listen to ip you are accessing.
To make it listen to all, you can simply change / add
&lt;code&gt;network.host: 0.0.0.0&lt;/code&gt; to
&lt;code&gt;/etc/elasticsearch/elasticsearch.yml&lt;/code&gt;
and restart elasticsearch server.
Try &lt;code&gt;curl &amp;lt;server-ip&amp;gt;:9200&lt;/code&gt; and works? That&amp;rsquo;s great. Your server is configured / ready for port 9200.&lt;/p&gt;</description></item><item><title>Intercept Python Logging</title><link>https://naoko.github.io/posts/2018-07-26-intercept-python-logging/</link><pubDate>Thu, 26 Jul 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-07-26-intercept-python-logging/</guid><description>&lt;h3 id="the-problem"&gt;The problem:&lt;/h3&gt;
&lt;p&gt;I need to ship specific log record and had formatter written in python.
It is pretty complex transformation.&lt;/p&gt;
&lt;p&gt;I thought of using Logstash but I then need to either convert this python logic or write a plugin
to use already written python parser. Plus I need to install logstash&amp;hellip;
I wanted a simpler solution&lt;/p&gt;
&lt;h3 id="how-to-solve-it"&gt;How to solve it&lt;/h3&gt;
&lt;p&gt;Use custom python logging Handler and Filter!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-python" data-lang="python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;import&lt;/span&gt; logging
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;messages &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; []
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logger &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; logging&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;getLogger(&lt;span style="color:#8be9fd;font-style:italic"&gt;__name__&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logger&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;setLevel(logging&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;DEBUG)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;class&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;ListenFilter&lt;/span&gt;(logging&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;Filter):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ff79c6"&gt;def&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;filter&lt;/span&gt;(&lt;span style="font-style:italic"&gt;self&lt;/span&gt;, record):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f1fa8c"&gt;&amp;#34;&amp;#34;&amp;#34;Determine which log records to output.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f1fa8c"&gt; Returns 0 for no, nonzero for yes.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f1fa8c"&gt; &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ff79c6"&gt;if&lt;/span&gt; record&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;getMessage()&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;startswith(&lt;span style="color:#f1fa8c"&gt;&amp;#39;dont: &amp;#39;&lt;/span&gt;):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ff79c6"&gt;return&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;False&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ff79c6"&gt;return&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;True&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;class&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;RequestsHandler&lt;/span&gt;(logging&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;Handler):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#ff79c6"&gt;def&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;emit&lt;/span&gt;(&lt;span style="font-style:italic"&gt;self&lt;/span&gt;, record):
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f1fa8c"&gt;&amp;#34;&amp;#34;&amp;#34;Send the log records (created by loggers) to
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f1fa8c"&gt; the appropriate destination.
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f1fa8c"&gt; &amp;#34;&amp;#34;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; messages&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;append(record&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;getMessage())
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;handler &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; RequestsHandler()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logger&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;addHandler(handler)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;filter_ &lt;span style="color:#ff79c6"&gt;=&lt;/span&gt; ListenFilter()
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logger&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;addFilter(filter_)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# log I want&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logger&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;info(&lt;span style="color:#f1fa8c"&gt;&amp;#34;logme: Howdy!&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# log i want to skip&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;logger&lt;span style="color:#ff79c6"&gt;.&lt;/span&gt;info(&lt;span style="color:#f1fa8c"&gt;&amp;#34;dont: I&amp;#39;m doing great!&amp;#34;&lt;/span&gt;)
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# prints [&amp;#39;logme: Howdy!&amp;#39;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#8be9fd;font-style:italic"&gt;print&lt;/span&gt;(messages)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Cheers!&lt;/p&gt;</description></item><item><title>ML Platforms</title><link>https://naoko.github.io/posts/2018-07-08-ml-platform/</link><pubDate>Sun, 08 Jul 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-07-08-ml-platform/</guid><description>&lt;h3 id="the-problem"&gt;The problem:&lt;/h3&gt;
&lt;p&gt;When you start small Machine Learning team with a few projects, your experiment is done
via Jupyter Notebook and maybe the notebook is in github.
The notebook might contain a method to download data so it can be reproducible but
it is getting harder and harder to track various experiments.&lt;/p&gt;
&lt;p&gt;We also need to make sure models does not train on corrupted / skewed data
and only high quality model are pushed to production.
Currently these processes are manual and not centralized nor has unified common tool.&lt;/p&gt;</description></item><item><title>Fix screen resolution after 18.04 LTS upgrade on System 76</title><link>https://naoko.github.io/posts/2018-06-05-fix-resolution-ubuntu/</link><pubDate>Tue, 05 Jun 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-06-05-fix-resolution-ubuntu/</guid><description>&lt;h3 id="the-problem"&gt;The problem:&lt;/h3&gt;
&lt;p&gt;Ubuntu prompt me that 18.04 LST is available so I clicked &lt;code&gt;Upgrade&lt;/code&gt; to initiate upgrade.
When upgrade is completed, the system was rebooted and came back with lowest screen resolution you can ever imagine.&lt;/p&gt;
&lt;h3 id="fix"&gt;Fix&lt;/h3&gt;
&lt;p&gt;In summary&amp;hellip;.
This is only good for System 76 system.
Looks like driver update was necessary. Anyhow&amp;hellip;&lt;/p&gt;
&lt;p&gt;So upgrade was completed&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ lsb_release -a
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;No LSB modules are available.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Distributor ID:	Ubuntu
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Description:	Ubuntu 18.04 LTS
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Release:	18.04
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Codename:	bionic
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and looks like I lost lsb module. so restoring that&amp;hellip;&lt;/p&gt;</description></item><item><title>Python Project Install - develop vs install &amp; setuptools vs pip</title><link>https://naoko.github.io/posts/2018-03-05-your-project-install-pip-setup/</link><pubDate>Mon, 05 Mar 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-03-05-your-project-install-pip-setup/</guid><description>&lt;h3 id="the-problem"&gt;The problem:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;I don&amp;rsquo;t understand the difference between &lt;code&gt;setup.py develop&lt;/code&gt; and &lt;code&gt;setup.py install&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I don&amp;rsquo;t understand the difference between &lt;code&gt;setup.py develop&lt;/code&gt; and &lt;code&gt;pip install -e [dir]&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;I don&amp;rsquo;t see the changes to my code when I import my code&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="the-difference-between-setuppy-develop-and-setuppy-install"&gt;The difference between &lt;code&gt;setup.py develop&lt;/code&gt; and &lt;code&gt;setup.py install&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;In short, you want to run &lt;code&gt;setup.py develop&lt;/code&gt; when you are editing code because when you run
&lt;code&gt;setup.py install&lt;/code&gt;, it will copy your code into &lt;code&gt;site-packages&lt;/code&gt; thus if you want to test your
latest code you will need to &lt;code&gt;install&lt;/code&gt; (copy) again. On the other hand, with &lt;code&gt;develop&lt;/code&gt;, it creates
a link to your source code so that when you import your code, it is your latest code.&lt;/p&gt;</description></item><item><title>損を最低限に抑えて少しリッチになる</title><link>https://naoko.github.io/posts/2018-02-18-money-tip-for-beginner/</link><pubDate>Sun, 18 Feb 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-02-18-money-tip-for-beginner/</guid><description>&lt;h3 id="鉄則１出費しながらお金を貰う"&gt;鉄則１：出費しながらお金を貰う&lt;/h3&gt;
&lt;p&gt;全ての買い物、ガソリンやビルの支払いはキャッシュバックもしくはポイント制のクレジットカードで支払いする。
ちなみに私はChaseの1.5%CashBack Bonusを使ってます。
毎月の出費が$1,000だとしたら$15、１年で$180の現金。&lt;/p&gt;</description></item><item><title>Upgrade vagrant to latest</title><link>https://naoko.github.io/posts/2018-02-06-vagrant-on-ubuntu/</link><pubDate>Tue, 06 Feb 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-02-06-vagrant-on-ubuntu/</guid><description>&lt;h3 id="the-problem"&gt;The Problem:&lt;/h3&gt;
&lt;p&gt;I love vagrant. I am so dependent on testing my ansible before I run against &lt;code&gt;mutable&lt;/code&gt; boxes.
Yes, I&amp;rsquo;m still living in place where Ops provision VM and the box stays &lt;code&gt;mutable&lt;/code&gt;.
It is okay though&amp;hellip; change should be coming.
Anyhow, I installed vagnrat on my new Ubuntu machine (ubuntu-17.10) but the version was 1.9.
It was working fine until I upgraded the box to &lt;code&gt;debian/stretch64&lt;/code&gt;. It says that
&lt;code&gt;The box 'debian/stretch64' could not be found&lt;/code&gt;.
And noticed that it was trying to look in the old repo
&lt;code&gt;https://atlas.hashicorp.com&lt;/code&gt; instead of this &lt;code&gt;https://app.vagrantup.com&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Upgrade from Debian Jessie to Stretch</title><link>https://naoko.github.io/posts/2018-02-05-debian-jessie-to-stretch/</link><pubDate>Mon, 05 Feb 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-02-05-debian-jessie-to-stretch/</guid><description>&lt;h3 id="the-problem"&gt;The Problem:&lt;/h3&gt;
&lt;p&gt;I was running Debian Jessie (debian 8) and the package I needed to install was in debian testing repo.
So I added testing repo and installed the package (&lt;code&gt;libsnappy1v5&lt;/code&gt;) and I got scold by my super sysadmin boss:
&amp;ldquo;Naoko, don&amp;rsquo;t make a &lt;a href="https://wiki.debian.org/DontBreakDebian"&gt;FrankenDebian&lt;/a&gt;!&amp;rdquo;&lt;/p&gt;
&lt;h3 id="the-solution"&gt;The Solution:&lt;/h3&gt;
&lt;p&gt;The package I needed is now available in Stretch (debian 9) stable so I need to upgrade to it.&lt;/p&gt;
&lt;p&gt;First, I need to remove &lt;code&gt;testing&lt;/code&gt; repo I&amp;rsquo;ve added&lt;/p&gt;</description></item><item><title>Remote Edit with PyCharm</title><link>https://naoko.github.io/posts/2018-01-30-pycharm-remote-edit/</link><pubDate>Tue, 30 Jan 2018 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2018-01-30-pycharm-remote-edit/</guid><description>&lt;h3 id="the-problem"&gt;The Problem:&lt;/h3&gt;
&lt;p&gt;I have powerful Linux machine and semi-powerful mac-book pro.
I have need of editing code on Linux box from mac-book.&lt;/p&gt;
&lt;p&gt;PyCharm has &lt;code&gt;deploy&lt;/code&gt; method for pushing code but that requires sftp to setup etc.
I just want to use ssh to do it&amp;hellip;
I&amp;rsquo;ve done rsync method but sometimes manual sync was needed.
I want more transparent method&amp;hellip;&lt;/p&gt;
&lt;h3 id="the-solution"&gt;The Solution:&lt;/h3&gt;
&lt;p&gt;The easiest and most effective way for me was to mount linux directory via &lt;code&gt;sshfs&lt;/code&gt;.
It was amazingly easy. Assuming that you have established ssh connection with ssh-key with the remote machine.
All you have to do was to install &lt;code&gt;osxfuse&lt;/code&gt; and &lt;code&gt;sshfs&lt;/code&gt; with brew.&lt;/p&gt;</description></item><item><title>No Space Left Error when pip install</title><link>https://naoko.github.io/posts/2017-12-26-pip-install-no-space-left/</link><pubDate>Tue, 26 Dec 2017 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2017-12-26-pip-install-no-space-left/</guid><description>&lt;h3 id="the-problem"&gt;The Problem:&lt;/h3&gt;
&lt;p&gt;Got&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;OSError: &lt;span style="color:#ff79c6"&gt;[&lt;/span&gt;Errno 28&lt;span style="color:#ff79c6"&gt;]&lt;/span&gt; No space left on device
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;When your home directory where your virtual environment located
has more than enough space&amp;hellip;&lt;/p&gt;
&lt;h3 id="why"&gt;Why?:&lt;/h3&gt;
&lt;p&gt;The culprit is likely that your &lt;code&gt;/tmp&lt;/code&gt; directory do not have enough space for
some reason.
During the pip installation, pip will use temporarily directory
to perform what is necessary to perform installation (e.g. download source etc).
Thus if you do not have enough space in &lt;code&gt;/tmp&lt;/code&gt; that package installation requires then
you will get disk space error.&lt;/p&gt;</description></item><item><title>Secret Management with Vault</title><link>https://naoko.github.io/posts/2017-10-28-vault-secret-management/</link><pubDate>Sat, 28 Oct 2017 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2017-10-28-vault-secret-management/</guid><description>&lt;h3 id="the-problem"&gt;The problem:&lt;/h3&gt;
&lt;p&gt;Where do you store your config/deployment management script?
I&amp;rsquo;ve done 2 ways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Put along with application/repo.&lt;/li&gt;
&lt;li&gt;Put all the config/deployment script in one repo separately from apps.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Each approach has its own Pros and Cons and I prefer the first approach
which IMO is simpler but creates some duplication which is okay&amp;hellip;&lt;/p&gt;
&lt;p&gt;I have some shared secrets that I encrypt with &lt;code&gt;Ansible Vault&lt;/code&gt;
but when I had to copy and pasted this secret on a few repos
I started to look for better way to do this.&lt;/p&gt;</description></item><item><title>Our Dream Home</title><link>https://naoko.github.io/posts/2017-10-27-my-dream-home/</link><pubDate>Fri, 27 Oct 2017 00:00:00 +0000</pubDate><guid>https://naoko.github.io/posts/2017-10-27-my-dream-home/</guid><description>&lt;h2 id="weve-built-our-dream-house"&gt;We&amp;rsquo;ve built our dream house.&lt;/h2&gt;
&lt;p&gt;&amp;lsquo;view&amp;rsquo; fence backyard to see beautiful sunset over white tank mountain every day&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2017-10-27/kitchen.jpg" alt=""&gt;


&lt;em&gt;Dreamy Gourmet Kitchen&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2017-10-27/dining-living.jpg" alt=""&gt;


&lt;em&gt;Multi Sliding Glass Doors&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2017-10-27/dining.jpg" alt=""&gt;


&lt;em&gt;Dining Room&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2017-10-27/living.jpg" alt=""&gt;


&lt;em&gt;Living Room&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2017-10-27/master-bath.jpg" alt=""&gt;


&lt;em&gt;Finally Bath Tub&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;
 &lt;img src="https://naoko.github.io/images/2017-10-27/office.jpg" alt=""&gt;


&lt;em&gt;My Office&lt;/em&gt;&lt;/p&gt;
&lt;h3 id="milestone"&gt;Milestone&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Aug 2000: We bought our first home. It was new build but had no money to do any upgrade.
Selection of the house is also &lt;code&gt;cheap&lt;/code&gt; was one of the most important criteria.&lt;/li&gt;
&lt;li&gt;Oct 2008: When housing tanked, we bought the foreclosed home built in 2001. It is the model that we wanted to buy
back in 2000 but could not afford. Walking distance to elementary school. It was perfect for us at the time.&lt;/li&gt;
&lt;li&gt;Sep 2017: We did not need or desperately wanted new house. We were living below our means and saved up
good chunk of money. We were comfortable but we&amp;rsquo;ve decided to go outside of comfortable zone for various reasons and
decided to build this amazing house.&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>About Naoko</title><link>https://naoko.github.io/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://naoko.github.io/about/</guid><description>&lt;p&gt;You can find me on &lt;a href="https://github.com/naoko"&gt;GitHub&lt;/a&gt;, &lt;a href="https://linkedin.com/in/naokoreeves"&gt;LinkedIn&lt;/a&gt;, and &lt;a href="https://twitter.com/naoko_reeves"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Python Dict to JSON</title><link>https://naoko.github.io/pydict_to_json/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://naoko.github.io/pydict_to_json/</guid><description>&lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/codemirror.min.css"&gt;
&lt;link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/theme/dracula.min.css"&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/codemirror.min.js"&gt;&lt;/script&gt;
&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.16/mode/javascript/javascript.min.js"&gt;&lt;/script&gt;

&lt;h5&gt;Convert Python Dictionary to JSON&lt;/h5&gt;
&lt;div id="err" style="color: red"&gt;&lt;/div&gt;
&lt;textarea id="codeEditor" placeholder="Enter Python dict here"&gt;&lt;/textarea&gt;
&lt;button type="button" onclick="formatJSON();"&gt;Python Dict to JSON&lt;/button&gt;

&lt;script&gt;
 var editor = CodeMirror.fromTextArea(
 document.getElementById('codeEditor'),
 {lineNumbers: true, mode: "javascript", theme: "dracula"}
 );
 function formatJSON() {
 document.getElementById("err").innerHTML = "";
 var code = editor.getDoc().getValue();
 code = code.replace(/\'/g, '"');
 code = code.replace(/True/g, 'true');
 code = code.replace(/False/g, 'false');
 code = code.replace(/None/g, 'null');
 try {
 code = JSON.parse(code);
 editor.getDoc().setValue(JSON.stringify(code, null, 4));
 }
 catch(err) {
 var pos = parseInt(err.message.split(" ").slice(-1)[0]);
 var text = editor.getDoc().getValue();
 var lines = text.split("\n");
 var lineNum = 0;
 var lastLineLength = 0;
 var charCount = 0;
 while (pos &gt; charCount) {
 lastLineLength = lines[lineNum].length + 1;
 charCount += lastLineLength;
 lineNum++;
 }
 var column = pos - charCount + lastLineLength;
 var msg = err.message + "&lt;br /&gt;Line: " + lineNum + "&lt;br /&gt;column: " + column;
 document.getElementById("err").innerHTML = msg;
 editor.markText(
 {line: lineNum-1, ch: column},
 {line: lineNum-1, ch: column + 3},
 {css: "color: red"}
 );
 }
 }
&lt;/script&gt;</description></item></channel></rss>