<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9202044598746185964</id><updated>2024-08-29T17:35:39.976+08:00</updated><category term=".NET"/><category term="抒發"/><category term="Mac"/><category term="AWS"/><category term="linux"/><category term="健康"/><category term="java"/><category term="mysql"/><category term="Web"/><category term="Python"/><category term="javascript"/><category term="SQL"/><category term="Scala"/><category term="笑話"/><category term="GCP"/><category term="Docker"/><category term="Django"/><category term="jQuery"/><category term="名詞解釋"/><category term="FAQ"/><category term="Nginx"/><category term="S3"/><category term="SQL Server"/><category term="wordpress"/><category term="旅遊"/><category term="PHP"/><category term="SBT"/><category term="Visual Studio"/><category term="nagios"/><category term="shell script"/><category term="Ansible"/><category term="BigQuery"/><category term="CSS"/><category term="Html"/><category term="eclipse"/><category term="logback"/><category term="maven"/><category term="Circe"/><category term="Hive"/><category term="Postgres"/><category term="Terraform"/><category term="android"/><category term="dynamodb"/><category term="gitlab"/><category term="iphone"/><category term="kubernetes"/><category term="m1"/><category term="rails"/><category term="ruby"/><category term="tomcat"/><category term="ubuntu"/><category term="CentOS"/><category term="Compute Engine"/><category term="Dataflow"/><category term="ECS"/><category term="EKS"/><category term="IntelliJ"/><category term="Json"/><category term="Play"/><category term="React"/><category term="Sublime"/><category term="VirtualBox"/><category term="Vue"/><category term="bash"/><category term="brew"/><category term="command"/><category term="facebook api"/><category term="gitlab-runner"/><category term="hadoop"/><category term="hibernate"/><category term="office"/><category term="rbenv"/><category term="socketio"/><category term="spring security"/><category term="-framework"/><category term="ACM"/><category term="AppServ"/><category term="BootstrapVue"/><category term="CA"/><category term="CORS"/><category term="Chef"/><category term="China"/><category term="CloudFront"/><category term="Cloudwatch"/><category term="Container Registry"/><category term="Couchbase"/><category term="Criteria"/><category term="Django-Admin"/><category term="EC2"/><category term="Finatra"/><category term="Functional Programming"/><category term="GCS"/><category term="Go"/><category term="Grafana"/><category term="IAM"/><category term="IDEA"/><category term="Kitchen"/><category term="Lua"/><category term="MongoDB"/><category term="NATGateway"/><category term="NoSQL"/><category term="OS"/><category term="Programming"/><category term="PyCharm"/><category term="RDLC"/><category term="ReactiveMongo"/><category term="Redshift"/><category term="Regex"/><category term="SQL 效能改善"/><category term="SSL"/><category term="ScalaTest"/><category term="Slick"/><category term="Sports"/><category term="StressTest"/><category term="T-SQL"/><category term="TFS"/><category term="VPC"/><category term="Vim"/><category term="WSL"/><category term="aerospike"/><category term="ajax"/><category term="all in one seo"/><category term="apache"/><category term="aws-cli"/><category term="axios"/><category term="boto3"/><category term="cer"/><category term="cert"/><category term="concurrent"/><category term="cookie"/><category term="crawler"/><category term="crt"/><category term="csr"/><category term="debian"/><category term="dind"/><category term="django-rest"/><category term="django-rest-framework"/><category term="django-storages"/><category term="docker in docker"/><category term="doobie"/><category term="easymock"/><category term="excel"/><category term="firebase"/><category term="firefox"/><category term="ie"/><category term="index"/><category term="ipad"/><category term="iptable"/><category term="jib"/><category term="jsp"/><category term="jstl"/><category term="kafka"/><category term="kamon"/><category term="monitor"/><category term="mvn"/><category term="oracle cloud"/><category term="percona"/><category term="phpmailer"/><category term="phpmyAdmin"/><category term="podman"/><category term="prometheus"/><category term="protobuf"/><category term="pytube"/><category term="redis"/><category term="rollingPolicy"/><category term="ror"/><category term="seo"/><category term="servlet"/><category term="shortUrl"/><category term="smokeping"/><category term="spring"/><category term="springboot"/><category term="sqlalchemy"/><category term="struts"/><category term="svn"/><category term="test"/><category term="windows10"/><category term="yaml"/><category term="yoast seo"/><category term="youtube"/><category term="好玩"/><category term="經濟現象"/><category term="電玩"/><category term="魔術"/><title type='text'>Arthur&#39;s Note</title><subtitle type='html'>some notes, if you find this blog useful, you can click ads to support me! Thank you very much</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>508</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-7857685822644356565</id><published>2023-07-27T10:00:00.001+08:00</published><updated>2023-07-27T10:00:10.110+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="excel"/><title type='text'>[Excel] breakline in cell with function (換行)</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;alt+enter&amp;nbsp;&lt;/p&gt;&lt;p&gt;或是用這個 CHAR(10) 在搭配使用公式時&lt;/p&gt;&lt;pre class=&quot;wp-block-code&quot; style=&quot;background-color: #f4f4f4; border-color: var(--pcborder-cl); border-image: initial; border-radius: 4px; border-style: solid; border-width: 1px; box-sizing: border-box; font-family: Menlo, Consolas, monaco, monospace; font-size: 14px; line-height: 1.4; margin-bottom: 20px; margin-top: 0px; outline: none; overflow-wrap: break-word; padding: 15px; text-wrap: wrap; word-break: break-all;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: none; box-sizing: border-box; color: #23282d; display: block; font-family: Menlo, Consolas, monaco, monospace; font-size: inherit; margin: 0px; outline: none; overflow-wrap: break-word; padding: 2px;&quot;&gt;=123456&lt;span style=&quot;box-sizing: border-box; color: red; margin: 0px; outline: none; padding: 0px;&quot;&gt;&amp;amp;CHAR(10)&amp;amp;&lt;/span&gt;789111&lt;/code&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: none; box-sizing: border-box; color: #23282d; display: block; font-family: Menlo, Consolas, monaco, monospace; font-size: inherit; margin: 0px; outline: none; overflow-wrap: break-word; padding: 2px;&quot;&gt;or&lt;/code&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: none; box-sizing: border-box; color: #23282d; display: block; font-family: Menlo, Consolas, monaco, monospace; font-size: inherit; margin: 0px; outline: none; overflow-wrap: break-word; padding: 2px;&quot;&gt;=&quot;abvd&quot;&lt;span style=&quot;box-sizing: border-box; color: red; margin: 0px; outline: none; padding: 0px;&quot;&gt;&amp;amp;CHAR(10)&amp;amp;&quot;&lt;/span&gt;efg&quot;&lt;/code&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: none; box-sizing: border-box; color: #23282d; display: block; font-family: Menlo, Consolas, monaco, monospace; font-size: inherit; margin: 0px; outline: none; overflow-wrap: break-word; padding: 2px;&quot;&gt;or&lt;/code&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 2px; border: none; box-sizing: border-box; display: block; font-family: Menlo, Consolas, monaco, monospace; font-size: inherit; margin: 0px; outline: none; overflow-wrap: break-word; padding: 2px;&quot;&gt;&lt;span style=&quot;color: #23282d;&quot;&gt;=&quot;Test: &quot;&amp;amp;COUNT(B1:B2)&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;amp;CHAR(10)&amp;amp;&lt;/span&gt;&lt;span style=&quot;color: #23282d;&quot;&gt;&quot;Test1&quot;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://www.tech-girlz.com/2020/12/excel-line-break.html&quot;&gt;https://www.tech-girlz.com/2020/12/excel-line-break.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/7857685822644356565/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/7857685822644356565' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7857685822644356565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7857685822644356565'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2023/07/excel-breakline-in-cell-with-function.html' title='[Excel] breakline in cell with function (換行)'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-5800383945865537807</id><published>2023-07-21T17:11:00.002+08:00</published><updated>2023-07-21T17:11:11.875+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><category scheme="http://www.blogger.com/atom/ns#" term="mvn"/><title type='text'>[maven]  mvn package &quot;Could not find or load main class&quot;</title><content type='html'>&lt;p&gt;&amp;nbsp;If you use &quot;mvn package&quot; and get a jar but cannot execute and get &quot;&lt;span class=&quot;hljs-title class_&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-literal); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;Could&lt;/span&gt;&lt;span style=&quot;color: var(--highlight-color); font-family: inherit; font-size: var(--_pr-code-fs); font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt; not find or load main &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-keyword); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;class&lt;/span&gt;&lt;span style=&quot;color: var(--highlight-color); font-family: inherit; font-size: var(--_pr-code-fs); font-style: inherit; font-variant-caps: inherit; font-variant-ligatures: inherit; font-weight: inherit; white-space: inherit;&quot;&gt;&lt;/span&gt;&quot;.&lt;/p&gt;&lt;p&gt;You need to add this maven plugins in your pom.xml. Then you can solve this problem when use &quot;mvn package&quot;. But you&#39;ll have another problem, NoClassDefFound, see this link&amp;nbsp;&lt;a href=&quot;https://ysde.blogspot.com/2023/07/maven-mvn-package-jar-execution-get.html&quot; target=&quot;_blank&quot;&gt;Solve NoClassDefFound issue&lt;/a&gt;&amp;nbsp;to solve it.&lt;/p&gt;&lt;pre class=&quot;default s-code-block&quot; style=&quot;--_cb-line-numbers-bg: var(--black-050); border-radius: var(--br-md); border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--fs-body1); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variation-settings: inherit; line-height: var(--lh-md); margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;hljs language-xml&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--_pr-code-fs); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;    &amp;lt;build&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default s-code-block&quot; style=&quot;--_cb-line-numbers-bg: var(--black-050); border-radius: var(--br-md); border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--fs-body1); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variation-settings: inherit; line-height: var(--lh-md); margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;hljs language-xml&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--_pr-code-fs); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;      &amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;plugins&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;org.apache.maven.plugins&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;groupId&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;maven-jar-plugin&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;artifactId&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;2.4&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;version&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;archive&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;index&lt;/span&gt;&amp;gt;&lt;/span&gt;true&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;index&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;manifest&lt;/span&gt;&amp;gt;&lt;/span&gt;
                        &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;mainClass&lt;/span&gt;&amp;gt;&lt;/span&gt;your.package.yourprogram.YourMainClass&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;mainClass&lt;/span&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;manifest&lt;/span&gt;&amp;gt;&lt;/span&gt;
                &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;archive&lt;/span&gt;&amp;gt;&lt;/span&gt;
            &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;configuration&lt;/span&gt;&amp;gt;&lt;/span&gt;
        &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;plugin&lt;/span&gt;&amp;gt;&lt;/span&gt;
     &lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;border: 0px; box-sizing: inherit; color: var(--highlight-namespace); font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;plugins&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;default s-code-block&quot; style=&quot;--_cb-line-numbers-bg: var(--black-050); border-radius: var(--br-md); border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--fs-body1); font-stretch: inherit; font-variant-alternates: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; font-variation-settings: inherit; line-height: var(--lh-md); margin-bottom: calc(1.5em); margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: var(--su12); vertical-align: baseline; width: auto;&quot;&gt;&lt;code class=&quot;hljs language-xml&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: var(--_pr-code-fs); font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;border: 0px; box-sizing: inherit; font-family: inherit; font-feature-settings: inherit; font-kerning: inherit; font-optical-sizing: inherit; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-variation-settings: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&amp;lt;/build&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/29366373/maven-error-could-not-find-or-load-main-class&quot;&gt;https://stackoverflow.com/questions/29366373/maven-error-could-not-find-or-load-main-class&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/5800383945865537807/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/5800383945865537807' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5800383945865537807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5800383945865537807'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2023/07/maven-mvn-package-could-not-find-or.html' title='[maven]  mvn package &quot;Could not find or load main class&quot;'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-1732244735753054245</id><published>2023-07-21T17:09:00.002+08:00</published><updated>2023-07-21T17:09:32.756+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>[maven] mvn package jar execution get java.lang.NoClassDefFoundError</title><content type='html'>&lt;p&gt;You have to add this &quot;maven-shade-plugin&quot; maven plugin, then you can finally get a executable jar.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgofJ9k0Oso-11GQ_mgdQ_Qae75IpPdEpZTDb9sUVgwbTcgZD7RnhfBjJEWZ9Omyl2v6pONnWIBzI_99ZHScXhwjrbBhSSO6fuOEUHZY82aWUzHi0uUwgl4gxaei8Anp5MTKUXs6v2t7IzjzSLIf4GkMA-J8_0PuoNhbrsl5Xjsnh3SxrfvhO0o7wCHUDBH&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;1000&quot; data-original-width=&quot;1310&quot; height=&quot;490&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgofJ9k0Oso-11GQ_mgdQ_Qae75IpPdEpZTDb9sUVgwbTcgZD7RnhfBjJEWZ9Omyl2v6pONnWIBzI_99ZHScXhwjrbBhSSO6fuOEUHZY82aWUzHi0uUwgl4gxaei8Anp5MTKUXs6v2t7IzjzSLIf4GkMA-J8_0PuoNhbrsl5Xjsnh3SxrfvhO0o7wCHUDBH=w640-h490&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/1732244735753054245/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/1732244735753054245' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1732244735753054245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1732244735753054245'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2023/07/maven-mvn-package-jar-execution-get.html' title='[maven] mvn package jar execution get java.lang.NoClassDefFoundError'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgofJ9k0Oso-11GQ_mgdQ_Qae75IpPdEpZTDb9sUVgwbTcgZD7RnhfBjJEWZ9Omyl2v6pONnWIBzI_99ZHScXhwjrbBhSSO6fuOEUHZY82aWUzHi0uUwgl4gxaei8Anp5MTKUXs6v2t7IzjzSLIf4GkMA-J8_0PuoNhbrsl5Xjsnh3SxrfvhO0o7wCHUDBH=s72-w640-h490-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-5386687472371109451</id><published>2023-06-16T14:57:00.006+08:00</published><updated>2023-06-16T14:57:40.798+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CORS"/><category scheme="http://www.blogger.com/atom/ns#" term="Nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="springboot"/><title type='text'>[Springboog][Nginx] invalid cors request </title><content type='html'>&lt;p&gt;Springboot application originally behind the IHS server, and there&#39;s no CORS issue on the browser side. But after we changed the IHS server to Nginx as reverse proxy, client reported that they got CORS issue with http status 403.&lt;/p&gt;&lt;p&gt;We&#39;ve add all the CORS response header, but no help. The springboot application kept returning the 403 status.&lt;/p&gt;&lt;p&gt;After googling around, found the solution,&lt;/p&gt;&lt;p&gt;Set the header Origin to &quot;&quot; solve it.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;comment-copy&quot;&gt;&lt;code&gt;proxy_set_header Origin &quot;&quot;;&lt;/code&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;參考資料：&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/46865387/spring-boot-cors-behind-reverse-proxy-on-non-default-port&quot;&gt;https://stackoverflow.com/questions/46865387/spring-boot-cors-behind-reverse-proxy-on-non-default-port&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/5386687472371109451/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/5386687472371109451' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5386687472371109451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5386687472371109451'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2023/06/springboognginx-invalid-cors-request.html' title='[Springboog][Nginx] invalid cors request '/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-7877840362838390460</id><published>2022-12-01T18:17:00.001+08:00</published><updated>2022-12-01T18:17:03.779+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Postgres"/><title type='text'>[Postgres][Partition] show partitions of a table</title><content type='html'>&lt;p&gt;This sql query can show the partitions of the table, just change &lt;span style=&quot;color: red;&quot;&gt;XXX&lt;/span&gt; to the parent (master) table name.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;SELECT&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nmsp_parent.nspname AS parent_schema,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; parent.relname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS parent,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; nmsp_child.nspname&amp;nbsp; AS child_schema,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; child.relname&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AS child&lt;br /&gt;FROM pg_inherits&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN pg_class parent&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON pg_inherits.inhparent = parent.oid&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN pg_class child&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ON pg_inherits.inhrelid&amp;nbsp;&amp;nbsp; = child.oid&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN pg_namespace nmsp_parent&amp;nbsp;&amp;nbsp; ON nmsp_parent.oid&amp;nbsp; = parent.relnamespace&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JOIN pg_namespace nmsp_child&amp;nbsp;&amp;nbsp;&amp;nbsp; ON nmsp_child.oid&amp;nbsp;&amp;nbsp; = child.relnamespace&lt;br /&gt;WHERE parent.relname=&#39;&lt;span style=&quot;color: red;&quot;&gt;XXX&lt;/span&gt;&#39;; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://dba.stackexchange.com/questions/40441/get-all-partition-names-for-a-table&quot;&gt;https://dba.stackexchange.com/questions/40441/get-all-partition-names-for-a-table&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/7877840362838390460/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/7877840362838390460' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7877840362838390460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7877840362838390460'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/12/postgrespartition-show-partitions-of.html' title='[Postgres][Partition] show partitions of a table'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-1374541851181578594</id><published>2022-11-15T10:41:00.005+08:00</published><updated>2022-11-15T10:41:38.580+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="m1"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="rbenv"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>[rbenv][mac][M1] implicit declaration of function &#39;ffi_prep_closure&#39; is invalid in C99</title><content type='html'>&lt;p&gt;I tried using rbenv to install ruby &lt;span style=&quot;color: red;&quot;&gt;2.7.1&lt;/span&gt; on macbook M1 but failed.&lt;/p&gt;&lt;p&gt;Found the error message in the log like this:&lt;/p&gt;&lt;pre class=&quot;notranslate&quot; style=&quot;border-radius: 6px; box-sizing: border-box; color: #24292f; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 12px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;&quot;&gt;&lt;pre class=&quot;notranslate&quot; style=&quot;border-radius: 6px; box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px;&quot;&gt;&lt;code style=&quot;background-attachment: initial; background-clip: initial; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;&quot;&gt;closure.c:263:14: error: implicit declaration of function &#39;ffi_prep_closure&#39; is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    result = ffi_prep_closure(pcl, cif, callback, (void *)self);&lt;/code&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;p&gt;This &lt;a href=&quot;https://github.com/ffi/ffi/issues/869&quot;&gt;link&lt;/a&gt; helps me solve this issue, use the RUBY_CFLAGS solve it.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;RUBY_CFLAGS=-DUSE_FFI_CLOSURE_ALLOC rbenv install 2.7.1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/ffi/ffi/issues/869&quot;&gt;https://github.com/ffi/ffi/issues/869&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/1374541851181578594/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/1374541851181578594' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1374541851181578594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1374541851181578594'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/11/rbenvmacm1-implicit-declaration-of.html' title='[rbenv][mac][M1] implicit declaration of function &#39;ffi_prep_closure&#39; is invalid in C99'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-3667947504676075134</id><published>2022-11-13T21:36:00.002+08:00</published><updated>2022-11-25T20:17:12.009+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="concurrent"/><category scheme="http://www.blogger.com/atom/ns#" term="index"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="ror"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><title type='text'>[ROR][migration] add index without downtime (concurrently)</title><content type='html'>&lt;p&gt;Use &lt;span style=&quot;color: red;&quot;&gt;:algorithm =&amp;gt; :concurrently&lt;/span&gt; to indicate that you want to build index concurrently&lt;/p&gt;&lt;pre class=&quot;wp-block-code pre code&quot;&gt;&lt;code class=&quot;&quot;&gt;class AddIndexToBuildMetricIdOnBuilds &amp;lt; ActiveRecord::Migration
  &lt;span style=&quot;color: red;&quot;&gt;disable_ddl_transaction!&lt;/span&gt;

  def change
    add_index :builds, :build_metric_id, &lt;span style=&quot;color: red;&quot;&gt;:algorithm =&amp;gt; :concurrently&lt;/span&gt;
  end
end&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;But there&#39;s a point need to be noticed: (quote from the reference link)&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Keep in mind that while concurrent index building is a safe option for 
your production system, the build itself takes up to several times 
longer to complete. The database must perform two scans of the table, 
and it must wait for all existing transactions that could modify or use 
the index to terminate. The concurrent index build also imposes extra 
CPU and I/O load that might slow down other database operations.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://semaphoreci.com/blog/2017/06/21/faster-rails-indexing-large-database-tables.html&quot;&gt;https://semaphoreci.com/blog/2017/06/21/faster-rails-indexing-large-database-tables.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/3667947504676075134/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/3667947504676075134' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3667947504676075134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3667947504676075134'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/11/rormigration-add-index-without-downtime.html' title='[ROR][migration] add index without downtime (concurrently)'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-4216013826381128926</id><published>2022-05-27T18:38:00.004+08:00</published><updated>2022-11-15T13:44:03.136+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="Postgres"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><title type='text'>[ror][bundle][mac m1][postgres] bundle install pg Can&#39;t find the &#39;libpq-fe.h header</title><content type='html'>&lt;p&gt;I got this error while executing &quot;&lt;span style=&quot;color: red;&quot;&gt;bundle install&lt;/span&gt;&quot; command&lt;/p&gt;&lt;p&gt;&quot;Can&#39;t find the &#39;libpq-fe.h header&quot;&lt;/p&gt;&lt;p&gt;&quot;brew install postgresql&quot; and then &quot;bundle install&quot; again solves this issue&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/6040583/cant-find-the-libpq-fe-h-header-when-trying-to-install-pg-gem&quot;&gt;https://stackoverflow.com/questions/6040583/cant-find-the-libpq-fe-h-header-when-trying-to-install-pg-gem&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/4216013826381128926/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/4216013826381128926' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/4216013826381128926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/4216013826381128926'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/05/mac-bundle-install-pg-cant-find-libpq.html' title='[ror][bundle][mac m1][postgres] bundle install pg Can&#39;t find the &#39;libpq-fe.h header'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-1445730918165675819</id><published>2022-05-24T16:51:00.003+08:00</published><updated>2022-09-05T22:21:48.121+08:00</updated><title type='text'>[ROR] ruby on rails 101, &amp;., ::, @</title><content type='html'>&lt;p&gt;I&#39;m writing this post is to write down the questions that people, who has experiences of using other programming languages, usually have when they first see a ROR project.&lt;/p&gt;&lt;p&gt;-------------------------------------------------------------------------------- &lt;br /&gt;&lt;/p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;class Api::V1::OrdersController &amp;lt; Api::V1::ApplicationController&lt;/span&gt;&lt;/p&gt;&lt;p&gt;it means this class OrdersController is under &lt;span style=&quot;color: #38761d;&quot;&gt;{PROJECT_PATH}/app/controllers/api/v2/&lt;/span&gt;, and it&#39;s ofter written in file&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;orders_controller.rb&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;--------------------------------------------------------------------------------&lt;/span&gt; &lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;@test_variable = Api::V2::OrderParamsHandler.new&lt;/span&gt;&lt;/p&gt;&lt;p&gt;@test_variable&amp;nbsp;is an instance variable - and is available to all methods within the class.&lt;/p&gt;&lt;p&gt;Without &quot;@&quot;, it&#39;s a local variable&lt;/p&gt;&lt;p&gt;&amp;nbsp;-------------------------------------------------------------------------- &lt;br /&gt;&lt;/p&gt;&lt;span&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;@object&amp;amp;.method &lt;/span&gt;&lt;br /&gt;&lt;p&gt;&quot;&lt;span style=&quot;color: red;&quot;&gt;&amp;amp;.&lt;/span&gt;&quot; is &lt;span style=&quot;color: red;&quot;&gt;safe navigation operator&lt;/span&gt;, introduced in Ruby 2.3.0, it lets you call methods on objects without worrying that the object may be &lt;code&gt;nil.&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&lt;a href=&quot;https://stackoverflow.com/questions/36812647/what-does-ampersand-dot-mean-in-ruby&quot; target=&quot;_blank&quot;&gt;reference&lt;/a&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt;&lt;span&gt;&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;send_data&lt;/span&gt;, is rails builtin function, &lt;a href=&quot;https://apidock.com/rails/ActionController/Streaming/send_data&quot;&gt;ref&lt;/a&gt;, it&#39;s used to return data to browser&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;include Dry::Monads[:result, :do]&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/1445730918165675819/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/1445730918165675819' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1445730918165675819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1445730918165675819'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/05/ror-ruby-on-rails-101.html' title='[ROR] ruby on rails 101, &amp;., ::, @'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-3694606731189546042</id><published>2022-04-17T23:55:00.007+08:00</published><updated>2022-04-17T23:55:40.219+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cookie"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="servlet"/><title type='text'>[java][servlet][cookie] difference between setMaxAge(0), setMaxAge(-1)</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #232629; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-size: 15px;&quot;&gt;The MaxAge of -1 signals that you want the cookie to persist for the duration of the session.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #232629; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-size: 15px;&quot;&gt;If you want the cookie immediately expired, set MaxAge to 0 instead.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #232629; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-size: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; color: #232629; font-family: -apple-system, &amp;quot;system-ui&amp;quot;, &amp;quot;Segoe UI Adjusted&amp;quot;, &amp;quot;Segoe UI&amp;quot;, &amp;quot;Liberation Sans&amp;quot;, sans-serif; font-size: 15px;&quot;&gt;reference:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; font-size: 15px;&quot;&gt;&lt;span style=&quot;color: #232629; font-family: -apple-system, system-ui, Segoe UI Adjusted, Segoe UI, Liberation Sans, sans-serif;&quot;&gt;&lt;a href=&quot;https://stackoverflow.com/a/891042/3859553&quot;&gt;https://stackoverflow.com/a/891042/3859553&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: white; font-size: 15px;&quot;&gt;&lt;span style=&quot;color: #232629; font-family: -apple-system, system-ui, Segoe UI Adjusted, Segoe UI, Liberation Sans, sans-serif;&quot;&gt;&lt;a href=&quot;https://docs.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge%28int%29&quot;&gt;https://docs.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge%28int%29&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/3694606731189546042/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/3694606731189546042' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3694606731189546042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3694606731189546042'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/04/javaservletcookie-difference-between.html' title='[java][servlet][cookie] difference between setMaxAge(0), setMaxAge(-1)'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-1819118987465507784</id><published>2022-04-07T13:04:00.002+08:00</published><updated>2022-04-07T13:04:40.518+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="all in one seo"/><category scheme="http://www.blogger.com/atom/ns#" term="seo"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress"/><category scheme="http://www.blogger.com/atom/ns#" term="yoast seo"/><title type='text'>[wordpress][all in one seo][yoast seo] sitemap 404</title><content type='html'>&lt;p&gt;If you generate the sitemap by using plugin like &quot;&lt;span style=&quot;color: red;&quot;&gt;all in one seo&lt;/span&gt;&quot; or &quot;&lt;span style=&quot;color: red;&quot;&gt;yoast seo&lt;/span&gt;&quot; , and you have 404 issue when you try to generate it.&lt;/p&gt;&lt;p&gt;It&#39;s probably the &lt;span style=&quot;color: red;&quot;&gt;.htaccess&lt;/span&gt; issue.&lt;/p&gt;&lt;p&gt;In my case, I added the following rules in &lt;span style=&quot;color: red;&quot;&gt;.htaccess&lt;/span&gt; and then worked immediately.&lt;/p&gt;&lt;pre class=&quot;wp-block-code line-numbers language-apacheconf&quot; style=&quot;background-color: #f8f8f8; border-radius: 2px; border: 1px solid rgb(238, 238, 238); color: #444444; font-family: Consolas, &amp;quot;bitstream vera sans mono&amp;quot;, &amp;quot;courier new&amp;quot;, Courier, monospace !important; font-size: 0.875rem; line-height: 1.25rem; margin-bottom: 10px; margin-top: 0px; overflow-wrap: break-word; overflow: hidden; padding: 8px; white-space: pre-wrap; word-break: break-all;&quot; tabindex=&quot;0&quot;&gt;&lt;code class=&quot;language-apacheconf&quot; lang=&quot;apacheconf&quot; style=&quot;background-color: transparent; border-radius: 3px; border: 0px; color: inherit; font-family: Consolas, &amp;quot;bitstream vera sans mono&amp;quot;, &amp;quot;courier new&amp;quot;, Courier, monospace !important; font-size: 0.875rem; overflow-wrap: break-word; padding: 0px; word-break: break-all;&quot;&gt;&lt;span class=&quot;token comment&quot; style=&quot;padding: 12px 0px 10px;&quot;&gt;# Yoast SEO - XML Sitemap Rewrite Fix&lt;/span&gt;
&lt;span class=&quot;token directive-inline property&quot;&gt;RewriteEngine&lt;/span&gt; On
&lt;span class=&quot;token directive-inline property&quot;&gt;RewriteBase&lt;/span&gt; /
&lt;span class=&quot;token directive-inline property&quot;&gt;RewriteRule&lt;/span&gt;&lt;span class=&quot;token regex&quot;&gt; ^sitemap_index.xml$&lt;/span&gt; /index.php?sitemap=1 &lt;span class=&quot;token directive-flags keyword&quot;&gt;[L]&lt;/span&gt;
&lt;span class=&quot;token directive-inline property&quot;&gt;RewriteRule&lt;/span&gt;&lt;span class=&quot;token regex&quot;&gt; ^locations.kml$&lt;/span&gt; /index.php?sitemap=wpseo_local_kml &lt;span class=&quot;token directive-flags keyword&quot;&gt;[L]&lt;/span&gt;
&lt;span class=&quot;token directive-inline property&quot;&gt;RewriteRule&lt;/span&gt;&lt;span class=&quot;token regex&quot;&gt; ^geo_sitemap.xml$&lt;/span&gt; /index.php?sitemap=geo &lt;span class=&quot;token directive-flags keyword&quot;&gt;[L]&lt;/span&gt;
&lt;span class=&quot;token directive-inline property&quot;&gt;RewriteRule&lt;/span&gt;&lt;span class=&quot;token regex&quot;&gt; ^([^/]+?)-sitemap([0-9]+)?.xml$&lt;/span&gt; /index.php?sitemap=&lt;span class=&quot;token variable&quot;&gt;$1&lt;/span&gt;&amp;amp;sitemap_n=&lt;span class=&quot;token variable&quot;&gt;$2&lt;/span&gt; &lt;span class=&quot;token directive-flags keyword&quot;&gt;[L]&lt;/span&gt;
&lt;span class=&quot;token directive-inline property&quot;&gt;RewriteRule&lt;/span&gt;&lt;span class=&quot;token regex&quot;&gt; ^([a-z]+)?-?sitemap.xsl$&lt;/span&gt; /index.php?yoast-sitemap-xsl=&lt;span class=&quot;token variable&quot;&gt;$1&lt;/span&gt; &lt;span class=&quot;token directive-flags keyword&quot;&gt;[L]&lt;/span&gt;
&lt;span class=&quot;token comment&quot; style=&quot;padding: 12px 0px 10px;&quot;&gt;# END Yoast SEO - XML Sitemap Rewrite Fix&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://7zht.com/index.php/jjwzxzddtcxdcw.html&quot;&gt;https://7zht.com/index.php/jjwzxzddtcxdcw.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/1819118987465507784/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/1819118987465507784' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1819118987465507784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1819118987465507784'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/04/wordpressall-in-one-seoyoast-seo.html' title='[wordpress][all in one seo][yoast seo] sitemap 404'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-5544755856860291333</id><published>2022-04-04T16:06:00.005+08:00</published><updated>2022-04-04T16:06:38.445+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="iptable"/><category scheme="http://www.blogger.com/atom/ns#" term="oracle cloud"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>[oracle cloud] http 80 port access denied</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Try to set up a http service on oracle cloud free tier &lt;span style=&quot;color: red;&quot;&gt;ubuntu&lt;/span&gt; instance, but get access denied.&lt;/p&gt;&lt;p&gt;Add the ingress rule but still access denied.&lt;/p&gt;&lt;p&gt;It turns out it&#39;s the &lt;span style=&quot;color: red;&quot;&gt;iptable&lt;/span&gt; issue.&lt;/p&gt;&lt;p&gt;Use commands below to allow 80 port in iptables.&lt;br /&gt;&lt;/p&gt;&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; orphans: 2; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; color: var(--black-800); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;sudo iptables -I INPUT 6 -m state --state NEW -p tcp --dport 80 -j ACCEPT
sudo netfilter-persistent save&lt;/code&gt;&lt;/pre&gt;&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; orphans: 2; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; color: var(--black-800); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: var(--highlight-bg); border-radius: 5px; border: 0px none; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; letter-spacing: normal; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; vertical-align: baseline; width: auto; word-spacing: 0px;&quot;&gt;&lt;b&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; border: 0px none; box-sizing: inherit; color: var(--black-800); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&amp;nbsp;reference:&lt;/code&gt;&lt;/b&gt;&lt;/pre&gt;&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; orphans: 2; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; color: var(--black-800); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&lt;a href=&quot;https://www.oracle.com/tw/cloud/sign-in.html&quot;&gt;oracle cloud&lt;/a&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; orphans: 2; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;&quot;&gt;&lt;a href=&quot;https://stackoverflow.com/questions/62326988/cant-access-oracle-cloud-always-free-compute-http-port&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; color: var(--black-800); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&amp;nbsp;https://stackoverflow.com/questions/62326988/cant-access-oracle-cloud-always-free-compute-http-port&lt;/code&gt;&lt;/a&gt;&lt;/pre&gt;&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: 1.30769; margin-bottom: calc(var(--s-prose-spacing) + 0.4em); margin-left: 0px; margin-right: 0px; margin-top: 0px; max-height: 600px; orphans: 2; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; color: var(--black-800); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/5544755856860291333/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/5544755856860291333' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5544755856860291333'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5544755856860291333'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/04/oracle-cloud-http-80-port-access-denied.html' title='[oracle cloud] http 80 port access denied'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-7871532777190410491</id><published>2022-04-03T22:32:00.002+08:00</published><updated>2022-04-03T22:32:09.600+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="apache"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="wordpress"/><title type='text'>[ubuntu][wordpress][apache2]  Invalid command &#39;SSLEngine&#39;</title><content type='html'>&lt;p&gt;&amp;nbsp;If you use SSL setting in you wordpress and has error &quot;&lt;span style=&quot;color: red;&quot;&gt;Invalid command SSLEngine&lt;/span&gt;&quot;&lt;/p&gt;&lt;pre style=&quot;-webkit-text-stroke-width: 0px; background-color: var(--highlight-bg); border-radius: 5px; border: 0px; box-sizing: inherit; color: var(--highlight-color); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: normal; font-variant-caps: normal; font-variant-east-asian: inherit; font-variant-ligatures: normal; font-variant-numeric: inherit; font-weight: 400; letter-spacing: normal; line-height: 1.30769; margin: 0px; max-height: 600px; orphans: 2; overflow-wrap: normal; overflow: auto; padding: 12px; text-align: left; text-decoration-color: initial; text-decoration-style: initial; text-decoration-thickness: initial; text-indent: 0px; text-transform: none; vertical-align: baseline; widows: 2; width: auto; word-spacing: 0px;&quot;&gt;&lt;code style=&quot;background-color: transparent; border-radius: 0px; border: 0px; box-sizing: inherit; color: var(--black-800); font-family: var(--ff-mono); font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;&quot;&gt;SSLEngine on
    SSLCertificateFile /xxxxx/server.crt
    SSLCertificateKeyFile /xxxxx/server.key
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;Then just turn it on by using this command:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;nbsp;sudo a2enmod ssl&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://unix.stackexchange.com/questions/31378/apache2-invalid-command-sslengine&quot;&gt;https://unix.stackexchange.com/questions/31378/apache2-invalid-command-sslengine&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/7871532777190410491/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/7871532777190410491' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7871532777190410491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7871532777190410491'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/04/ubuntuwordpressapache2-invalid-command.html' title='[ubuntu][wordpress][apache2]  Invalid command &#39;SSLEngine&#39;'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-5104591875578314004</id><published>2022-03-28T15:47:00.004+08:00</published><updated>2022-03-30T22:49:54.637+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="m1"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="podman"/><title type='text'>[mac][m1][podman] exec container process, Exec format error</title><content type='html'>&lt;p&gt;Using &lt;span style=&quot;color: red;&quot;&gt;mac m1&lt;/span&gt; and &lt;span style=&quot;color: red;&quot;&gt;podman&lt;/span&gt; to run mysql container.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;podman run mysql/mysql-server&lt;/span&gt;&lt;/p&gt;&lt;p&gt;But having issue like this:&lt;/p&gt;&lt;pre style=&quot;border-radius: 6px; box-sizing: border-box; caret-color: rgb(36, 41, 47); color: #24292f; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 11.9px; line-height: 1.45; margin-bottom: 16px; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 16px; text-size-adjust: auto;&quot;&gt;&lt;code style=&quot;border-radius: 6px; border: 0px; box-sizing: border-box; display: inline; font-family: ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace; font-size: 11.9px; line-height: inherit; margin: 0px; overflow-wrap: normal; overflow: visible; padding: 0px; word-break: normal;&quot;&gt;{&quot;msg&quot;:&quot;exec container process `/entrypoint.sh`: Exec format error&quot;,&quot;level&quot;:&quot;error&quot;,&quot;time&quot;:&quot;2021-10-31T01:54:47.000542236Z&quot;}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Following the comment in this &lt;a href=&quot;https://github.com/containers/podman/issues/12144&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt;&amp;nbsp;helps me solve the issue.&lt;/p&gt;&lt;p&gt;Which is Installing &lt;span style=&quot;color: red;&quot;&gt;qemu-user-static&lt;/span&gt; in the &lt;span style=&quot;color: red;&quot;&gt;podman machine&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace&quot; style=&quot;background-color: rgba(175, 184, 193, 0.2); caret-color: rgb(36, 41, 47); color: #24292f; font-size: 11.9px; text-size-adjust: auto;&quot;&gt;podman machine ssh sudo rpm-ostree install qemu-user-static&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span face=&quot;ui-monospace, SFMono-Regular, &amp;quot;SF Mono&amp;quot;, Menlo, Consolas, &amp;quot;Liberation Mono&amp;quot;, monospace&quot; style=&quot;background-color: rgba(175, 184, 193, 0.2); caret-color: rgb(36, 41, 47); color: #24292f; font-size: 11.9px; text-size-adjust: auto;&quot;&gt;podman machine ssh sudo systemctl reboot&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Then &lt;span style=&quot;color: red;&quot;&gt;podman run mysql/mysql-server&amp;nbsp;&lt;/span&gt;works.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/containers/podman/issues/12144&quot;&gt;https://github.com/containers/podman/issues/12144&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://podman.io/blogs/2021/09/06/podman-on-macs.html&quot; target=&quot;_blank&quot;&gt;how to install podman on mac&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/5104591875578314004/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/5104591875578314004' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5104591875578314004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5104591875578314004'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/03/macm1podman-exec-container-process-exec.html' title='[mac][m1][podman] exec container process, Exec format error'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-7228754621209021218</id><published>2022-03-24T18:02:00.007+08:00</published><updated>2022-03-24T18:02:57.142+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="S3"/><title type='text'>[ruby][aws] aws sdk s3 permission denied</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Add acl:&#39;public-read&#39; when using &lt;span style=&quot;color: red;&quot;&gt;upload_file&lt;span style=&quot;color: black;&quot;&gt; to allow public read of this uploaded object&lt;/span&gt;&lt;/span&gt; &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class=&quot;lang-rb s-code-block&quot;&gt;&lt;code class=&quot;hljs language-ruby&quot;&gt;object.upload_file(file_to_upload, &lt;span class=&quot;hljs-symbol&quot;&gt;acl:&lt;/span&gt;&lt;span class=&quot;hljs-string&quot;&gt;&#39;public-read&#39;&lt;/span&gt;)&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/28980264/ruby-aws-sdk-v2-public-url-access-denied-issue&quot;&gt;https://stackoverflow.com/questions/28980264/ruby-aws-sdk-v2-public-url-access-denied-issue&lt;/a&gt; &lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/7228754621209021218/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/7228754621209021218' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7228754621209021218'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7228754621209021218'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/03/rubyaws-aws-sdk-s3-permission-denied.html' title='[ruby][aws] aws sdk s3 permission denied'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-5046648416430905428</id><published>2022-03-24T17:47:00.001+08:00</published><updated>2022-03-24T17:47:04.961+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="m1"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="rbenv"/><title type='text'>[mac][m1][rbenv] bundle install mysql error</title><content type='html'>&lt;p&gt;In a rails project execute &lt;span style=&quot;color: red;&quot;&gt;bundle install&lt;/span&gt; has this error message&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class=&quot;lang-rb s-code-block&quot;&gt;&lt;code class=&quot;hljs language-ruby&quot;&gt;An error occurred &lt;span class=&quot;hljs-keyword&quot;&gt;while&lt;/span&gt; installing mysql2 (&lt;span class=&quot;hljs-number&quot;&gt;0.5&lt;/span&gt;.&lt;span class=&quot;hljs-number&quot;&gt;2&lt;/span&gt;), &lt;span class=&quot;hljs-keyword&quot;&gt;and&lt;/span&gt; Bundler cannot continue.
Make sure that &lt;span class=&quot;hljs-string&quot;&gt;`gem install mysql2 -v &#39;0.5.2&#39; --source &#39;https://rubygems.org/&#39;`&lt;/span&gt; succeeds
before bundling.&lt;/code&gt;&lt;/pre&gt;&lt;pre class=&quot;lang-rb s-code-block&quot;&gt;&lt;code class=&quot;hljs language-ruby&quot;&gt;&amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;And then follow this instruction but still has error.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;gem install mysql2 -v &#39;0.5.3&#39; --source &#39;https://rubygems.org/&#39; &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;linking shared-object mysql2/mysql2.bundle&lt;br /&gt;ld: library not found for -lzstd&lt;br /&gt;clang: error: linker command failed with exit code 1 (use -v to see invocation)&lt;br /&gt;make: *** [mysql2.bundle] Error 1&lt;br /&gt;&lt;br /&gt;make failed, exit code 2 &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This &lt;a href=&quot;https://stackoverflow.com/questions/67631572/rails-mysql-on-apple-silicon/67855079#67855079 &quot;&gt;link&lt;/a&gt; saved me, follow this command. (Change the mysql version accordingly)&lt;/p&gt;&lt;pre class=&quot;lang-sql s-code-block&quot;&gt;&lt;code class=&quot;hljs language-sql&quot;&gt;rbenv &lt;span class=&quot;hljs-keyword&quot;&gt;exec&lt;/span&gt; gem install mysql2 &lt;span class=&quot;hljs-comment&quot;&gt;-- \&lt;/span&gt;
&lt;span class=&quot;hljs-comment&quot;&gt;--with-mysql-lib=/opt/homebrew/Cellar/mysql/&lt;span style=&quot;color: red;&quot;&gt;8.0.25_1&lt;/span&gt;/lib \&lt;/span&gt;
&lt;span class=&quot;hljs-comment&quot;&gt;--with-mysql-dir=/opt/homebrew/Cellar/mysql/&lt;span style=&quot;color: red;&quot;&gt;8.0.25_1&lt;/span&gt; \&lt;/span&gt;
&lt;span class=&quot;hljs-comment&quot;&gt;--with-mysql-config=/opt/homebrew/Cellar/mysql/&lt;span style=&quot;color: red;&quot;&gt;8.0.25_1&lt;/span&gt;/bin/mysql_config \&lt;/span&gt;
&lt;span class=&quot;hljs-comment&quot;&gt;--with-mysql-include=/opt/homebrew/Cellar/mysql/&lt;span style=&quot;color: red;&quot;&gt;8.0.25_1&lt;/span&gt;/include &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;And then &lt;span style=&quot;color: red;&quot;&gt;`bundle install`&lt;/span&gt; again.&lt;/p&gt;&lt;p&gt;&amp;nbsp;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/67631572/rails-mysql-on-apple-silicon/67855079#67855079&quot;&gt;https://stackoverflow.com/questions/67631572/rails-mysql-on-apple-silicon/67855079#67855079 &lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/5046648416430905428/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/5046648416430905428' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5046648416430905428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/5046648416430905428'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/03/macm1rbenv-bundle-install-mysql-error.html' title='[mac][m1][rbenv] bundle install mysql error'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-6426522811953391935</id><published>2022-01-27T13:04:00.001+08:00</published><updated>2022-01-27T13:04:30.516+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="pytube"/><title type='text'>[Python][pytube] __init__: could not find match for ^\w+\W</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you use &lt;span style=&quot;color: red;&quot;&gt;pytube&lt;/span&gt; and encountered a error: &lt;br /&gt;&lt;/p&gt;&lt;pre class=&quot;lang-py s-code-block&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;code class=&quot;hljs language-python&quot;&gt;__init__: could &lt;span class=&quot;hljs-keyword&quot;&gt;not&lt;/span&gt; find match &lt;span class=&quot;hljs-keyword&quot;&gt;for&lt;/span&gt; ^\w+\W&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can&amp;nbsp; go to pytube package folder, and edit the &lt;span style=&quot;color: red;&quot;&gt;cipher.py&lt;/span&gt; file, &lt;span style=&quot;color: red;&quot;&gt;line 30&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;Change it from&lt;br /&gt;&lt;/p&gt;&lt;pre class=&quot;lang-py s-code-block&quot;&gt;&lt;code class=&quot;hljs language-python&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;var_regex = re.&lt;span class=&quot;hljs-built_in&quot;&gt;compile&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;r&quot;^\w+\W&quot;&lt;/span&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to this line&lt;br /&gt;&lt;/p&gt;
&lt;pre class=&quot;lang-py s-code-block&quot;&gt;&lt;code class=&quot;hljs language-python&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;var_regex = re.&lt;span class=&quot;hljs-built_in&quot;&gt;compile&lt;/span&gt;(&lt;span class=&quot;hljs-string&quot;&gt;r&quot;^\$*\w+\W&quot;&lt;/span&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Reference:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/70776558/pytube-exceptions-regexmatcherror-init-could-not-find-match-for-w-w&quot;&gt;https://stackoverflow.com/questions/70776558/pytube-exceptions-regexmatcherror-init-could-not-find-match-for-w-w&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/pytube/pytube/issues/1199&quot; target=&quot;_blank&quot;&gt;&amp;nbsp;https://github.com/pytube/pytube/issues/1199&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/6426522811953391935/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/6426522811953391935' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/6426522811953391935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/6426522811953391935'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/01/pythonpytube-init-could-not-find-match.html' title='[Python][pytube] __init__: could not find match for ^\w+\W'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-7873979685689083959</id><published>2022-01-18T18:23:00.003+08:00</published><updated>2022-01-18T18:24:46.136+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="youtube"/><title type='text'>[Youtube]  youtube download (youtube下載)</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;下載影片(vide download)（不一定會有最高清的選項）&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://yt1s.com/zh-tw104&quot;&gt;https://yt1s.com/zh-tw104&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;字幕下載(sub download)：&lt;/p&gt;&lt;p&gt;這兩個可以換著用，一個找不到另一個可能會有&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://downsub.com/&quot;&gt;https://downsub.com/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://savesubs.com/&quot;&gt;https://savesubs.com/&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/7873979685689083959/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/7873979685689083959' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7873979685689083959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/7873979685689083959'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/01/youtube-youtube-download.html' title='[Youtube]  youtube download (youtube下載)'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-3306511593214056194</id><published>2022-01-17T17:35:00.002+08:00</published><updated>2022-01-18T18:20:15.011+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="tomcat"/><title type='text'>[AWS][Loadbalancer] Health checks failed with these codes: [404]</title><content type='html'>&lt;p&gt;The ALB or ELB give the message &quot;&lt;span face=&quot;&amp;quot;Amazon Ember&amp;quot;, &amp;quot;Helvetica Neue&amp;quot;, Roboto, Arial, sans-serif&quot; style=&quot;-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; caret-color: rgb(22, 25, 31); color: #16191f; display: inline; float: none; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-decoration: none; text-indent: 0px; text-size-adjust: auto; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;&quot;&gt;Health checks failed with these codes: [404]&lt;/span&gt;&quot; of my tomcat applications.&lt;/p&gt;&lt;p&gt;But the healthcheck endpoint is good while I test it manually.&lt;/p&gt;&lt;p&gt;It turns out that tomcat will verify the request header&#39;s &quot;&lt;span style=&quot;color: red;&quot;&gt;host&lt;/span&gt;&quot; field.&lt;/p&gt;&lt;p&gt;The ALB or ELB will send &quot;HealthCheck&quot; request to the target instance with request header &quot;host: instance_private_ip&quot;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;And my tomcat setting has only &lt;span style=&quot;color: red;&quot;&gt;&amp;lt;Host name=&quot;domain_name&quot;&amp;gt;&amp;lt;/Host&amp;gt;&lt;/span&gt; for the instance , no &lt;span style=&quot;color: red;&quot;&gt;&amp;lt;Host name=&quot;private ip&quot;&amp;gt;&amp;lt;/Host&amp;gt;&lt;/span&gt; for the private ip.&lt;/p&gt;&lt;p&gt;======================================&lt;/p&gt;&lt;p&gt;So there are &lt;span style=&quot;color: red;&quot;&gt;2 solutions here&lt;/span&gt;:&lt;/p&gt;&lt;p&gt;1. Adding a &amp;lt;Alias&amp;gt;my instance private ip&amp;lt;/Alias&amp;gt; in the &amp;lt;Host&amp;gt; setting. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. Adding another host for the private ip &amp;lt;Host name=&quot;private ip&quot;&amp;gt;&amp;lt;/Host&amp;gt;.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I choose 1. Because tomcat will deploy twice if you have two host blocks for the same app.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/&quot;&gt;https://aws.amazon.com/premiumsupport/knowledge-center/elb-fix-failing-health-checks-alb/&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/3306511593214056194/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/3306511593214056194' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3306511593214056194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3306511593214056194'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2022/01/awsloadbalancer-health-checks-failed.html' title='[AWS][Loadbalancer] Health checks failed with these codes: [404]'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-8914117663614923846</id><published>2020-11-27T12:58:00.006+08:00</published><updated>2020-11-27T12:58:43.972+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><category scheme="http://www.blogger.com/atom/ns#" term="sqlalchemy"/><title type='text'>[Python][SqlAlchemy] orm object to dict</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Base = declarative_base()&lt;/p&gt;&lt;p&gt;def to_dict(self):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; return {c.name: getattr(self, c.name, None) for c in self.__table__.columns}&lt;/p&gt;&lt;p&gt;Base.to_dict = to_dict&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;class TestToDict(Base):&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; __tablename__ = &#39;test_table&#39;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; id = Column(Integer, primary_key=True)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; description = Column(String)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; testfield1 = Column(String)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;TestToDict().to_dict()&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://segmentfault.com/a/1190000002768198&quot;&gt;https://segmentfault.com/a/1190000002768198&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/8914117663614923846/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/8914117663614923846' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/8914117663614923846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/8914117663614923846'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2020/11/pythonsqlalchemy-orm-object-to-dict.html' title='[Python][SqlAlchemy] orm object to dict'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-8837307072707794293</id><published>2020-09-15T14:57:00.000+08:00</published><updated>2020-09-15T14:57:05.098+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Nginx"/><title type='text'>[Nginx] nginx 101, beginner&#39;s guide</title><content type='html'>&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;Nginx has one master process and several worker processes&lt;/span&gt;. The main purpose of the master process is to read and evaluate configuration, and maintain worker processes. Worker processes do actual processing of requests. nginx employs event-based model and OS-dependent mechanisms to efficiently distribute requests among worker processes. The number of worker processes is defined in the configuration file and may be fixed for a given configuration or automatically adjusted to the number of available CPU cores (see&amp;nbsp;&lt;a href=&quot;http://nginx.org/en/docs/ngx_core_module.html#worker_processes&quot;&gt;worker_processes&lt;/a&gt;).&lt;/p&gt;&lt;p style=&quot;background-color: white; font-family: sans-serif; text-align: justify;&quot;&gt;The way nginx and its modules work is determined in the configuration file. By default, the configuration file is named&amp;nbsp;&lt;code&gt;nginx.conf&lt;/code&gt;&amp;nbsp;and placed in the directory&amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;/usr/local/nginx/conf&lt;/span&gt;, &lt;span style=&quot;color: red;&quot;&gt;/etc/nginx&lt;/span&gt;, or &lt;span style=&quot;color: red;&quot;&gt;/usr/local/etc/nginx&lt;/span&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;Configuration file&lt;/h4&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Simple directive:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;name and parameter are separated by spaces.&lt;/li&gt;&lt;li&gt;end with semicolon &quot;;&quot;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Block directive:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;instructions surrounded by braces &quot;{ }&quot;&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;If a block directive can have other directives inside braces, it is called a context (examples:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://nginx.org/en/docs/ngx_core_module.html#events&quot; style=&quot;background-color: white; font-family: sans-serif; text-align: justify;&quot;&gt;events&lt;/a&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_core_module.html#http&quot; style=&quot;background-color: white; font-family: sans-serif; text-align: justify;&quot;&gt;http&lt;/a&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_core_module.html#server&quot; style=&quot;background-color: white; font-family: sans-serif; text-align: justify;&quot;&gt;server&lt;/a&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;, and&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://nginx.org/en/docs/http/ngx_http_core_module.html#location&quot; style=&quot;background-color: white; font-family: sans-serif; text-align: justify;&quot;&gt;location&lt;/a&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;Directives placed in the configuration file outside of any contexts are considered to be in the&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://nginx.org/en/docs/ngx_core_module.html&quot; style=&quot;background-color: white; font-family: sans-serif; text-align: justify;&quot;&gt;main&lt;/a&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;context. The&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;events&lt;/code&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;and&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;http&lt;/code&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;directives reside in the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;main&lt;/code&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;context,&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;server&lt;/code&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;in&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;http&lt;/code&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;, and&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;location&lt;/code&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;in&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;server&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;The rest of a line after the&amp;nbsp;&lt;/span&gt;&lt;code style=&quot;background-color: white; text-align: justify;&quot;&gt;#&lt;/code&gt;&lt;span face=&quot;sans-serif&quot; style=&quot;background-color: white; text-align: justify;&quot;&gt;&amp;nbsp;sign is considered a comment&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Command:&lt;/p&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;nginx -s &lt;i&gt;stop&lt;/i&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;&lt;pre style=&quot;margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;nginx -s &lt;i&gt;reload&lt;/i&gt;&lt;/pre&gt;&lt;pre style=&quot;margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;nginx -s &lt;i&gt;quit&lt;/i&gt;&lt;/pre&gt;&lt;pre style=&quot;margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;nginx -s &lt;i&gt;reopen&lt;/i&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;ul class=&quot;compact&quot; style=&quot;background-color: white; font-family: sans-serif; margin: 0.5em 0px 1em 1em; padding: 0px 0.5em;&quot;&gt;&lt;li style=&quot;padding: 0px 0px 0px 1px; text-align: justify;&quot;&gt;&lt;code&gt;stop&lt;/code&gt;&amp;nbsp;— fast shutdown&lt;/li&gt;&lt;li style=&quot;padding: 0px 0px 0px 1px; text-align: justify;&quot;&gt;&lt;code&gt;quit&lt;/code&gt;&amp;nbsp;— graceful shutdown&lt;/li&gt;&lt;li style=&quot;padding: 0px 0px 0px 1px; text-align: justify;&quot;&gt;&lt;code&gt;reload&lt;/code&gt;&amp;nbsp;— reloading the configuration file&lt;/li&gt;&lt;li style=&quot;padding: 0px 0px 0px 1px; text-align: justify;&quot;&gt;&lt;code&gt;reopen&lt;/code&gt;&amp;nbsp;— reopening the log files&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Basic structure:&lt;/p&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;http {
    server {
    }
}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Serving Static Content, e.g.&lt;/p&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;http {
    server {&lt;/pre&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;      location / {&lt;pre style=&quot;margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;        root /data/www;
      }&lt;/pre&gt;    }
}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Simple Proxy Server, e.g.&lt;/p&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;http {
    server {&lt;/pre&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;      listen 8080;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;&lt;pre style=&quot;margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;      root /data/www;&lt;/pre&gt;&lt;pre style=&quot;margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre style=&quot;background-color: white; margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;      location / { # if location directive has no &#39;root&#39; directive, it will look up in the server block&lt;pre style=&quot;margin-bottom: 0px; margin-top: 0px; padding: 0px;&quot;&gt;      }&lt;/pre&gt;    }
}&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://nginx.org/en/docs/&quot;&gt;http://nginx.org/en/docs/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://nginx.org/en/docs/beginners_guide.html#conf_structure&quot;&gt;http://nginx.org/en/docs/beginners_guide.html#conf_structure&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/8837307072707794293/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/8837307072707794293' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/8837307072707794293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/8837307072707794293'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2020/09/nginx-nginx-101-beginners-guide.html' title='[Nginx] nginx 101, beginner&#39;s guide'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-4986190415637122873</id><published>2020-09-10T15:22:00.004+08:00</published><updated>2020-09-10T15:22:54.791+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Vue"/><title type='text'>[Vue] computed method, getter &quot;this&quot; is undefined</title><content type='html'>&lt;p&gt;This is a not-working code&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;computed: {
      ...mapGetters([
        &lt;/span&gt;&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&#39;authToken&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;,
        &lt;/span&gt;&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&#39;tbLabels&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;,
        &lt;/span&gt;&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&#39;teamBeatsMyTeamValues&#39;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;,
      ]),
      chartData: &lt;/span&gt;&lt;span class=&quot;hljs-function&quot; style=&quot;color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&lt;span class=&quot;hljs-params&quot; style=&quot;color: #dd1144; font-weight: bold;&quot;&gt;()&lt;/span&gt; =&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt; {
        const data = {
          labels: &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; font-weight: bold; white-space: pre;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;.tbLabels,
          series: &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; font-weight: bold; white-space: pre;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;.teamBeatsMyTeamValues,
        };
        &lt;/span&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; font-weight: bold; white-space: pre;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt; data;
      },&amp;nbsp;&lt;/span&gt;&lt;p&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;    },&lt;/span&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This is the working version, computed cannot have &quot;=&amp;gt;&quot; style function, because&amp;nbsp;&lt;a href=&quot;https://forum.vuejs.org/t/getters-into-a-computed-method/5149/4&quot;&gt;https://forum.vuejs.org/t/getters-into-a-computed-method/5149/4&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;color: navy; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;color: #dd1144; font-weight: bold;&quot;&gt;template&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;color: navy; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;color: #dd1144; font-weight: bold;&quot;&gt;chartist&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;ratio&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&quot;ct-major-second&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&quot;Line&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;:data&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&quot;chartData&quot;&lt;/span&gt; &lt;span class=&quot;hljs-attr&quot;&gt;:options&lt;/span&gt;=&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&quot;chartOptions&quot;&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;color: navy; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;color: #dd1144; font-weight: bold;&quot;&gt;chartist&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;color: navy; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;color: #dd1144; font-weight: bold;&quot;&gt;template&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;

&lt;/span&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;color: navy; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&amp;lt;&lt;span class=&quot;hljs-name&quot; style=&quot;color: #dd1144; font-weight: bold;&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;span class=&quot;javascript&quot; style=&quot;color: #333333; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;
  &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;import&lt;/span&gt; { mapActions, mapGetters } &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&#39;vuex&#39;&lt;/span&gt;;

  &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;export&lt;/span&gt; &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;default&lt;/span&gt; {
    &lt;span class=&quot;hljs-attr&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&#39;perceptionBeatChart&#39;&lt;/span&gt;,

    &lt;span class=&quot;hljs-attr&quot;&gt;data&lt;/span&gt;: &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-params&quot;&gt;()&lt;/span&gt; =&amp;gt;&lt;/span&gt; ({
      &lt;span class=&quot;hljs-attr&quot;&gt;chartOptions&lt;/span&gt;: {
        &lt;span class=&quot;hljs-attr&quot;&gt;lineSmooth&lt;/span&gt;: &lt;span class=&quot;hljs-literal&quot;&gt;true&lt;/span&gt;,
      },

    }),

    &lt;span class=&quot;hljs-attr&quot;&gt;components&lt;/span&gt;: {

    },

    &lt;span class=&quot;hljs-attr&quot;&gt;computed&lt;/span&gt;: {
      ...mapGetters([
        &lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&#39;authToken&#39;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&#39;tbLabels&#39;&lt;/span&gt;,
        &lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&#39;teamBeatsMyTeamValues&#39;&lt;/span&gt;,
      ]),

      &lt;span class=&quot;hljs-attr&quot;&gt;chartData&lt;/span&gt;: &lt;span class=&quot;hljs-function&quot;&gt;&lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;hljs-title&quot;&gt;chart&lt;/span&gt;(&lt;span class=&quot;hljs-params&quot;&gt;&lt;/span&gt;) &lt;/span&gt;{
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;const&lt;/span&gt; data = {
          &lt;span class=&quot;hljs-attr&quot;&gt;labels&lt;/span&gt;: &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;this&lt;/span&gt;.tbLabels,
          &lt;span class=&quot;hljs-attr&quot;&gt;series&lt;/span&gt;: &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;this&lt;/span&gt;.teamBeatsMyTeamValues,
        };
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;return&lt;/span&gt; data;
      },
    },

    &lt;span class=&quot;hljs-attr&quot;&gt;methods&lt;/span&gt;: {
      ...mapActions([

      ]),
    },

    created() {
      &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;if&lt;/span&gt; (!&lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;this&lt;/span&gt;.authToken) {
        &lt;span class=&quot;hljs-keyword&quot; style=&quot;font-weight: bold;&quot;&gt;this&lt;/span&gt;.$router.replace(&lt;span class=&quot;hljs-string&quot; style=&quot;color: #dd1144;&quot;&gt;&#39;/login&#39;&lt;/span&gt;);
      }
    },
  };
&lt;/span&gt;&lt;span class=&quot;hljs-tag&quot; style=&quot;color: navy; font-family: Consolas, Menlo, Monaco, &amp;quot;Lucida Console&amp;quot;, &amp;quot;Liberation Mono&amp;quot;, &amp;quot;DejaVu Sans Mono&amp;quot;, &amp;quot;Bitstream Vera Sans Mono&amp;quot;, &amp;quot;Courier New&amp;quot;, monospace; font-size: 15px; white-space: pre;&quot;&gt;&amp;lt;/&lt;span class=&quot;hljs-name&quot; style=&quot;color: #dd1144; font-weight: bold;&quot;&gt;script&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://forum.vuejs.org/t/getters-into-a-computed-method/5149/4&quot;&gt;https://forum.vuejs.org/t/getters-into-a-computed-method/5149/4&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/4986190415637122873/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/4986190415637122873' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/4986190415637122873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/4986190415637122873'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2020/09/vue-computed-method-getter-this-is.html' title='[Vue] computed method, getter &quot;this&quot; is undefined'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-2973097705683236256</id><published>2020-09-10T14:12:00.004+08:00</published><updated>2020-09-10T14:12:57.053+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="IAM"/><title type='text'>[AWS][IAM] Allow IAM user change their password</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Must have this policy to let IAM user change their password, otherwise they will encounter permission denied issue.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;
  &quot;Version&quot;: &quot;2012-10-17&quot;,
  &quot;Statement&quot;: [
    &lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;
      &quot;Effect&quot;: &quot;Allow&quot;,
      &quot;Action&quot;: &quot;iam:GetAccountPasswordPolicy&quot;,
      &quot;Resource&quot;: &quot;*&quot;
    },
    &lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;
      &quot;Effect&quot;: &quot;Allow&quot;,
      &quot;Action&quot;: &quot;iam:ChangePassword&quot;,
      &quot;Resource&quot;: &quot;arn:aws:iam::&lt;/span&gt;&lt;code class=&quot;replaceable&quot; style=&quot;background-color: #f9f9f9; color: #f5001d; display: inline; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; font-style: italic; line-height: 1.5em; margin: 0px; overflow: auto; padding: 0px; text-size-adjust: auto; white-space: pre;&quot;&gt;account-id-without-hyphens&lt;/code&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;:user/$&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;background-color: #f9f9f9; caret-color: rgb(22, 25, 31); color: #16191f; font-family: Monaco, Menlo, Consolas, &amp;quot;Courier Prime&amp;quot;, Courier, &amp;quot;Courier New&amp;quot;, monospace; font-size: 14.88px; text-size-adjust: auto; white-space: pre;&quot;&gt;aws:username}&quot;
    }
  ]
}&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html&quot;&gt;https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_passwords_enable-user-change.html&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/2973097705683236256/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/2973097705683236256' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/2973097705683236256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/2973097705683236256'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2020/09/awsiam-allow-iam-user-change-their.html' title='[AWS][IAM] Allow IAM user change their password'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-3550995120801168698</id><published>2020-09-08T17:29:00.007+08:00</published><updated>2020-09-08T17:34:00.254+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AWS"/><category scheme="http://www.blogger.com/atom/ns#" term="EKS"/><category scheme="http://www.blogger.com/atom/ns#" term="kubernetes"/><title type='text'>[AWS][EKS] hpa not working, target unknown</title><content type='html'>&lt;p&gt;First I follow this &lt;a href=&quot;https://aws.amazon.com/premiumsupport/knowledge-center/eks-metrics-server-pod-autoscaler/&quot; target=&quot;_blank&quot;&gt;link&lt;/a&gt; and try to enable hpa on my eks cluster.&lt;/p&gt;&lt;p&gt;But the hpa kept showing target unknown to me.&lt;/p&gt;&lt;p&gt;&lt;img alt=&quot;image&quot; height=&quot;86&quot; src=&quot;https://user-images.githubusercontent.com/37097080/40822950-18196c54-658c-11e8-97a3-6b479d8d9543.png&quot; width=&quot;1050&quot; /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It turned out it&#39;s the metrics-server&#39;s problem.&lt;/p&gt;&lt;p&gt;You can see logs of the metrics-server, it will complain that it cannot get metrics from pods.&lt;/p&gt;&lt;p&gt;&lt;!--?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?--&gt;&lt;span style=&quot;color: red;&quot;&gt;

kubectl logs -f -n kube-system -l k8s-app=metrics-server&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This &lt;a href=&quot;https://github.com/kubernetes-sigs/metrics-server/issues/300#issuecomment-568857398&quot;&gt;link&lt;/a&gt; help sovled my problem. Just patch the metric-server deployment with the following command.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: red;&quot;&gt;kubectl patch deployment -n kube-system metrics-server -p=&#39;{&quot;spec&quot;:{&quot;template&quot;:{&quot;spec&quot;:{&quot;containers&quot;:[{&quot;name&quot;:&quot;metrics-server&quot;,&quot;args&quot;:[&quot;--cert-dir=/tmp&quot;, &quot;- --secure-port=4443&quot;, &quot;--kubelet-insecure-tls&quot;, &quot;--kubelet-preferred-address-types=InternalIP&quot;]}]}}}}&#39;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I leave my comment in this &lt;a href=&quot;https://github.com/kubernetes-incubator/kube-aws/issues/549#issuecomment-688741376&quot;&gt;thread&lt;/a&gt;, hope it helps.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/kubernetes-incubator/kube-aws/issues/549#issuecomment-688741376&quot;&gt;https://github.com/kubernetes-incubator/kube-aws/issues/549#issuecomment-688741376&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/kubernetes-sigs/metrics-server/issues/300#issuecomment-568857398&quot;&gt;https://github.com/kubernetes-sigs/metrics-server/issues/300#issuecomment-568857398&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/kubernetes-sigs/metrics-server/issues/129&quot;&gt;https://github.com/kubernetes-sigs/metrics-server/issues/129&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/kubernetes-sigs/metrics-server/issues/237&quot;&gt;https://github.com/kubernetes-sigs/metrics-server/issues/237&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/3550995120801168698/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/3550995120801168698' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3550995120801168698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/3550995120801168698'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2020/09/awseks-hpa-not-working-target-unknown.html' title='[AWS][EKS] hpa not working, target unknown'/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9202044598746185964.post-1084690188383732144</id><published>2020-09-07T18:24:00.008+08:00</published><updated>2020-09-07T18:24:56.233+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Docker"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>[Mac][Docker] connect service on host from container </title><content type='html'>&lt;p&gt;You can use &quot;&lt;span style=&quot;color: red;&quot;&gt;host.docker.internal&lt;/span&gt;&quot; to connect to a service on mac from your application container.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;It&#39;s useful, say you run a &quot;redis&quot; container and publish it with -p 6379:6379.&lt;/p&gt;&lt;p&gt;And your web application container wants to access it, then you can configure you application connect to &quot;&lt;span style=&quot;color: red;&quot;&gt;host.docker.internal:6379&lt;/span&gt;&quot; inside it&#39;s container.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;reference:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds&quot;&gt;https://docs.docker.com/docker-for-mac/networking/#use-cases-and-workarounds&lt;/a&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://ysde.blogspot.com/feeds/1084690188383732144/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9202044598746185964/1084690188383732144' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1084690188383732144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9202044598746185964/posts/default/1084690188383732144'/><link rel='alternate' type='text/html' href='http://ysde.blogspot.com/2020/09/macdocker-connect-service-on-host-from.html' title='[Mac][Docker] connect service on host from container '/><author><name>Arthur&#39;s note</name><uri>http://www.blogger.com/profile/11007746828350445904</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>