<?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>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>
    <item>
      <title>Split audio file and fade out by ffmpeg</title>
      <dc:creator>Murahashi [Matt] Kenichi</dc:creator>
      <pubDate>Sun, 01 Sep 2019 01:16:09 +0000</pubDate>
      <link>https://dev.to/sanemat/split-audio-file-and-fade-out-by-ffmpeg-cgg</link>
      <guid>https://dev.to/sanemat/split-audio-file-and-fade-out-by-ffmpeg-cgg</guid>
      <description>&lt;p&gt;Use first 60 seconds. Fade out from 57 seconds per 3 seconds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ffmpeg -i source.mp3 -af "afade=t=out:st=57:d=3" -to 60 result.mp3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://zariganitosh.hatenablog.jp/entry/20150619/understand_ffmpeg" rel="noopener noreferrer"&gt;なるべく理解したいffmpeg - ザリガニが見ていた...。&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>todayilearned</category>
      <category>ffmpeg</category>
    </item>
  </channel>
</rss>
