<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Murahashi [Matt] Kenichi</title>
    <description>The latest articles on DEV Community by Murahashi [Matt] Kenichi (@sanemat).</description>
    <link>https://dev.to/sanemat</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F46600%2F57894017-7a1c-406c-ba80-eda061b07d64.jpeg</url>
      <title>DEV Community: Murahashi [Matt] Kenichi</title>
      <link>https://dev.to/sanemat</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sanemat"/>
    <language>en</language>
    <item>
      <title>nbwipers: Setup and Troubleshooting</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Sat, 30 May 2026 00:43:13 +0000</pubDate>
      <link>https://dev.to/sanemat/nbwipers-setup-and-troubleshooting-2m33</link>
      <guid>https://dev.to/sanemat/nbwipers-setup-and-troubleshooting-2m33</guid>
      <description>&lt;h2&gt;
  
  
  What is nbwipers?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/felixgwilliams/nbwipers" rel="noopener noreferrer"&gt;nbwipers&lt;/a&gt; is a CLI tool that strips outputs and metadata from Jupyter notebooks before git commit.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Written in Rust - faster than &lt;code&gt;nbstripout&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Supports git clean filter&lt;/li&gt;
&lt;li&gt;Works with &lt;code&gt;.ipynb&lt;/code&gt; files&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why use it?
&lt;/h2&gt;

&lt;p&gt;Jupyter notebooks store cell outputs inside the &lt;code&gt;.ipynb&lt;/code&gt; file (JSON). This causes problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Noisy diffs&lt;/strong&gt; - output changes pollute every commit&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repo size&lt;/strong&gt; - images and large outputs bloat the repo&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security&lt;/strong&gt; - sensitive data can leak in outputs (API keys, query results)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The solution: strip outputs automatically on &lt;code&gt;git add&lt;/code&gt; via a clean filter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why not nbstripout?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;nbstripout&lt;/code&gt; is written in Python. It is slow - &lt;code&gt;git status&lt;/code&gt;, &lt;code&gt;git diff&lt;/code&gt;, and &lt;code&gt;git add&lt;/code&gt; all became noticeably slow on this repo because &lt;code&gt;nbstripout&lt;/code&gt; was invoked for every &lt;code&gt;.ipynb&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;The main cause is Python startup time. With 100+ notebooks, &lt;code&gt;nbstripout&lt;/code&gt; can take 40+ seconds where a Rust-based tool takes ~1 second.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Faster alternatives:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Language&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/deshaw/nbstripout-fast" rel="noopener noreferrer"&gt;nbstripout-fast&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;td&gt;Up to 200x faster; no git filter install support&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://github.com/felixgwilliams/nbwipers" rel="noopener noreferrer"&gt;nbwipers&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Rust&lt;/td&gt;
&lt;td&gt;Inspired by nbstripout-fast; adds git filter + pyproject.toml config&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;nbwipers&lt;/code&gt; is essentially &lt;code&gt;nbstripout-fast&lt;/code&gt; with better git integration. Switching to &lt;code&gt;nbwipers&lt;/code&gt; fixed the slowness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Install
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;felixgwilliams/nbwipers&lt;/code&gt; is now in the &lt;a href="https://github.com/aquaproj/aqua-registry" rel="noopener noreferrer"&gt;aqua registry&lt;/a&gt; as of &lt;a href="https://github.com/aquaproj/aqua-registry/pull/54329" rel="noopener noreferrer"&gt;v4.517.0&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Using &lt;a href="https://aquaproj.github.io/" rel="noopener noreferrer"&gt;aqua&lt;/a&gt;, add to &lt;code&gt;aqua.yaml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;packages&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;felixgwilliams/nbwipers@v0.6.2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aqua &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Configure git filter
&lt;/h3&gt;

&lt;p&gt;Run once per repo (writes to &lt;code&gt;.git/config&lt;/code&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config filter.nbwipers.clean &lt;span class="s2"&gt;"nbwipers clean -"&lt;/span&gt;
git config filter.nbwipers.smudge &lt;span class="nb"&gt;cat
&lt;/span&gt;git config filter.nbwipers.required &lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or edit &lt;code&gt;.git/config&lt;/code&gt; directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[filter "nbwipers"]&lt;/span&gt;
    &lt;span class="py"&gt;clean&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;nbwipers clean -&lt;/span&gt;
    &lt;span class="py"&gt;smudge&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;cat&lt;/span&gt;
    &lt;span class="py"&gt;required&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;required = true&lt;/code&gt; makes the commit fail if &lt;code&gt;nbwipers&lt;/code&gt; is not installed. This prevents accidentally committing outputs.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Add .gitattributes
&lt;/h3&gt;

&lt;p&gt;In the repo root, add &lt;code&gt;.gitattributes&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.ipynb filter=nbwipers
**/.ipynb_checkpoints/*.ipynb !filter
**/.virtual_documents/*.ipynb !filter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;!filter&lt;/code&gt; lines exclude checkpoint and virtual document files from filtering.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Verify
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git check-attr filter path/to/notebook.ipynb
&lt;span class="c"&gt;# Expected: filter: nbwipers&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Today's issue: nbwipers was not working
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Symptom
&lt;/h3&gt;

&lt;p&gt;Committed a notebook in &lt;code&gt;example2/&lt;/code&gt;. Outputs were not stripped.&lt;/p&gt;

&lt;h3&gt;
  
  
  Debug
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git check-attr filter example2/pipeline.ipynb
&lt;span class="c"&gt;# Output: example2/pipeline.ipynb: filter: nbstripout  ← wrong!&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The filter was &lt;code&gt;nbstripout&lt;/code&gt;, not &lt;code&gt;nbwipers&lt;/code&gt;, even though &lt;code&gt;.gitattributes&lt;/code&gt; says &lt;code&gt;nbwipers&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Root cause
&lt;/h3&gt;

&lt;p&gt;Found the culprit in &lt;code&gt;.git/info/attributes&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.ipynb filter=nbstripout
*.zpln filter=nbstripout
*.ipynb diff=ipynb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This file was written by &lt;code&gt;nbstripout --install&lt;/code&gt; in the past.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Git attribute priority (highest to lowest):&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;.git/info/attributes&lt;/code&gt; ← highest priority&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.gitattributes&lt;/code&gt; in the same directory as the file&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;.gitattributes&lt;/code&gt; in parent directories (up to repo root)&lt;/li&gt;
&lt;li&gt;Global &lt;code&gt;core.attributesfile&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because &lt;code&gt;.git/info/attributes&lt;/code&gt; has the highest priority, &lt;code&gt;nbstripout&lt;/code&gt; was winning over &lt;code&gt;nbwipers&lt;/code&gt; in &lt;code&gt;.gitattributes&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fix
&lt;/h3&gt;

&lt;p&gt;Remove the &lt;code&gt;nbstripout&lt;/code&gt; lines from &lt;code&gt;.git/info/attributes&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.ipynb filter=nbstripout
*.zpln filter=nbstripout
*.ipynb diff=ipynb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;After:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*.ipynb diff=ipynb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Verify fix
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git check-attr filter example2/pipeline.ipynb
&lt;span class="c"&gt;# Output: example2/pipeline.ipynb: filter: nbwipers  ← correct&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Key takeaway
&lt;/h2&gt;

&lt;p&gt;When switching from &lt;code&gt;nbstripout&lt;/code&gt; to &lt;code&gt;nbwipers&lt;/code&gt;, check &lt;code&gt;.git/info/attributes&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;nbstripout --install&lt;/code&gt; writes there, not to &lt;code&gt;.gitattributes&lt;/code&gt;.&lt;br&gt;
If both tools have entries, &lt;code&gt;.git/info/attributes&lt;/code&gt; always wins.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>git</category>
      <category>rust</category>
      <category>tooling</category>
    </item>
    <item>
      <title>json output from k6 on docker</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Tue, 13 Apr 2021 16:03:44 +0000</pubDate>
      <link>https://dev.to/sanemat/json-output-from-k6-on-docker-4ffk</link>
      <guid>https://dev.to/sanemat/json-output-from-k6-on-docker-4ffk</guid>
      <description>&lt;p&gt;You need to add &lt;code&gt;--user $UID&lt;/code&gt; with docker run.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run \
  -i \
  -v $(pwd):/ci/ \
  --user $UID \
  loadimpact/k6:latest \
  run \
  --out json=/ci/performance/full.json \
  --summary-export=/ci/performance/summary.json \
  /ci/packages/faas-penguin-local/performance-test.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And this is actual example:&lt;br&gt;
&lt;a href="https://github.com/sanemat/faas-penguin/blob/c31ab0c47feb9c26ed8b3297468568dfbf6f25cd/.circleci/config.yml" rel="noopener noreferrer"&gt;faas-penguin/config.yml at c31ab0c47feb9c26ed8b3297468568dfbf6f25cd · sanemat/faas-penguin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;refs:&lt;br&gt;
&lt;a href="https://community.k6.io/t/permission-denied-on-k6-docker-json-output/1581/3" rel="noopener noreferrer"&gt;Permission denied on k6 docker json output - k6 support - k6 community forum&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Apply rubocop one by one</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Mon, 12 Apr 2021 07:39:07 +0000</pubDate>
      <link>https://dev.to/sanemat/apply-rubocop-one-by-one-204l</link>
      <guid>https://dev.to/sanemat/apply-rubocop-one-by-one-204l</guid>
      <description>&lt;p&gt;Use rubocop_auto_corrector&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzpwnx9tewtwolur50lbo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzpwnx9tewtwolur50lbo.png" alt="Alt Text" width="800" height="728"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://sue445.hatenablog.com/entry/2020/07/07/235216" rel="noopener noreferrer"&gt;rubocop_auto_corrector v0.4.0をリリースした - くりにっき&lt;/a&gt;&lt;br&gt;
&lt;a href="https://rubygems.org/gems/rubocop_auto_corrector/" rel="noopener noreferrer"&gt;https://rubygems.org/gems/rubocop_auto_corrector/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Show npm/yarn current package version in repository on GitHub organization</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Mon, 12 Apr 2021 02:19:42 +0000</pubDate>
      <link>https://dev.to/sanemat/show-npm-yarn-current-package-version-in-repository-on-github-organization-nco</link>
      <guid>https://dev.to/sanemat/show-npm-yarn-current-package-version-in-repository-on-github-organization-nco</guid>
      <description>&lt;p&gt;&lt;a href="https://dev.to/sanemat/show-ruby-gem-version-in-repository-on-github-organization-1h7d"&gt;Show Ruby/Gem version in repository on GitHub organization - DEV Community 👩‍💻👨‍💻&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;yarn&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ for dir in */; do (cd $dir; git grep -n -A1 -E '^jquery@' yarn.lock 2&amp;gt;/dev/null|perl -ne 'print if s/  version "(.*?)"/$1/'| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;npm&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ for dir in */; do (cd $dir; git grep -n -A1 -E '"jquery"' package-lock.json 2&amp;gt;/dev/null|perl -ne 'print if s/"version": "(.*?)"/$1/'| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>8cc.wasi: Pure WASI C Compiler</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Sun, 07 Jun 2020 16:46:57 +0000</pubDate>
      <link>https://dev.to/sanemat/8cc-wasi-pure-wasi-c-compiler-4jnk</link>
      <guid>https://dev.to/sanemat/8cc-wasi-pure-wasi-c-compiler-4jnk</guid>
      <description>&lt;p&gt;&lt;a href="https://github.com/sanemat/8cc.wasi" rel="noopener noreferrer"&gt;8cc.wasi&lt;/a&gt; is a Pure WebAssembly System Interface (WASI) C Compiler.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compile C Code
&lt;/h2&gt;

&lt;p&gt;Prepare your C code. Following is a 'Hello world' example.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;putchar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;char&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Hello, world!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(;&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;putchar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;8cc.wasi compiles C code into ELVM IR (EIR).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat hello.c | wasmtime 8cc.c.eir.wasi &amp;gt; hello.eir
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat hello.eir
    .text
main:
    #{push:main}
    mov D, SP
    add D, -1
    store BP, D
    mov SP, D
    mov BP, SP
    sub SP, 1
(snip)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;elc.wasi compiles EIR into WASI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ (echo "wasi" &amp;amp;&amp;amp; cat hello.eir) | wasmtime elc.c.eir.wasi &amp;gt; hello.wasi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat hello.wasi
(module
 (import "wasi_unstable" "fd_write" (func $__wasi_fd_write (param i32 i32 i32 i32) (result i32)))
 (import "wasi_unstable" "fd_read" (func $__wasi_fd_read (param i32 i32 i32 i32) (result i32)))
 (import "wasi_unstable" "proc_exit" (func $__wasi_proc_exit (param i32)))
 (memory (export "memory") 1025)
 (global $a (mut i32) (i32.const 0))
 (global $b (mut i32) (i32.const 0))
(snip)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run hello.wasi and get a result!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ wasmtime hello.wasi 
Hello, world!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Refs
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/shinh/elvm/commit/9a563b8889e5710f78de1d4351343a755ef9b44c" rel="noopener noreferrer"&gt;backend code for wasi&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webassembly</category>
      <category>wasi</category>
      <category>elvm</category>
    </item>
    <item>
      <title>mp4 to gif</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Tue, 21 Apr 2020 04:43:50 +0000</pubDate>
      <link>https://dev.to/sanemat/mp4-to-gif-hm</link>
      <guid>https://dev.to/sanemat/mp4-to-gif-hm</guid>
      <description>&lt;p&gt;I converted mp4 file to animation gif.&lt;br&gt;
ffmpeg is better than imagemagick on my purpose.&lt;/p&gt;

&lt;p&gt;At first I tried &lt;code&gt;convert&lt;/code&gt; command (imagemagick). It took 5 minutes and more, 100x file size, and it didn't finish!&lt;br&gt;
&lt;code&gt;convert from.mp4 to.gif&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;mp4 size is 5MB, 30 seconds.&lt;/p&gt;

&lt;p&gt;Next I try ffmpeg. It took 10 seconds. It's enough for me.&lt;br&gt;
&lt;code&gt;ffmpeg -i from.mp4 to.gif&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://askubuntu.com/questions/648603/how-to-create-an-animated-gif-from-mp4-video-via-command-line" rel="noopener noreferrer"&gt;https://askubuntu.com/questions/648603/how-to-create-an-animated-gif-from-mp4-video-via-command-line&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mp4</category>
      <category>gif</category>
    </item>
    <item>
      <title>Local HTTP Server</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Fri, 07 Feb 2020 06:10:58 +0000</pubDate>
      <link>https://dev.to/sanemat/local-http-server-ejg</link>
      <guid>https://dev.to/sanemat/local-http-server-ejg</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx http-server -a localhost
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://medium.com/sweetmeat/simple-one-line-local-http-servers-8adb57d93ec3" rel="noopener noreferrer"&gt;Simple One-Line Local HTTP Servers - sweetmeat - Medium &lt;/a&gt;&lt;/p&gt;

</description>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Show Ruby/Gem version in repository on GitHub organization</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Tue, 10 Dec 2019 09:04:41 +0000</pubDate>
      <link>https://dev.to/sanemat/show-ruby-gem-version-in-repository-on-github-organization-1h7d</link>
      <guid>https://dev.to/sanemat/show-ruby-gem-version-in-repository-on-github-organization-1h7d</guid>
      <description>&lt;h1&gt;
  
  
  TL;DR
&lt;/h1&gt;

&lt;p&gt;Clone repositories and check them on your local machine.&lt;/p&gt;

&lt;p&gt;shallow clone into ~/tmp/packsaddle20191210&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir -p ~/tmp/packsaddle20191210
cd ~/tmp/packsaddle20191210
github-repos -org packsaddle -z | xargs -0 -P4 -I {} git clone {} --depth 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/sanemat/go-githubrepos" rel="noopener noreferrer"&gt;https://github.com/sanemat/go-githubrepos&lt;/a&gt;&lt;br&gt;
&lt;a href="https://dev.to/sanemat/git-clone-repositories-in-a-github-organization-gh8"&gt;Git clone repositories in a GitHub organization&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;check Ruby version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for dir in */; do (cd $dir; git grep -n -E "^[ ]{3}ruby 2" -- Gemfile.lock| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
// or
for dir in */; do (cd $dir; grep -nH -E "^[ ]{3}ruby 2.*$" -- Gemfile.lock| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;check gem version, e.g. rails&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for dir in */; do (cd $dir; git grep -n -E "^[ ]{4}rails " -- Gemfile.lock| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
// or
for dir in */; do (cd $dir; grep -nH -E "^[ ]{4}rails .*$" -- Gemfile.lock| tr -s '\n' '\0' | xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ruby-cron_for_github-app/Gemfile.lock:14:    rake (0.9.2.2)
ruby-saddler/Gemfile.lock:24:    rake (13.0.1)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>github</category>
      <category>audit</category>
      <category>dependencies</category>
      <category>ruby</category>
    </item>
    <item>
      <title>go install from tools.go on cross-platform</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Mon, 09 Dec 2019 15:35:04 +0000</pubDate>
      <link>https://dev.to/sanemat/go-install-with-tools-go-by-go-mod-on-cross-platform-1in6</link>
      <guid>https://dev.to/sanemat/go-install-with-tools-go-by-go-mod-on-cross-platform-1in6</guid>
      <description>&lt;h1&gt;
  
  
  TL;DR
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;go &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  github.com/sanemat/go-importlist/cmd/import-list &lt;span class="se"&gt;\&lt;/span&gt;
  github.com/sanemat/go-xgoinstall/cmd/x-go-install
import-list &lt;span class="nt"&gt;-z&lt;/span&gt; tools.go | x-go-install &lt;span class="nt"&gt;-0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sometimes I want to track and use tool dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="c"&gt;// +build tools&lt;/span&gt;

&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;tools&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="s"&gt;"github.com/sanemat/go-importlist/cmd/import-list"&lt;/span&gt;
    &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="s"&gt;"github.com/sanemat/go-xgoinstall/cmd/x-go-install"&lt;/span&gt;
    &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="s"&gt;"golang.org/x/lint/golint"&lt;/span&gt;
    &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="s"&gt;"golang.org/x/tools/cmd/goimports"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module" rel="noopener noreferrer"&gt;How can I track tool dependencies for a module?&lt;/a&gt;&lt;br&gt;
&lt;a href="https://marcofranssen.nl/manage-go-tools-via-go-modules/" rel="noopener noreferrer"&gt;Manage Go tools via Go modules | Marco Franssen&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Recommended way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;tools.go | &lt;span class="nb"&gt;grep &lt;/span&gt;_ | &lt;span class="nb"&gt;awk&lt;/span&gt; &lt;span class="nt"&gt;-F&lt;/span&gt;&lt;span class="s1"&gt;'"'&lt;/span&gt; &lt;span class="s1"&gt;'{print $2}'&lt;/span&gt; | xargs &lt;span class="nt"&gt;-tI&lt;/span&gt; % go &lt;span class="nb"&gt;install&lt;/span&gt; %
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But I want to use it on cross-platform, ubuntu, mac, and windows.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;import-list tools.go
github.com/sanemat/go-importlist/cmd/import-list
github.com/sanemat/go-xgoinstall/cmd/x-go-install
golang.org/x/lint/golint
golang.org/x/tools/cmd/goimports
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then go install all dependencies.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;import-list tools.go | x-go-install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Split by NULL is more secure 😉&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;import-list &lt;span class="nt"&gt;-z&lt;/span&gt; tools.go | x-go-install &lt;span class="nt"&gt;-0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://github.com/sanemat/go-importlist" rel="noopener noreferrer"&gt;https://github.com/sanemat/go-importlist&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/sanemat/go-xgoinstall" rel="noopener noreferrer"&gt;https://github.com/sanemat/go-xgoinstall&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>cli</category>
    </item>
    <item>
      <title>git grep in subdirectories</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Sat, 07 Dec 2019 18:33:15 +0000</pubDate>
      <link>https://dev.to/sanemat/git-grep-in-subdirectories-1b0j</link>
      <guid>https://dev.to/sanemat/git-grep-in-subdirectories-1b0j</guid>
      <description>&lt;p&gt;git grep in subdirectories, then show the result of git grep + base directory name. &lt;/p&gt;

&lt;p&gt;for mac:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;for dir in */; do (cd $dir; git grep -n Gemfile| tr -s '\n' '\0'|xargs -0 -I {} printf "$(basename $(pwd))/{}\n") done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(snip)
ruby-saddler-reporter-text/.gitignore:3:/Gemfile.lock
ruby-saddler-reporter-text/README.md:59:Add this line to your application's Gemfile:
ruby-saddler-reporter-text/bin/console:9:# (If you use this, don't forget to add pry to your Gemfile!)
ruby-saddler-reporter-text/example/Gemfile:1:# A sample Gemfile
ruby-text_to_checkstyle/.gitignore:3:/Gemfile.lock
ruby-text_to_checkstyle/README.md:47:Add this line to your application's Gemfile:
ruby-text_to_checkstyle/bin/console:9:# (If you use this, don't forget to add pry to your Gemfile!)
ruby-uri-ssh_git/.gitignore:3:/Gemfile.lock
ruby-uri-ssh_git/README.md:65:Add this line to your application's Gemfile:
ruby-uri-ssh_git/bin/console:9:# (If you use this, don't forget to add pry to your Gemfile!)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>zsh</category>
      <category>xargs</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Git clone repositories in a GitHub organization</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Tue, 03 Dec 2019 17:15:10 +0000</pubDate>
      <link>https://dev.to/sanemat/git-clone-repositories-in-a-github-organization-gh8</link>
      <guid>https://dev.to/sanemat/git-clone-repositories-in-a-github-organization-gh8</guid>
      <description>&lt;h1&gt;
  
  
  github-repos
&lt;/h1&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Show git clone url in GitHub organization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;github-repos -search "org:packsaddle archived:false" -z | xargs -0 -P4 -I {} git clone {} --depth 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;required: &lt;code&gt;GITHUB_TOKEN=__YOUR_PERSONAL_TOKEN__&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;There are several ways for cloning GitHub repositories in an organization.&lt;br&gt;
&lt;a href="https://medium.com/@kevinsimper/how-to-clone-all-repositories-in-a-github-organization-8ccc6c4bd9df" rel="noopener noreferrer"&gt;How to clone all repositories in a Github Organization&lt;/a&gt;&lt;br&gt;
&lt;a href="https://blog.scottlowe.org/2018/07/19/cloning-all-repositories-in-a-github-organization/" rel="noopener noreferrer"&gt;Cloning All Repositories in a GitHub Organization - Scott's Weblog - The weblog of an IT pro focusing on cloud computing, Kubernetes, Linux, containers, and networking&lt;/a&gt;&lt;br&gt;
&lt;a href="https://gist.github.com/caniszczyk/3856584" rel="noopener noreferrer"&gt;Clone all repos from a GitHub organization&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But I don't want to see my personal token for GitHub. And I want to handle pagination because my organization has over 400 repos 😅&lt;/p&gt;

&lt;p&gt;I tried &lt;a href="https://github.com/caarlos0/clone-org" rel="noopener noreferrer"&gt;caarlos0/clone-org&lt;/a&gt;, but sometimes I got errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Repo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/sanemat/go-githubrepos" rel="noopener noreferrer"&gt;https://github.com/sanemat/go-githubrepos&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ghg
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;ghg get sanemat/go-githubrepos&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  go get
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;go get https://github.com/sanemat/go-githubrepos/cmd/github-repos&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Updated: 2020-10-31&lt;/p&gt;

</description>
      <category>github</category>
      <category>go</category>
    </item>
    <item>
      <title>Feelings about GopherCon VietNam 2019</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Mon, 04 Nov 2019 04:15:39 +0000</pubDate>
      <link>https://dev.to/sanemat/feelings-about-gophercon-vietnam-2019-20g8</link>
      <guid>https://dev.to/sanemat/feelings-about-gophercon-vietnam-2019-20g8</guid>
      <description>&lt;h1&gt;
  
  
  GopherCon VietNam 2019
&lt;/h1&gt;

&lt;p&gt;2019-11-02&lt;br&gt;
Capella Gallery Hall&lt;/p&gt;

&lt;p&gt;The most interesting topic for me is "CloudRetro." Thanks speakers!&lt;/p&gt;

&lt;p&gt;I'm very surprised. In Gopher con VietNam, most of the speakers have presentations in English. Most of the questions and answers are also in English. I can understand easily because the speakers talk in English. Awesome! But the reaction of attendees is better the speaker in Vietnamese 😅 &lt;/p&gt;

&lt;p&gt;People in the booth ask something to me, but Vietnamese is difficult 😓 &lt;br&gt;
A few attendees use their laptops. There are desks only the front row.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tanuki
&lt;/h2&gt;

&lt;p&gt;Tanuki is one solution for dependency hell. &lt;a href="https://github.com/sausheong/tanuki" rel="noopener noreferrer"&gt;https://github.com/sausheong/tanuki&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my understanding, the speaker wants to talk about "the Unix philosophy." &lt;br&gt;
But this approach seems each handler has dependencies. This means each handler has its own dependency hell. This is still thought experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  SRE
&lt;/h2&gt;

&lt;p&gt;The fundamental introduction of SRE: &lt;a href="https://landing.google.com/sre/" rel="noopener noreferrer"&gt;Google - Site Reliability Engineering&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to understand "error budgets" more.&lt;br&gt;
5 key principles for SRE&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Metrics &amp;amp; Monitoring&lt;/li&gt;
&lt;li&gt;Capacity planning&lt;/li&gt;
&lt;li&gt;change management&lt;/li&gt;
&lt;li&gt;Emergency response&lt;/li&gt;
&lt;li&gt;Culture&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Start with Service Level Objectives&lt;br&gt;
SLO and/or error budget&lt;/p&gt;

&lt;h2&gt;
  
  
  CloudRetro
&lt;/h2&gt;

&lt;p&gt;This topic is crazy 😍 &lt;br&gt;
&lt;a href="https://github.com/giongto35/cloud-game/wiki/FAQ" rel="noopener noreferrer"&gt;https://github.com/giongto35/cloud-game/wiki/FAQ&lt;/a&gt;&lt;br&gt;
We can play a video game on the cloud server via a web browser, and the server encodes video and audio, then we can see this video. We can share the game state by permanent link.&lt;/p&gt;

&lt;p&gt;Open-source Cloud Gaming Service For Retro Games&lt;br&gt;
Video demo: &lt;a href="https://www.youtube.com/watch?v=GUBrJGAxZZg" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=GUBrJGAxZZg&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/giongto35/cloud-game" rel="noopener noreferrer"&gt;giongto35/cloud-game Web-based Cloud Gaming service with Retro Game&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>conference</category>
    </item>
  </channel>
</rss>
