<?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: Ko Takagi</title>
    <description>The latest articles on DEV Community by Ko Takagi (@ko31).</description>
    <link>https://dev.to/ko31</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%2F43017%2F8f272011-29a5-4e93-b26a-95260e3fdb5e.jpeg</url>
      <title>DEV Community: Ko Takagi</title>
      <link>https://dev.to/ko31</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ko31"/>
    <language>en</language>
    <item>
      <title>How to convert DVD to mp4 with ffmpeg</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Sat, 17 Apr 2021 12:43:56 +0000</pubDate>
      <link>https://dev.to/ko31/how-to-convert-dvd-to-mov-with-ffmpeg-fli</link>
      <guid>https://dev.to/ko31/how-to-convert-dvd-to-mov-with-ffmpeg-fli</guid>
      <description>&lt;p&gt;I'll write it down how to convert DVD to mov with ffmpeg as a reminder.✍️&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install ffmpeg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;Browse for the DVD files in the Finder and get the .vob file name you want to convert.&lt;/p&gt;

&lt;p&gt;For example, if you want to convert a file named &lt;code&gt;VTS_01_1.VOB&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;ffmpeg -i VTS_01_1.VOB -b:v 1500k -r 30 -vcodec h264 -strict -2 -acodec aac -ar 44100 -f mp4 convert.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For example, you want to combine and convert the files &lt;code&gt;VTS_01_1.VOB&lt;/code&gt;, &lt;code&gt;VTS_01_1.VOB&lt;/code&gt;, and &lt;code&gt;VTS_01_1.VOB&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;ffmpeg -i "concat:VTS_01_1.VOB|VTS_01_2.VOB|VTS_01_3.VOB" -b:v 1500k -r 30 -vcodec h264 -strict -2 -acodec aac -ar 44100 -f mp4 convert.mp4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great!👍&lt;/p&gt;

</description>
      <category>ffmpeg</category>
    </item>
    <item>
      <title>My first review of a standing desk🧍🖥️</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Thu, 24 Dec 2020 15:55:03 +0000</pubDate>
      <link>https://dev.to/ko31/my-first-review-of-a-standing-desk-4a22</link>
      <guid>https://dev.to/ko31/my-first-review-of-a-standing-desk-4a22</guid>
      <description>&lt;p&gt;It's been over 6 months since I first started working with a standing desk.&lt;/p&gt;

&lt;p&gt;Here is a review of what I thought.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I started using it 🤔
&lt;/h2&gt;

&lt;p&gt;I've been working from home every day since the coronavirus happend, and my back has been gradually hurting because of all the sitting I do.&lt;/p&gt;

&lt;p&gt;I read a book called "&lt;a href="https://www.oreilly.com/library/view/the-healthy-programmer/9781941222553/"&gt;The Healthy Programmer&lt;/a&gt;", which says that sitting all the time is not good for the human body.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ChlAKXYV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3qg049ayefq0kyqikkbn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ChlAKXYV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/3qg049ayefq0kyqikkbn.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, I decided to try to use a standing desk.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I bought it 🛒
&lt;/h2&gt;

&lt;p&gt;I bought the following.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.amazon.co.jp/-/en/SD315001WB-Standing-Adjustable-Elevating-Keyboard/dp/B07Z7THY5S"&gt;Fenge SD315001WB Standing Desk&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a desk top type, so I can use the same desk I've been using.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tnv84cck--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ytxa0qtly68030awtoru.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tnv84cck--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ytxa0qtly68030awtoru.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The height of the desk can be raised and lowered by the gas pressure method. It is easy to operate as all you have to do is raise the lever on the side.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ti94nTxm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tw7u7w9tmlayawnp13pe.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ti94nTxm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tw7u7w9tmlayawnp13pe.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a view of the laptop (Macbook Pro 13inch), display (P2720DC), keyboard and mouse in place. It's pretty crowded, but it's stable and there's no problem to use it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Iybaf2Nz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9wadciiyy9hx9hm9124h.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Iybaf2Nz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9wadciiyy9hx9hm9124h.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is a shot of me working in the environment. It's quite good.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uhim4b8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fo6s84dqkjferxm9v54j.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uhim4b8J--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fo6s84dqkjferxm9v54j.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My impressions 💭
&lt;/h2&gt;

&lt;p&gt;Here are some of the good and bad points I have found in using it so far.&lt;/p&gt;

&lt;h3&gt;
  
  
  Good for a change of pace 🙆
&lt;/h3&gt;

&lt;p&gt;When I get bored or sleepy, I can instantly switch to the standing position.&lt;/p&gt;

&lt;p&gt;It's good for a change of pace.&lt;/p&gt;

&lt;h3&gt;
  
  
  My back pain has decreased 😀
&lt;/h3&gt;

&lt;p&gt;I noticed that my back pain has been decreasing.&lt;/p&gt;

&lt;p&gt;I don't have any evidence, but maybe I spent less time sitting, which reduced the strain on my back.&lt;/p&gt;

&lt;h3&gt;
  
  
  My legs become painful 😓
&lt;/h3&gt;

&lt;p&gt;If I work standing for a long time, my feet will become very sore.&lt;/p&gt;

&lt;p&gt;I need to try not to use it for too long, or utilize the goods described below to reduce the burden on my legs.&lt;/p&gt;

&lt;h3&gt;
  
  
  It's pretty tiring 💦
&lt;/h3&gt;

&lt;p&gt;I'm just standing there, but I'm more tired than I thought I would be.&lt;/p&gt;

&lt;p&gt;When I do standing work for many hours a day, my body gets wrapped up in fatigue in the evening and I fall asleep early at night.&lt;/p&gt;

&lt;p&gt;I think that might be enough exercise for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Items I use with the standing desk ⚙️
&lt;/h2&gt;

&lt;h3&gt;
  
  
  slippers 👟
&lt;/h3&gt;

&lt;p&gt;I bought a pair of slippers with a cushion. This may have the effect of reducing the strain on my feet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZMrjiesA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7arjm1dtab05kg5m23i8.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZMrjiesA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/7arjm1dtab05kg5m23i8.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  balance board 🟤
&lt;/h3&gt;

&lt;p&gt;I bought this balance board from Amazon.&lt;/p&gt;

&lt;p&gt;I feel that my body balance and posture will improve when I work while riding the balance board. It is very tiring though, so I use it sometimes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dV_OfRZw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gemnio4qv5prb51ciy2a.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dV_OfRZw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/gemnio4qv5prb51ciy2a.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  massage ball 🎾
&lt;/h3&gt;

&lt;p&gt;I have been loving these massage balls lately.&lt;/p&gt;

&lt;p&gt;I put this on the floor and roll it around on the soles of my feet as I work. It feels really good and makes my feet feel better than just standing there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8tQyU-Q0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/13t5apu560bnppko38cz.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8tQyU-Q0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/13t5apu560bnppko38cz.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The end 🏁
&lt;/h2&gt;

&lt;p&gt;This is cost effective and I think I made a good purchase👍&lt;/p&gt;

&lt;p&gt;In the future, I would like to measure the effects of standing discs on the body. I'm not sure the specifics of how to do that, so if you have any good ideas, please let me know😅&lt;/p&gt;

</description>
      <category>health</category>
      <category>remote</category>
      <category>lifestyle</category>
      <category>tips</category>
    </item>
    <item>
      <title>How to print a WooCommerce order with a kitchen receipt printer</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Fri, 16 Oct 2020 13:58:53 +0000</pubDate>
      <link>https://dev.to/ko31/how-to-print-a-woocommerce-order-with-a-kitchen-receipt-printer-427e</link>
      <guid>https://dev.to/ko31/how-to-print-a-woocommerce-order-with-a-kitchen-receipt-printer-427e</guid>
      <description>&lt;p&gt;I printed the orders I received on WooCommerce to the kitchen receipt printer.&lt;/p&gt;

&lt;p&gt;The environment I used is as follows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;H/W

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.star-m.jp/products/s_print/mcprint/sp01_13.html"&gt;mC-Print3 MCP31LB BK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;S/W

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ja.wordpress.org/plugins/woocommerce/"&gt;WooCommerce&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wordpress.org/plugins/star-cloudprnt-for-woocommerce/"&gt;Star CloudPRNT for WooCommerce&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;View your WordPress site with WooCommerce installed.&lt;/p&gt;

&lt;p&gt;Install and activate &lt;a href="https://wordpress.org/plugins/star-cloudprnt-for-woocommerce/"&gt;Star CloudPRNT for WooCommerce&lt;/a&gt; from the WordPress admin screen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vX5MgpYC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pii6kbv5troyknuj0ktq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vX5MgpYC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/pii6kbv5troyknuj0ktq.jpg" alt="star-cloudprnt-for-woocommerce"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open [Settings] &amp;gt; [Star CloudPRNT for WooCommerce Settings], and copy [Server URL].&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8xDfjAUH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/87fi0aj7htvrqi5mw2h0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8xDfjAUH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/87fi0aj7htvrqi5mw2h0.jpg" alt="Star CloudPRNT for WooCommerce Settings"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open the printer settings screen of mC-Print3. Then, go to the [CloudPRNT] setting screen and enter the [CloudPRNT Service], [Server URL] and [Polling time] fields.&lt;/p&gt;

&lt;p&gt;By the way, paste the URL copied by WordPress into the [Server URL] field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---IC6hLWy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lnbu9ux1q58uticbb8iw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---IC6hLWy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lnbu9ux1q58uticbb8iw.jpg" alt="CloudPRNT"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back to WordPress admin screen, then open [Star CloudPRNT for WooCommerce Settings]. &lt;/p&gt;

&lt;p&gt;Once you select &lt;code&gt;ENABLE&lt;/code&gt; for field [CloudPRNT] and select your printer for field [Selected Printer], save it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eUAtsSyy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w7gdg2eu9dqzfzh2ce1w.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eUAtsSyy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w7gdg2eu9dqzfzh2ce1w.jpg" alt="Printer"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you are ready to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try
&lt;/h2&gt;

&lt;p&gt;Let's try it out and order something from WooCommerce.&lt;/p&gt;

&lt;p&gt;The receipt should be printed from the printer as shown in the following video.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/lxeWROTCyhk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Have fun!👍&lt;/p&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;p&gt;In the demo in the video above, I wanted to change the text to be printed to another language, so I created an alternative plugin.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/ko31/star-cloudprnt-for-woocommerce-plus"&gt;ko31/star-cloudprnt-for-woocommerce-plus: This is a plugin that extends Star CloudPRNT for WooCommerce&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to do what I did, try this plugin instead of Star CloudPRNT for WooCommerce.&lt;/p&gt;

</description>
      <category>woocommerce</category>
      <category>wordpress</category>
    </item>
    <item>
      <title>Setup PHP development environment width LDAP</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Sun, 04 Oct 2020 08:07:21 +0000</pubDate>
      <link>https://dev.to/ko31/setup-php-development-environment-width-ldap-1311</link>
      <guid>https://dev.to/ko31/setup-php-development-environment-width-ldap-1311</guid>
      <description>&lt;p&gt;I have created a system to authenticate LDAP from PHP before.&lt;/p&gt;

&lt;p&gt;At that time, I created a development environment with Docker, so I'll make a note of how to set it up.&lt;/p&gt;

&lt;p&gt;The environment I used is as follows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;macOS Catalina 10.15.5&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/"&gt;Git&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hub.docker.com/editions/community/docker-ce-desktop-mac/"&gt;Docker Desktop for Mac&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;open a terminal and clone &lt;a href="https://github.com/ko31/lamp-ldap-dev-docker"&gt;LAMP+OpenLDAP Dev Docker&lt;/a&gt; repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/ko31/lamp-dev-docker.git &amp;lt;your-project-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create and start containers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;my-project-name&amp;gt;
docker-compose up -d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, you can access your local website at &lt;a href="http://localhost:8000"&gt;http://localhost:8000&lt;/a&gt;&lt;br&gt;
(The document root is the &lt;code&gt;&amp;lt;your-project-name&amp;gt;/www/html&lt;/code&gt; directory.)&lt;/p&gt;
&lt;h2&gt;
  
  
  Try connecting to LDAP from PHP
&lt;/h2&gt;

&lt;p&gt;To begin, make sure you have users connecting to your LDAP server.&lt;/p&gt;

&lt;p&gt;Open phpLDAPadmin at &lt;a href="http://localhost:8888"&gt;http://localhost:8888&lt;/a&gt; and click &lt;code&gt;login&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SyAI3Tnw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u97sumtnebz8ppy2rurn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SyAI3Tnw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/u97sumtnebz8ppy2rurn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this container, the Login DN is &lt;code&gt;cn=admin,dc=example,dc=com&lt;/code&gt; and the Password is &lt;code&gt;password&lt;/code&gt; by default. Input it and click &lt;code&gt;authenticate&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PHNZtuB---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r9rzlhzkyk0yft916cdb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PHNZtuB---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/r9rzlhzkyk0yft916cdb.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can see that you were able to logged as an &lt;code&gt;admin&lt;/code&gt; user.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oxSUoQvY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qv3qg29r3mwbmty3e1fz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oxSUoQvY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qv3qg29r3mwbmty3e1fz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create &lt;code&gt;&amp;lt;your-project-name&amp;gt;/www/html/connect.php&lt;/code&gt; and put the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;?php
// LDAP settings
const LDAP_HOST = "ldap-host";
const LDAP_PORT = 389;
const LDAP_DC = "dc=example,dc=com";
const LDAP_CN = "admin";
const LDAP_PASS = "password";

// Connect LDAP server.
$ldap_conn = ldap_connect(LDAP_HOST, LDAP_PORT);
if (!$ldap_conn) {
    exit('Could not connect to LDAP server.');
}

// Switch protocol to LDAPv3.
ldap_set_option($ldap_conn, LDAP_OPT_PROTOCOL_VERSION, 3);
ldap_set_option($ldap_conn, LDAP_OPT_REFERRALS, 0);

// Bind to LDAP directory.
$ldap_dn = 'cn=' . LDAP_CN . ',' . LDAP_DC;
$ldap_bind = ldap_bind($ldap_conn, $ldap_dn ,LDAP_PASS);
if ($ldap_bind) {
    exit('LDAP bind successful..');
} else {
    exit('LDAP bind failed.');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can confirm a successful connection at &lt;a href="http://localhost:8000/connect.php"&gt;http://localhost:8000/connect.php&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RTCt7VCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9apfwn6hsmo259qboguf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RTCt7VCr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9apfwn6hsmo259qboguf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have fun!👍&lt;/p&gt;

</description>
      <category>php</category>
      <category>ldap</category>
    </item>
    <item>
      <title>How to setup Golang with VSCode</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Mon, 21 Sep 2020 07:08:10 +0000</pubDate>
      <link>https://dev.to/ko31/how-to-setup-golang-with-vscode-1i4i</link>
      <guid>https://dev.to/ko31/how-to-setup-golang-with-vscode-1i4i</guid>
      <description>&lt;p&gt;I have used Golang some years ago, but unfortunately I hadn't tried to do it in a long time and had forgotten all about it....&lt;/p&gt;

&lt;p&gt;So I set it up from the beginning with a fresh mind.😊&lt;/p&gt;

&lt;p&gt;The environment I used is as follows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;macOS Catalina 10.15.5&lt;/li&gt;
&lt;li&gt;Visual Studio Code 1.46.1&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installing Go
&lt;/h2&gt;

&lt;p&gt;Download and install Go from the following link.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://golang.org/dl/" rel="noopener noreferrer"&gt;Downloads - The Go Programming Language&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fto2q6344cjugd9jkyhzc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fto2q6344cjugd9jkyhzc.png" alt="Go"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the installation, open a terminal and check the version using the following command.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ go version
go version go1.15.2 darwin/amd64


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

&lt;/div&gt;

&lt;p&gt;Create directory for GOPATH setting.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ mkdir ~/go


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

&lt;/div&gt;

&lt;p&gt;For GOPATH envirionment variable, add the following lines to the &lt;code&gt;~/.bash_profile&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH 


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

&lt;/div&gt;
&lt;h2&gt;
  
  
  Installing Visual Studio Code
&lt;/h2&gt;

&lt;p&gt;Download and install VSCode from the following link.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/Download" rel="noopener noreferrer"&gt;Download Visual Studio Code - Mac, Linux, Windows&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After the installation, Launch VSCode.&lt;/p&gt;

&lt;p&gt;Open the Extensions Marketplace (&lt;code&gt;Cmd+Shift+X&lt;/code&gt;), search &lt;code&gt;Go&lt;/code&gt; and install it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9t69ovan4mxgkabygdgz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9t69ovan4mxgkabygdgz.png" alt="Go extension"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;open the Command Palette (&lt;code&gt;Cmd+Shift+P&lt;/code&gt;) and run the &lt;code&gt;Go: Install/Update Tools&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx451msl1u4gxqxfsw20b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fx451msl1u4gxqxfsw20b.png" alt="Go extensions"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Install all the Go extensions listed there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwtlz4iv9m3ow3nm00sh0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwtlz4iv9m3ow3nm00sh0.png" alt="Go extensions"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Start coding
&lt;/h2&gt;

&lt;p&gt;Create &lt;code&gt;hello.go&lt;/code&gt; in VSCode.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

package main

import "fmt"

func main() {
    fmt.Println("Hello, world!")
}


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

&lt;/div&gt;

&lt;p&gt;By default, auto-completion and formatting for code saving are enabled. That's great.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1x993gm4bgyfjigthcle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1x993gm4bgyfjigthcle.png" alt="auto-completion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open a terminal (&lt;code&gt;Ctrl+`&lt;/code&gt;) and execute the following command.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ go run hello.go 
Hello, world!


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

&lt;/div&gt;

&lt;p&gt;Have fun!👍&lt;/p&gt;

</description>
      <category>go</category>
      <category>vscode</category>
    </item>
    <item>
      <title>How to bulk delete huge post data in WordPress</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Fri, 14 Aug 2020 02:03:26 +0000</pubDate>
      <link>https://dev.to/ko31/how-to-bulk-delete-huge-post-data-in-wordpress-16e8</link>
      <guid>https://dev.to/ko31/how-to-bulk-delete-huge-post-data-in-wordpress-16e8</guid>
      <description>&lt;p&gt;That's a lot of work, deleting hundreds of thousands of huge post data.&lt;/p&gt;

&lt;p&gt;Let's use the &lt;a href="https://wp-cli.org/"&gt;WP-CLI&lt;/a&gt; command to delete all those data at once.&lt;/p&gt;

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

&lt;p&gt;Bulk delete all post data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wp post delete $(wp post list --post_type='post' --format=ids) --force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to delete data from your custom post type, you can specify the post type in the &lt;code&gt;post_type&lt;/code&gt; option&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Delete post type 'news'
wp post delete $(wp post list --post_type='news' --format=ids) --force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you have too much data to delete, you may get an &lt;code&gt;Argument list too long&lt;/code&gt; error.&lt;/p&gt;

&lt;p&gt;In that case, you can delete it little by little with a shell script like the following.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/sh

# Deleting 10,000 at a time.
for i in `seq 1 10`
do
    wp post delete $(wp post list --post_type='your-post-type' --format=ids --posts_per_page=10000) --force
done

echo "done"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>wordpress</category>
      <category>wpcli</category>
    </item>
    <item>
      <title>Using Imagemagick to easily split an image file</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Fri, 19 Jun 2020 01:12:08 +0000</pubDate>
      <link>https://dev.to/ko31/using-imagemagick-to-easily-split-an-image-file-13hb</link>
      <guid>https://dev.to/ko31/using-imagemagick-to-easily-split-an-image-file-13hb</guid>
      <description>&lt;p&gt;&lt;code&gt;convert&lt;/code&gt; command of &lt;a href="https://imagemagick.org/"&gt;ImageMagick&lt;/a&gt; is very useful to split an images file.&lt;/p&gt;

&lt;p&gt;To use the &lt;code&gt;convert&lt;/code&gt;, you'll need to install ImageMagick beforehand.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install imagemagick
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Split the image to the left and right
&lt;/h2&gt;

&lt;p&gt;input.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GeLW5PBz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ryp0vq50szz32asjpisp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GeLW5PBz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ryp0vq50szz32asjpisp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;convert -crop 50%x100% input.png output.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;output-0.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KMAY8_8V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hn0xrpqpns003myoxoge.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KMAY8_8V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hn0xrpqpns003myoxoge.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;output-1.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t6EuFHvm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/26uxdut9e4zslsokkhfw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t6EuFHvm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/26uxdut9e4zslsokkhfw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Split the image to the top and bottom
&lt;/h2&gt;

&lt;p&gt;input.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7r6yYMML--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hjo0ndkutjxx3w0zofp6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7r6yYMML--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/hjo0ndkutjxx3w0zofp6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;convert -crop 100%x50% input.png output.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;output-0.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kLs5nUfl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1yutet8xsdlolemhic2p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kLs5nUfl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/1yutet8xsdlolemhic2p.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;output-1.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V-AB-bU_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ggs2gxttwe49ugvcovm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V-AB-bU_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ggs2gxttwe49ugvcovm2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Split the image into 4 parts
&lt;/h2&gt;

&lt;p&gt;input.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YCAAY_QE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9js3i5emhavj2w3r24b5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YCAAY_QE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/9js3i5emhavj2w3r24b5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;convert -crop 50%x50% input.png output.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;output-0.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bGSgJw5M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fs26shi2q5l2ez6t3mlg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bGSgJw5M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fs26shi2q5l2ez6t3mlg.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;output-1.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_RftIPmZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z5ey824fnmbe5n0h3u01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_RftIPmZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z5ey824fnmbe5n0h3u01.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;output-2.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--G-TWZ1Ov--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mkrlrus4r9wem48724zn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--G-TWZ1Ov--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/mkrlrus4r9wem48724zn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;output-3.png&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v5TBzWJR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xv59lhlbuxcmni77qsls.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v5TBzWJR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xv59lhlbuxcmni77qsls.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>imagemagick</category>
    </item>
    <item>
      <title>Return value of get_queried_object() in WordPress</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Mon, 16 Mar 2020 02:44:53 +0000</pubDate>
      <link>https://dev.to/ko31/return-value-of-getqueriedobject-in-wordpress-1h7n</link>
      <guid>https://dev.to/ko31/return-value-of-getqueriedobject-in-wordpress-1h7n</guid>
      <description>&lt;p&gt;I checked what kind of return value of &lt;a href="https://developer.wordpress.org/reference/functions/get_queried_object/"&gt;get_queried_object()&lt;/a&gt; depends on the page type.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WordPress 5.3.2&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  TOC
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Homepage&lt;/li&gt;
&lt;li&gt;Front page&lt;/li&gt;
&lt;li&gt;Single post&lt;/li&gt;
&lt;li&gt;Single page&lt;/li&gt;
&lt;li&gt;Category archive&lt;/li&gt;
&lt;li&gt;Tag archive&lt;/li&gt;
&lt;li&gt;Taxonomy archive&lt;/li&gt;
&lt;li&gt;Custom post archive&lt;/li&gt;
&lt;li&gt;Author archive&lt;/li&gt;
&lt;li&gt;Date archive (year)&lt;/li&gt;
&lt;li&gt;Date archive (month)&lt;/li&gt;
&lt;li&gt;Date archive (day)&lt;/li&gt;
&lt;li&gt;Search&lt;/li&gt;
&lt;li&gt;404&lt;/li&gt;
&lt;li&gt;Atachment file&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Homepage &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Front page &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Single post &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_Post)#4808 (24) {
  ["ID"]=&amp;gt;
  int(1)
  ["post_author"]=&amp;gt;
  string(1) "1"
  ["post_date"]=&amp;gt;
  string(19) "2019-12-16 12:48:44"
  ["post_date_gmt"]=&amp;gt;
  string(19) "2019-12-16 12:48:44"
  ["post_content"]=&amp;gt;
  string(137) "
Welcome to WordPress. This is your first post. Edit or delete it, then start writing!


"
  ["post_title"]=&amp;gt;
  string(12) "Hello world!"
  ["post_excerpt"]=&amp;gt;
  string(0) ""
  ["post_status"]=&amp;gt;
  string(7) "publish"
  ["comment_status"]=&amp;gt;
  string(4) "open"
  ["ping_status"]=&amp;gt;
  string(4) "open"
  ["post_password"]=&amp;gt;
  string(0) ""
  ["post_name"]=&amp;gt;
  string(11) "hello-world"
  ["to_ping"]=&amp;gt;
  string(0) ""
  ["pinged"]=&amp;gt;
  string(0) ""
  ["post_modified"]=&amp;gt;
  string(19) "2019-12-16 12:48:44"
  ["post_modified_gmt"]=&amp;gt;
  string(19) "2019-12-16 12:48:44"
  ["post_content_filtered"]=&amp;gt;
  string(0) ""
  ["post_parent"]=&amp;gt;
  int(0)
  ["guid"]=&amp;gt;
  string(22) "http://work.local/?p=1"
  ["menu_order"]=&amp;gt;
  int(0)
  ["post_type"]=&amp;gt;
  string(4) "post"
  ["post_mime_type"]=&amp;gt;
  string(0) ""
  ["comment_count"]=&amp;gt;
  string(1) "1"
  ["filter"]=&amp;gt;
  string(3) "raw"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Single page &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_Post)#366 (24) {
  ["ID"]=&amp;gt;
  int(2)
  ["post_author"]=&amp;gt;
  string(1) "1"
  ["post_date"]=&amp;gt;
  string(19) "2019-12-16 12:48:44"
  ["post_date_gmt"]=&amp;gt;
  string(19) "2019-12-16 12:48:44"
  ["post_content"]=&amp;gt;
  string(76) "
This is an example page.


"
  ["post_title"]=&amp;gt;
  string(11) "Sample Page"
  ["post_excerpt"]=&amp;gt;
  string(0) ""
  ["post_status"]=&amp;gt;
  string(7) "publish"
  ["comment_status"]=&amp;gt;
  string(6) "closed"
  ["ping_status"]=&amp;gt;
  string(4) "open"
  ["post_password"]=&amp;gt;
  string(0) ""
  ["post_name"]=&amp;gt;
  string(11) "sample-page"
  ["to_ping"]=&amp;gt;
  string(0) ""
  ["pinged"]=&amp;gt;
  string(0) ""
  ["post_modified"]=&amp;gt;
  string(19) "2020-03-16 10:53:03"
  ["post_modified_gmt"]=&amp;gt;
  string(19) "2020-03-16 01:53:03"
  ["post_content_filtered"]=&amp;gt;
  string(0) ""
  ["post_parent"]=&amp;gt;
  int(0)
  ["guid"]=&amp;gt;
  string(28) "http://work.local/?page_id=2"
  ["menu_order"]=&amp;gt;
  int(0)
  ["post_type"]=&amp;gt;
  string(4) "page"
  ["post_mime_type"]=&amp;gt;
  string(0) ""
  ["comment_count"]=&amp;gt;
  string(1) "0"
  ["filter"]=&amp;gt;
  string(3) "raw"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Category archive &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_Term)#4828 (16) {
  ["term_id"]=&amp;gt;
  int(1)
  ["name"]=&amp;gt;
  string(4) "News"
  ["slug"]=&amp;gt;
  string(4) "news"
  ["term_group"]=&amp;gt;
  int(0)
  ["term_taxonomy_id"]=&amp;gt;
  int(1)
  ["taxonomy"]=&amp;gt;
  string(8) "category"
  ["description"]=&amp;gt;
  string(0) ""
  ["parent"]=&amp;gt;
  int(0)
  ["count"]=&amp;gt;
  int(1)
  ["filter"]=&amp;gt;
  string(3) "raw"
  ["cat_ID"]=&amp;gt;
  int(1)
  ["category_count"]=&amp;gt;
  int(1)
  ["category_description"]=&amp;gt;
  string(0) ""
  ["cat_name"]=&amp;gt;
  string(4) "News"
  ["category_nicename"]=&amp;gt;
  string(4) "news"
  ["category_parent"]=&amp;gt;
  int(0)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tag archive &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_Term)#4818 (10) {
  ["term_id"]=&amp;gt;
  int(7)
  ["name"]=&amp;gt;
  string(12) "サンプル"
  ["slug"]=&amp;gt;
  string(6) "sample"
  ["term_group"]=&amp;gt;
  int(0)
  ["term_taxonomy_id"]=&amp;gt;
  int(7)
  ["taxonomy"]=&amp;gt;
  string(8) "post_tag"
  ["description"]=&amp;gt;
  string(0) ""
  ["parent"]=&amp;gt;
  int(0)
  ["count"]=&amp;gt;
  int(1)
  ["filter"]=&amp;gt;
  string(3) "raw"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Taxonomy archive &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_Term)#4824 (10) {
  ["term_id"]=&amp;gt;
  int(8)
  ["name"]=&amp;gt;
  string(4) "pops"
  ["slug"]=&amp;gt;
  string(4) "pops"
  ["term_group"]=&amp;gt;
  int(0)
  ["term_taxonomy_id"]=&amp;gt;
  int(8)
  ["taxonomy"]=&amp;gt;
  string(5) "genre"
  ["description"]=&amp;gt;
  string(0) ""
  ["parent"]=&amp;gt;
  int(0)
  ["count"]=&amp;gt;
  int(1)
  ["filter"]=&amp;gt;
  string(3) "raw"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Custom post archive &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_Post_Type)#419 (30) {
  ["name"]=&amp;gt;
  string(7) "product"
  ["label"]=&amp;gt;
  string(8) "Products"
  ["labels"]=&amp;gt;
  object(stdClass)#416 (32) {
    ["name"]=&amp;gt;
    string(8) "Products"
    ["singular_name"]=&amp;gt;
    string(7) "Product"
    ["add_new"]=&amp;gt;
    string(11) "New Product"
    ["add_new_item"]=&amp;gt;
    string(15) "Add New Product"
    ["edit_item"]=&amp;gt;
    string(12) "Edit Product"
    ["new_item"]=&amp;gt;
    string(8) "New Item"
    ["view_item"]=&amp;gt;
    string(12) "View Product"
    ["view_items"]=&amp;gt;
    string(10) "View Items"
    ["search_items"]=&amp;gt;
    string(15) "Search products"
    ["not_found"]=&amp;gt;
    string(17) "No products found"
    ["not_found_in_trash"]=&amp;gt;
    string(26) "No products found in Trash"
    ["parent_item_colon"]=&amp;gt;
    string(15) "Parent Product:"
    ["all_items"]=&amp;gt;
    string(12) "All Products"
    ["archives"]=&amp;gt;
    string(13) "Item Archives"
    ["attributes"]=&amp;gt;
    string(15) "Item Attributes"
    ["insert_into_item"]=&amp;gt;
    string(16) "Insert into item"
    ["uploaded_to_this_item"]=&amp;gt;
    string(21) "Uploaded to this item"
    ["featured_image"]=&amp;gt;
    string(14) "Featured Image"
    ["set_featured_image"]=&amp;gt;
    string(18) "Set featured image"
    ["remove_featured_image"]=&amp;gt;
    string(21) "Remove featured image"
    ["use_featured_image"]=&amp;gt;
    string(21) "Use as featured image"
    ["filter_items_list"]=&amp;gt;
    string(17) "Filter items list"
    ["items_list_navigation"]=&amp;gt;
    string(21) "Items list navigation"
    ["items_list"]=&amp;gt;
    string(10) "Items list"
    ["item_published"]=&amp;gt;
    string(15) "Post published."
    ["item_published_privately"]=&amp;gt;
    string(25) "Post published privately."
    ["item_reverted_to_draft"]=&amp;gt;
    string(23) "Post reverted to draft."
    ["item_scheduled"]=&amp;gt;
    string(15) "Post scheduled."
    ["item_updated"]=&amp;gt;
    string(13) "Post updated."
    ["menu_name"]=&amp;gt;
    string(8) "Products"
    ["name_admin_bar"]=&amp;gt;
    string(7) "Product"
    ["update_item"]=&amp;gt;
    string(14) "Update Product"
  }
  ["description"]=&amp;gt;
  string(26) "Product information pages."
  ["public"]=&amp;gt;
  bool(true)
  ["hierarchical"]=&amp;gt;
  bool(false)
  ["exclude_from_search"]=&amp;gt;
  bool(false)
  ["publicly_queryable"]=&amp;gt;
  bool(true)
  ["show_ui"]=&amp;gt;
  bool(true)
  ["show_in_menu"]=&amp;gt;
  bool(true)
  ["show_in_nav_menus"]=&amp;gt;
  bool(true)
  ["show_in_admin_bar"]=&amp;gt;
  bool(true)
  ["menu_position"]=&amp;gt;
  int(5)
  ["menu_icon"]=&amp;gt;
  NULL
  ["capability_type"]=&amp;gt;
  string(4) "page"
  ["map_meta_cap"]=&amp;gt;
  bool(true)
  ["register_meta_box_cb"]=&amp;gt;
  NULL
  ["taxonomies"]=&amp;gt;
  array(1) {
    [0]=&amp;gt;
    string(5) "genre"
  }
  ["has_archive"]=&amp;gt;
  bool(true)
  ["query_var"]=&amp;gt;
  string(7) "product"
  ["can_export"]=&amp;gt;
  bool(true)
  ["delete_with_user"]=&amp;gt;
  NULL
  ["_builtin"]=&amp;gt;
  bool(false)
  ["_edit_link"]=&amp;gt;
  string(16) "post.php?post=%d"
  ["cap"]=&amp;gt;
  object(stdClass)#424 (15) {
    ["edit_post"]=&amp;gt;
    string(9) "edit_page"
    ["read_post"]=&amp;gt;
    string(9) "read_page"
    ["delete_post"]=&amp;gt;
    string(11) "delete_page"
    ["edit_posts"]=&amp;gt;
    string(10) "edit_pages"
    ["edit_others_posts"]=&amp;gt;
    string(17) "edit_others_pages"
    ["publish_posts"]=&amp;gt;
    string(13) "publish_pages"
    ["read_private_posts"]=&amp;gt;
    string(18) "read_private_pages"
    ["read"]=&amp;gt;
    string(4) "read"
    ["delete_posts"]=&amp;gt;
    string(12) "delete_pages"
    ["delete_private_posts"]=&amp;gt;
    string(20) "delete_private_pages"
    ["delete_published_posts"]=&amp;gt;
    string(22) "delete_published_pages"
    ["delete_others_posts"]=&amp;gt;
    string(19) "delete_others_pages"
    ["edit_private_posts"]=&amp;gt;
    string(18) "edit_private_pages"
    ["edit_published_posts"]=&amp;gt;
    string(20) "edit_published_pages"
    ["create_posts"]=&amp;gt;
    string(10) "edit_pages"
  }
  ["rewrite"]=&amp;gt;
  array(5) {
    ["slug"]=&amp;gt;
    string(7) "product"
    ["with_front"]=&amp;gt;
    bool(true)
    ["pages"]=&amp;gt;
    bool(true)
    ["feeds"]=&amp;gt;
    bool(true)
    ["ep_mask"]=&amp;gt;
    int(1)
  }
  ["show_in_rest"]=&amp;gt;
  bool(false)
  ["rest_base"]=&amp;gt;
  bool(false)
  ["rest_controller_class"]=&amp;gt;
  bool(false)
  ["rest_controller"]=&amp;gt;
  NULL
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Author archive &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_User)#4818 (8) {
  ["data"]=&amp;gt;
  object(stdClass)#4817 (10) {
    ["ID"]=&amp;gt;
    string(1) "1"
    ["user_login"]=&amp;gt;
    string(5) "admin"
    ["user_pass"]=&amp;gt;
    string(34) "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
    ["user_nicename"]=&amp;gt;
    string(5) "admin"
    ["user_email"]=&amp;gt;
    string(24) "dev-email@flywheel.local"
    ["user_url"]=&amp;gt;
    string(0) ""
    ["user_registered"]=&amp;gt;
    string(19) "2019-12-16 12:48:44"
    ["user_activation_key"]=&amp;gt;
    string(0) ""
    ["user_status"]=&amp;gt;
    string(1) "0"
    ["display_name"]=&amp;gt;
    string(5) "admin"
  }
  ["ID"]=&amp;gt;
  int(1)
  ["caps"]=&amp;gt;
  array(1) {
    ["administrator"]=&amp;gt;
    bool(true)
  }
  ["cap_key"]=&amp;gt;
  string(15) "wp_capabilities"
  ["roles"]=&amp;gt;
  array(1) {
    [0]=&amp;gt;
    string(13) "administrator"
  }
  ["allcaps"]=&amp;gt;
  array(66) {
    ["switch_themes"]=&amp;gt;
    bool(true)
    ["edit_themes"]=&amp;gt;
    bool(true)
    ["activate_plugins"]=&amp;gt;
    bool(true)
    ["edit_plugins"]=&amp;gt;
    bool(true)
    ["edit_users"]=&amp;gt;
    bool(true)
    ["edit_files"]=&amp;gt;
    bool(true)
    ["manage_options"]=&amp;gt;
    bool(true)
    ["moderate_comments"]=&amp;gt;
    bool(true)
    ["manage_categories"]=&amp;gt;
    bool(true)
    ["manage_links"]=&amp;gt;
    bool(true)
    ["upload_files"]=&amp;gt;
    bool(true)
    ["import"]=&amp;gt;
    bool(true)
    ["unfiltered_html"]=&amp;gt;
    bool(true)
    ["edit_posts"]=&amp;gt;
    bool(true)
    ["edit_others_posts"]=&amp;gt;
    bool(true)
    ["edit_published_posts"]=&amp;gt;
    bool(true)
    ["publish_posts"]=&amp;gt;
    bool(true)
    ["edit_pages"]=&amp;gt;
    bool(true)
    ["read"]=&amp;gt;
    bool(true)
    ["level_10"]=&amp;gt;
    bool(true)
    ["level_9"]=&amp;gt;
    bool(true)
    ["level_8"]=&amp;gt;
    bool(true)
    ["level_7"]=&amp;gt;
    bool(true)
    ["level_6"]=&amp;gt;
    bool(true)
    ["level_5"]=&amp;gt;
    bool(true)
    ["level_4"]=&amp;gt;
    bool(true)
    ["level_3"]=&amp;gt;
    bool(true)
    ["level_2"]=&amp;gt;
    bool(true)
    ["level_1"]=&amp;gt;
    bool(true)
    ["level_0"]=&amp;gt;
    bool(true)
    ["edit_others_pages"]=&amp;gt;
    bool(true)
    ["edit_published_pages"]=&amp;gt;
    bool(true)
    ["publish_pages"]=&amp;gt;
    bool(true)
    ["delete_pages"]=&amp;gt;
    bool(true)
    ["delete_others_pages"]=&amp;gt;
    bool(true)
    ["delete_published_pages"]=&amp;gt;
    bool(true)
    ["delete_posts"]=&amp;gt;
    bool(true)
    ["delete_others_posts"]=&amp;gt;
    bool(true)
    ["delete_published_posts"]=&amp;gt;
    bool(true)
    ["delete_private_posts"]=&amp;gt;
    bool(true)
    ["edit_private_posts"]=&amp;gt;
    bool(true)
    ["read_private_posts"]=&amp;gt;
    bool(true)
    ["delete_private_pages"]=&amp;gt;
    bool(true)
    ["edit_private_pages"]=&amp;gt;
    bool(true)
    ["read_private_pages"]=&amp;gt;
    bool(true)
    ["delete_users"]=&amp;gt;
    bool(true)
    ["create_users"]=&amp;gt;
    bool(true)
    ["unfiltered_upload"]=&amp;gt;
    bool(true)
    ["edit_dashboard"]=&amp;gt;
    bool(true)
    ["update_plugins"]=&amp;gt;
    bool(true)
    ["delete_plugins"]=&amp;gt;
    bool(true)
    ["install_plugins"]=&amp;gt;
    bool(true)
    ["update_themes"]=&amp;gt;
    bool(true)
    ["install_themes"]=&amp;gt;
    bool(true)
    ["update_core"]=&amp;gt;
    bool(true)
    ["list_users"]=&amp;gt;
    bool(true)
    ["remove_users"]=&amp;gt;
    bool(true)
    ["promote_users"]=&amp;gt;
    bool(true)
    ["edit_theme_options"]=&amp;gt;
    bool(true)
    ["delete_themes"]=&amp;gt;
    bool(true)
    ["export"]=&amp;gt;
    bool(true)
    ["create_blog_partssss"]=&amp;gt;
    bool(true)
    ["create_blog_parts"]=&amp;gt;
    bool(true)
    ["create_ad_tag"]=&amp;gt;
    bool(true)
    ["create_speech_balloon"]=&amp;gt;
    bool(true)
    ["administrator"]=&amp;gt;
    bool(true)
  }
  ["filter"]=&amp;gt;
  NULL
  ["site_id":"WP_User":private]=&amp;gt;
  int(1)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Date archive (year) &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Date archive (month) &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Date archive (day) &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Search &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  404 &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;NULL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Atachment file &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;object(WP_Post)#4800 (24) {
  ["ID"]=&amp;gt;
  int(11)
  ["post_author"]=&amp;gt;
  string(1) "1"
  ["post_date"]=&amp;gt;
  string(19) "2020-03-16 11:02:58"
  ["post_date_gmt"]=&amp;gt;
  string(19) "2020-03-16 02:02:58"
  ["post_content"]=&amp;gt;
  string(0) ""
  ["post_title"]=&amp;gt;
  string(32) "lookoutdevilsthroatDSCF0351_TP_V"
  ["post_excerpt"]=&amp;gt;
  string(0) ""
  ["post_status"]=&amp;gt;
  string(7) "inherit"
  ["comment_status"]=&amp;gt;
  string(4) "open"
  ["ping_status"]=&amp;gt;
  string(6) "closed"
  ["post_password"]=&amp;gt;
  string(0) ""
  ["post_name"]=&amp;gt;
  string(32) "lookoutdevilsthroatdscf0351_tp_v"
  ["to_ping"]=&amp;gt;
  string(0) ""
  ["pinged"]=&amp;gt;
  string(0) ""
  ["post_modified"]=&amp;gt;
  string(19) "2020-03-16 11:02:58"
  ["post_modified_gmt"]=&amp;gt;
  string(19) "2020-03-16 02:02:58"
  ["post_content_filtered"]=&amp;gt;
  string(0) ""
  ["post_parent"]=&amp;gt;
  int(0)
  ["guid"]=&amp;gt;
  string(81) "http://work.local/wp-content/uploads/2020/03/lookoutdevilsthroatDSCF0351_TP_V.jpg"
  ["menu_order"]=&amp;gt;
  int(0)
  ["post_type"]=&amp;gt;
  string(10) "attachment"
  ["post_mime_type"]=&amp;gt;
  string(10) "image/jpeg"
  ["comment_count"]=&amp;gt;
  string(1) "0"
  ["filter"]=&amp;gt;
  string(3) "raw"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>wordpress</category>
    </item>
    <item>
      <title>How to install Vim on XSERVER</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Wed, 29 Jan 2020 08:44:26 +0000</pubDate>
      <link>https://dev.to/ko31/how-to-install-vim-on-xserver-gdd</link>
      <guid>https://dev.to/ko31/how-to-install-vim-on-xserver-gdd</guid>
      <description>&lt;p&gt;&lt;a href="https://www.xserver.ne.jp/"&gt;XSERVER&lt;/a&gt; is one of the most popular hosting service in Japan.&lt;/p&gt;

&lt;p&gt;It is possible to connect to the server via ssh, but Vim is not installed.&lt;/p&gt;

&lt;p&gt;I often work with Vim on the server, so I installed Vim using the following steps:&lt;/p&gt;

&lt;h2&gt;
  
  
  Step1: Install ncurses
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir ~/opt &amp;amp;&amp;amp; cd $_
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz
tar zxfv ncurses-6.1.tar.gz
cd ncurses-6.1
./configure --prefix=$HOME/local
make
make install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step2: Install Vim
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ~/opt
git clone https://github.com/vim/vim.git
cd vim
./configure --with-features=huge --enable-fail-if-missing --prefix=$HOME/local --with-local-dir=$HOME/local
make
make install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step3: Setting environment
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vi ~/.bashrc

# Add alias to .bashrc
export PATH=$PATH:$HOME/local/bin
alias vi='vim'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Reload .bashrc&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can use the &lt;code&gt;vim&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Have a great day👍&lt;/p&gt;

</description>
      <category>xserver</category>
      <category>vim</category>
    </item>
    <item>
      <title>Linux commands useful when performing heavy processing</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Sat, 28 Dec 2019 22:18:57 +0000</pubDate>
      <link>https://dev.to/ko31/linux-commands-useful-when-performing-heavy-processing-2bdc</link>
      <guid>https://dev.to/ko31/linux-commands-useful-when-performing-heavy-processing-2bdc</guid>
      <description>&lt;h2&gt;
  
  
  sleep
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;sleep&lt;/code&gt; command suspends processing for a certain period of time.&lt;/p&gt;

&lt;p&gt;For example, when running a heavy shell script, using the sleep command moderately can reduce the load.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Delay 10 seconds(no option)
sleep 10

# Delay 10 seconds
sleep 10s

# Delay 5 minutes
sleep 5m

# Delay 3 hours
sleep 3h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  nice/renice
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;nice&lt;/code&gt; command can be executed with priorities.&lt;/p&gt;

&lt;p&gt;For example, when performing a backup or batch process, the process can be performed without affecting other processes.&lt;/p&gt;

&lt;p&gt;You will be able to batch process more safely, even at lunchtime when the website is crowded by many people.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Without option, run at +10 priority
nice /path/to/command

# Run at +10 priority
nice -n 10 /path/to/command
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Priority options can be specified from -20 (higher) to 19 (lower). However, negative values can only be specified by superuser.&lt;/p&gt;

&lt;p&gt;You can also use the &lt;code&gt;renice&lt;/code&gt; command to adjust the priority of already running processes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Adjust the priority of pid 99999 process
renice 10 -p 99999
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  nohup
&lt;/h2&gt;

&lt;p&gt;If you use the &lt;code&gt;nohup&lt;/code&gt; command, you can continue processing even if you log out of the terminal.&lt;/p&gt;

&lt;p&gt;After executing the command, you can close the computer and go to bed calmly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nohup /path/to/command &amp;amp;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Standard output during execution of the nohup command is saved in the &lt;code&gt;nohup.out&lt;/code&gt; file.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>commands</category>
    </item>
    <item>
      <title>Installing Laravel Homestead on MacOS🔧</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Sat, 21 Dec 2019 23:28:50 +0000</pubDate>
      <link>https://dev.to/ko31/installing-laravel-homestead-on-macos-5910</link>
      <guid>https://dev.to/ko31/installing-laravel-homestead-on-macos-5910</guid>
      <description>&lt;p&gt;&lt;a href="https://laravel.com/docs/6.x/homestead" rel="noopener noreferrer"&gt;Laravel Homestead&lt;/a&gt; is official local development environment.&lt;br&gt;
It is a great tool that allows you to easily create an environment with all the functions required for development.&lt;/p&gt;

&lt;p&gt;The following is the steps for installing Laravel 6.x on MacOS with Homestead.&lt;/p&gt;

&lt;p&gt;Install VirtualBox.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Downloads – Oracle VM VirtualBox &lt;a href="https://www.virtualbox.org/wiki/Downloads" rel="noopener noreferrer"&gt;https://www.virtualbox.org/wiki/Downloads&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install Vagrant.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download - Vagrant by HashiCorp &lt;a href="https://www.vagrantup.com/downloads.html" rel="noopener noreferrer"&gt;https://www.vagrantup.com/downloads.html&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Install the Homestead Vagrant box.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vagrant box add laravel/homestead
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By the way, if you couldn't install homestead above command, you can use the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vagrant box add laravel/homestead https://vagrantcloud.com/laravel/homestead 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install Homestead.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ git clone https://github.com/laravel/homestead.git ~/Homestead
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the Homestead configration file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd ~/Homestead
$ bash init.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Homestead.yaml&lt;/code&gt; is created in the directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cat Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/code
      to: /home/vagrant/code

sites:
    - map: homestead.test
      to: /home/vagrant/code/public

databases:
    - homestead

features:
    - mariadb: false
    - ohmyzsh: false
    - webdriver: false

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View the &lt;code&gt;folders&lt;/code&gt; property of the Homestead.yaml file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;folders:
    - map: ~/code
      to: /home/vagrant/code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create directory according to settings.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ mkdir ~/code
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Edit the &lt;code&gt;sites&lt;/code&gt; property of the Homestead.yaml file. In the case, the project directory name is &lt;code&gt;myproject&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;sites:
    - map: homestead.test
      to: /home/vagrant/code/myproject/public
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add name resolution to hosts file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo vi /etc/hosts

192.168.10.10 homestead.test
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Launch Vagrant.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ cd ~/Homestead
$ vagrant up
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there are not &lt;code&gt;id_rsa&lt;/code&gt; (secret key) and &lt;code&gt;id_rsa.pub&lt;/code&gt; (public key) in &lt;code&gt;~/.ssh&lt;/code&gt; directory, create key files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ssh-keygen -t rsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Connect to virtual machine using SSH.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ vagrant ssh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install Laravel with project name &lt;code&gt;myproject&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;$ cd ~/code
$ composer create-project --prefer-dist laravel/laravel myproject
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;View &lt;code&gt;homestead.test&lt;/code&gt; in your browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftrvx1ylz17tycinp0w8a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftrvx1ylz17tycinp0w8a.png" alt="Welcome to Laravel"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Good Job!👍&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>homestead</category>
    </item>
    <item>
      <title>Download website files entirely using wget</title>
      <dc:creator>Ko Takagi</dc:creator>
      <pubDate>Mon, 16 Dec 2019 13:25:54 +0000</pubDate>
      <link>https://dev.to/ko31/download-website-files-using-wget-3k2</link>
      <guid>https://dev.to/ko31/download-website-files-using-wget-3k2</guid>
      <description>&lt;p&gt;If you want to create a local mirror site, you can download a set of websites by wget.&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;wget -P /path/to/download -E -k -m -nH -np -p -c https://example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Overview&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;-P&lt;/td&gt;
&lt;td&gt;Set save directory path.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-E&lt;/td&gt;
&lt;td&gt;This option will cause the suitable suffix to be appended to the local filename.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-k&lt;/td&gt;
&lt;td&gt;After the download is complete, convert the links in the document to make them suitable for local viewing.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-m&lt;/td&gt;
&lt;td&gt;Turn on options suitable for mirroring.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-nH&lt;/td&gt;
&lt;td&gt;Disable generation of host-prefixed directories.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-np&lt;/td&gt;
&lt;td&gt;Do not ever ascend to the parent directory when retrieving recursively.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-p&lt;/td&gt;
&lt;td&gt;This option causes Wget to download all the files that are necessary to properly display a given HTML page.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-c&lt;/td&gt;
&lt;td&gt;Continue getting a partially-downloaded file.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  With basic authentication
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wget -P /path/to/download -E -k -m -nH -np -p -c --http-user=username --http-password=password https://example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Overview&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;--http-user&lt;/td&gt;
&lt;td&gt;Set username.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;--http-password&lt;/td&gt;
&lt;td&gt;Set password.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>linux</category>
      <category>wget</category>
      <category>scraping</category>
    </item>
  </channel>
</rss>
