<?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: Daisuke Mino</title>
    <description>The latest articles on DEV Community by Daisuke Mino (@minodisk).</description>
    <link>https://dev.to/minodisk</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%2F42106%2Fb2f24bef-561c-46b6-8f9d-dfd64f8f9f8b.jpg</url>
      <title>DEV Community: Daisuke Mino</title>
      <link>https://dev.to/minodisk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/minodisk"/>
    <language>en</language>
    <item>
      <title>BigQuery Runner for VSCode</title>
      <dc:creator>Daisuke Mino</dc:creator>
      <pubDate>Mon, 07 Mar 2022 10:17:35 +0000</pubDate>
      <link>https://dev.to/minodisk/bigquery-runner-for-vscode-3pia</link>
      <guid>https://dev.to/minodisk/bigquery-runner-for-vscode-3pia</guid>
      <description>&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Write a query, run it, and see the results on the fly in VSCode, much like BigQuery web UI.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=minodisk.bigquery-runner"&gt;BigQuery Runner - Visual Studio Marketplace&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Query Validation
&lt;/h3&gt;

&lt;p&gt;You can write queries while checking the queries you are writing for syntax errors, unrecognized field names, etc.&lt;br&gt;
Because the extension marks error locations on the editor file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VkesDT67--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kg70c149oybu3m2okxol.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VkesDT67--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kg70c149oybu3m2okxol.png" alt="Query Validation" width="812" height="406"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Query Costs
&lt;/h3&gt;

&lt;p&gt;You need not be overly concerned about how much data the query you are writing will scan and charge for.&lt;br&gt;
Because the extension will show you the amount of data that would be scanned and the amount of data actually scanned.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JFnTmDCj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gcq1xjzi2axi97xf2iu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JFnTmDCj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7gcq1xjzi2axi97xf2iu.png" alt="Query Costs" width="292" height="44"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Running Query
&lt;/h3&gt;

&lt;p&gt;You can query the file you have open directly into a BigQuery, or if you have selected text, you can query that text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/M842MF8jhgxNAl9L5M/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/M842MF8jhgxNAl9L5M/giphy.gif" alt="Running Query" width="480" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Format Results
&lt;/h3&gt;

&lt;p&gt;Output formats supported include aligned tables, CSV, JSON, and JSON Lines.&lt;/p&gt;

&lt;h3&gt;
  
  
  Output Results
&lt;/h3&gt;

&lt;p&gt;You can view the results of your query in a dedicated panel, in the output panel, or even output them to a file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_YKoGWt6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u55k22wbzwvyv754rh32.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_YKoGWt6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u55k22wbzwvyv754rh32.png" alt="Image description" width="880" height="580"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Command Based
&lt;/h3&gt;

&lt;p&gt;You can execute all operations from commands.&lt;br&gt;
Command support means that once you have set your key bindings, you can repeatedly try queries without taking your hands off the keyboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BeOr5KPj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qs090dskey15m6vonrgd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BeOr5KPj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qs090dskey15m6vonrgd.png" alt="Command Based" width="880" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>bigquery</category>
      <category>vscode</category>
      <category>gcp</category>
    </item>
    <item>
      <title>Rewrite Teensy with Docker</title>
      <dc:creator>Daisuke Mino</dc:creator>
      <pubDate>Tue, 21 Nov 2017 23:43:48 +0000</pubDate>
      <link>https://dev.to/minodisk/rewrite-teensy-with-docker-ai0</link>
      <guid>https://dev.to/minodisk/rewrite-teensy-with-docker-ai0</guid>
      <description>&lt;p&gt;Using dockerized &lt;a href="https://www.pjrc.com/teensy/loader_cli.html"&gt;Teensy Loader CLI&lt;/a&gt; makes it easier to rewrite programs to Teensy.&lt;br&gt;
&lt;a href="https://github.com/qmk/qmk_firmware"&gt;qmk/qmk_firmware&lt;/a&gt; is already dockerized. By using &lt;a href="https://hub.docker.com/r/minodisk/teensy_loader/"&gt;minodisk/teensy_loader&lt;/a&gt; together, all processes such as building &lt;code&gt;.hex&lt;/code&gt;, loading it into Teensy, and rebooting Teensy can be completed with Docker.&lt;/p&gt;
&lt;h2&gt;
  
  
  Motivation
&lt;/h2&gt;

&lt;p&gt;I do not want to install various things on my local machine.&lt;/p&gt;
&lt;h2&gt;
  
  
  Premise
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/qmk/qmk_firmware"&gt;qmk/qmk_firmware&lt;/a&gt; has been pulled&lt;/li&gt;
&lt;li&gt;Docker is already installed in your local machine&lt;/li&gt;
&lt;li&gt;In Linux (Docker for Mac or Win might be difficult or not be able to mount USB)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://asciinema.org/a/148756"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nmhDIS0J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://asciinema.org/a/148756.png" alt="asciicast"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to use
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Step 1. Prepare YAML for Docker Compose
&lt;/h3&gt;

&lt;p&gt;Add &lt;code&gt;qmk_firmware/docker-compose.yml&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;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;2'&lt;/span&gt;
&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;qmk_firmware&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;build&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;.&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;keyboard&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ergodox_ez&lt;/span&gt;
      &lt;span class="na"&gt;subproject&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;keymap&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;&amp;lt;Your Keymap Name&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;.:/qmk&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/qmk/.build&lt;/span&gt;
  &lt;span class="na"&gt;teensy_loader&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;minodisk/teensy_loader:0.0.1&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;qmk_firmware&lt;/span&gt;
    &lt;span class="na"&gt;privileged&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="no"&gt;true&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;hex&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ergodox_ez_&amp;lt;Your Keymap Name&amp;gt;&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/dev/bus/usb:/dev/bus/usb&lt;/span&gt;
    &lt;span class="na"&gt;volumes_from&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;qmk_firmware&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2. Build and up
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose build
docker-compose up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 3. Press reset button
&lt;/h3&gt;

&lt;p&gt;When the terminal outputs &lt;code&gt;Waiting for Teensy device...&lt;/code&gt;, press the reset button on Teensy.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to work
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;In &lt;code&gt;teensy_loader&lt;/code&gt; container, waits for the &lt;code&gt;.hex&lt;/code&gt; to be generated on the volume shared with the &lt;code&gt;qmk_firmaware&lt;/code&gt; container&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;qmk_firmware&lt;/code&gt; container, builds &lt;code&gt;.hex&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;teensy_loader&lt;/code&gt; container, finds &lt;code&gt;.hex&lt;/code&gt; on the volume shared with the &lt;code&gt;qmk_firmware&lt;/code&gt; container and runs &lt;code&gt;teensy_loader_cli&lt;/code&gt; with wait option&lt;/li&gt;
&lt;li&gt;In real world, you press reset button on Teensy (if it maps to a key, press that key)&lt;/li&gt;
&lt;li&gt;In &lt;code&gt;teensy_loader&lt;/code&gt; container, &lt;code&gt;teensy_loader_cli&lt;/code&gt; writes &lt;code&gt;.hex&lt;/code&gt; to Teensy and reboots it&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>docker</category>
      <category>teensy</category>
    </item>
    <item>
      <title>Automatically switch to insert mode when focusing on terminal window in Vim8</title>
      <dc:creator>Daisuke Mino</dc:creator>
      <pubDate>Tue, 21 Nov 2017 07:36:16 +0000</pubDate>
      <link>https://dev.to/minodisk/automatically-switch-to-insert-mode-when-focusing-on-terminal-window-in-vim8-9ab</link>
      <guid>https://dev.to/minodisk/automatically-switch-to-insert-mode-when-focusing-on-terminal-window-in-vim8-9ab</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight viml"&gt;&lt;code&gt;autocmd &lt;span class="nb"&gt;BufWinEnter&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nb"&gt;WinEnter&lt;/span&gt; * &lt;span class="k"&gt;if&lt;/span&gt; &amp;amp;&lt;span class="nb"&gt;buftype&lt;/span&gt; &lt;span class="p"&gt;==&lt;/span&gt; &lt;span class="s1"&gt;'terminal'&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="k"&gt;silent&lt;/span&gt;&lt;span class="p"&gt;!&lt;/span&gt; normal &lt;span class="k"&gt;i&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="k"&gt;endif&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;According to &lt;code&gt;:help Terminal-mode&lt;/code&gt;, &lt;code&gt;startinsert&lt;/code&gt; doesn't work on terminal window.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In Terminal-Normal mode you can move the cursor around with the usual Vim commands, Visually mark text, yank text, etc.  But you cannot change the contents of the buffer.  The commands that would start insert mode, such as 'i' and 'a', return to Terminal-Job mode.  The window will be updated to show the contents of the terminal. |:startinsert| is ineffective.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>vim</category>
    </item>
  </channel>
</rss>
