diff options
Diffstat (limited to 'posts')
-rw-r--r-- | posts/1/index.html | 200 | ||||
-rw-r--r-- | posts/2/index.html | 197 | ||||
-rw-r--r-- | posts/3/index.html | 282 | ||||
-rw-r--r-- | posts/4/index.html | 199 | ||||
-rw-r--r-- | posts/5/index.html | 1452 | ||||
-rw-r--r-- | posts/6/index.html | 361 | ||||
-rw-r--r-- | posts/7/index.html | 166 | ||||
-rw-r--r-- | posts/8/index.html | 168 | ||||
-rw-r--r-- | posts/9/index.html | 256 | ||||
-rw-r--r-- | posts/index.html | 243 | ||||
-rw-r--r-- | posts/index.xml | 113 | ||||
-rw-r--r-- | posts/no-problemo/index.html | 159 |
12 files changed, 0 insertions, 3796 deletions
diff --git a/posts/1/index.html b/posts/1/index.html deleted file mode 100644 index c762f9b..0000000 --- a/posts/1/index.html +++ /dev/null @@ -1,200 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/1/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/1/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "First Website", - "headline" : "First Website", - "description" : "So now I can say my website is on.. even though it just literally has nothing but a printing hello I got this garhve.com domain on namesilo for $9.95 per year, it\u0026rsquo;s really cheap! I always want a domain that is .com suffix.\nNow, the web is https, this is a bit difficult for me.\nDue to personal interest, I didn\u0026rsquo;t choose frame to base my website. I use Nginx but I don\u0026rsquo;t familiar with it.", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-08-10 17:21:02 \u002b0800 CST", - "dateModified" : "2022-08-10 17:21:02 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/1\/", - "keywords" : [ ] - } -</script> -<title>First Website</title> - <meta property="og:title" content="First Website" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="So now I can say my website is on.. even though it just literally has nothing but a printing hello I got this garhve.com domain on namesilo for $9.95 per year, it&rsquo;s really cheap! I always want a domain that is .com suffix. -Now, the web is https, this is a bit difficult for me. -Due to personal interest, I didn&rsquo;t choose frame to base my website. I use Nginx but I don&rsquo;t familiar with it." /> - <meta name="description" content="So now I can say my website is on.. even though it just literally has nothing but a printing hello I got this garhve.com domain on namesilo for $9.95 per year, it&rsquo;s really cheap! I always want a domain that is .com suffix. -Now, the web is https, this is a bit difficult for me. -Due to personal interest, I didn&rsquo;t choose frame to base my website. I use Nginx but I don&rsquo;t familiar with it." /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">First Website</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-08-10 17:21:02 CST"> - 10 Aug 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <p>So now I can say my website is on.. even though it just literally has nothing but a printing <em>hello</em> -<img src="https://assets.garhve.com/pictures/screenshots/2022/08/2751557406.png" alt="FirstWebsite.png"></p> -<p>I got this <em>garhve.com</em> domain on namesilo for $9.95 per year, it’s really cheap! I always want a domain that is .com suffix.</p> -<p>Now, the web is https, this is a bit difficult for me.</p> -<p>Due to personal interest, I didn’t choose frame to base my website. I use <strong>Nginx</strong> but I don’t familiar with it. making it shows my content is not that difficult even that I don’t know much fancy state, but I stucked on SSL.</p> -<p>In order to use https instead of http, I choosed <strong>let’s encrypt</strong>, which is good for me and it’s free. However, I can only getting my non-www domain working. when it comes to www domain, it still http.</p> -<p>I found solutions all about using return to returning https, but it won’t work</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="font-weight:bold">server</span> { -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">server_name</span> <span style="font-style:italic">www.garhve.com</span>; -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">return</span> 301 <span style="font-style:italic">https://www.garhve.com</span>$request_uri -</span></span><span style="display:flex;"><span><span style="">}</span> -</span></span></code></pre></div><p>This would return me a 404 error…</p> -<p>After searching and searching, I found where i was getting wrong.</p> -<p>Above statement only return https-www which doesn’t hold any contents, all I need is to redirect the https-www to https-non-www.</p> -<p>So, change to this one</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="font-weight:bold">server</span> { -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">listen</span> 80; -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">server_name</span> <span style="font-style:italic">www.garhve.com</span> <span style="font-style:italic">garhve.com</span>; -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">return</span> 301 <span style="font-style:italic">https://garhve.com</span>$request_uri; -</span></span><span style="display:flex;"><span>} <span style="font-style:italic"># this block will redirect http-both to https-both -</span></span></span><span style="display:flex;"><span><span style="font-style:italic"></span> -</span></span><span style="display:flex;"><span><span style="font-weight:bold">server</span> { -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">listen</span> 443 <span style="font-style:italic">ssl</span> <span style="font-style:italic">http2</span>; <span style="font-style:italic">#http2 is newer and more secure http -</span></span></span><span style="display:flex;"><span><span style="font-style:italic"></span> <span style="font-weight:bold">listen</span> <span style="font-style:italic">[::]:443</span> <span style="font-style:italic">ssl</span> <span style="font-style:italic">http2</span>; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">server_name</span> <span style="font-style:italic">www.garhve.com</span>; -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">include</span> <span style="font-style:italic">/path_to_cert_file</span>; -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">return</span> 301 <span style="font-style:italic">https://garhve.com</span>$request_uri; -</span></span><span style="display:flex;"><span>} <span style="font-style:italic"># this block will redirect https-www to https-non-www -</span></span></span><span style="display:flex;"><span><span style="font-style:italic"></span> -</span></span><span style="display:flex;"><span><span style="font-weight:bold">server</span> { -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">listen</span> 443 <span style="font-style:italic">ssl</span> <span style="font-style:italic">http2</span>; -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">listen</span> <span style="font-style:italic">[::]:443</span> <span style="font-style:italic">ssl</span> <span style="font-style:italic">http2</span>; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">server_name</span> <span style="font-style:italic">garhve.com</span>; -</span></span><span style="display:flex;"><span> <span style="font-weight:bold">include</span> <span style="font-style:italic">/path_to_cert_file</span>; -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span> <span style="font-style:italic">#location to real content -</span></span></span><span style="display:flex;"><span><span style="font-style:italic"></span>} <span style="font-style:italic"># this block is where we hold web content. -</span></span></span></code></pre></div><p>It will redirect <em>https-www</em> to <em>https-non-www</em>. Now, both domain will point to same location – my home page.</p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/2/index.html b/posts/2/index.html deleted file mode 100644 index d56d8c5..0000000 --- a/posts/2/index.html +++ /dev/null @@ -1,197 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/2/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/2/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Install arch linux on Tencent server", - "headline" : "Install arch linux on Tencent server", - "description" : "In order to build a website for myself, I rent a server from Tencent. This is my final decision, the process is turtuous\u0026hellip;\nMy requirement as below:\nabroad provider because they don\u0026rsquo;t have to register.. the the budget\u0026rsquo;s not relax, all I can choosing was in range of $0 - $10. It can runs Arch linux seamlessly I already eye on one: Linode. But they don\u0026rsquo;t see me\u0026hellip; and banned all my gmail account from their service\u0026hellip;", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-08-10 19:24:59 \u002b0800 CST", - "dateModified" : "2022-08-10 19:24:59 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/2\/", - "keywords" : [ ] - } -</script> -<title>Install arch linux on Tencent server</title> - <meta property="og:title" content="Install arch linux on Tencent server" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="In order to build a website for myself, I rent a server from Tencent. This is my final decision, the process is turtuous&hellip; -My requirement as below: -abroad provider because they don&rsquo;t have to register.. the the budget&rsquo;s not relax, all I can choosing was in range of $0 - $10. It can runs Arch linux seamlessly I already eye on one: Linode. But they don&rsquo;t see me&hellip; and banned all my gmail account from their service&hellip;" /> - <meta name="description" content="In order to build a website for myself, I rent a server from Tencent. This is my final decision, the process is turtuous&hellip; -My requirement as below: -abroad provider because they don&rsquo;t have to register.. the the budget&rsquo;s not relax, all I can choosing was in range of $0 - $10. It can runs Arch linux seamlessly I already eye on one: Linode. But they don&rsquo;t see me&hellip; and banned all my gmail account from their service&hellip;" /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">Install arch linux on Tencent server</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-08-10 19:24:59 CST"> - 10 Aug 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <p>In order to build a website for myself, I rent a server from Tencent. This is my final decision, the process is turtuous…</p> -<p>My requirement as below:</p> -<ol> -<li>abroad provider because they don’t have to register..</li> -<li>the the budget’s not relax, all I can choosing was in range of $0 - $10.</li> -<li>It can runs Arch linux seamlessly</li> -</ol> -<p>I already eye on one: Linode. But they don’t see me… and banned all my gmail account from their service…</p> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/08/38383267.png" alt="cancelEmail.png"></p> -<p>Fine! It’s your loss!</p> -<p>My second thought was hostkey, They got excellent support, and cheapest price comparing with other service me compared. So be it. I paid €3 to get one.</p> -<p>The server was great at first. But when it comes to custom OS installation because I want my server runs Arch linux, things got frustrating. The server supports me mount custom OS installer from their library, but even it shows me that mounted successfully, i still can’t boot from ISO, not saying start installation..</p> -<p>There is where excellent support comes from. I feedbacked the issue, they immediately help me fixed it. Thanks a lot!</p> -<p>And then, I started installation…</p> -<p>I never tried install a arch linux into server. So when it has not network. I totally fucked up, I googled and googled. Finally I found that in official wiki, this issue has a solution. The solution tells me that if we had static IP, we can get network through <code>systemd-network</code> service which comes with iso. It’s very tricky.</p> -<p>It associates another service called <code>systemd-resolve</code>. Network can be reachable if both in proper configuration..</p> -<blockquote> -<p>Start both systemd service, then edit their config..</p> -<ul> -<li>For <code>systemd-network</code>, we can edit <code>/etc/systemd/network/20-*.conf</code></li> -<li>For <code>systemd-resolve</code>, we can link <code>/etc/resolv.conf</code> to <code>/run/systemd/resolve/stub-resolv.conf</code></li> -</ul> -</blockquote> -<p>After tricky part done, other steps just as normal as install in local env.</p> -<p>I struggled and successfully installed arch linux on my server, but then i encountered night traffic jam.. No matter how hard I try, I just can’t ssh into my server. That’s unacceptable! I immediately start looking for other provider..</p> -<p>Then, I found Tencent Cloud..</p> -<p>I already have one server of it, based on Shanghai. It is good, but building a website in it would require me to register, so I never consider using it.</p> -<p>I rent a server that based on Hong Kong, cost me ¥42 per month. But this has really good quality. even now at 2:05am when I’m writing this essay. It still performs stable connection.</p> -<p>First thing I got hands on Tencent Hong Kong server, I changed OS to arch linux, just as before. But Tencent doesn’t provide arch linux ISO, so i found some blogs on internet to know how to do it. And I succeed.</p> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/08/4068602805.png" alt="tencentArch.png"></p> -<p>There involves three parts to install arch:</p> -<ul> -<li>Mount ISO to driver and delete other thing</li> -<li>Manually add entry of ArchISO to grub</li> -<li>Static IP is of internal whereas hostkey is public.</li> -</ul> -<p>So now, I got a server that running Arch Linux. Next, buiding a website on it!</p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/3/index.html b/posts/3/index.html deleted file mode 100644 index 7608da9..0000000 --- a/posts/3/index.html +++ /dev/null @@ -1,282 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/3/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/3/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Mess with bash(1)", - "headline" : "Mess with bash(1)", - "description" : "Crontab crontab is a useful tool, I really regret that I don\u0026rsquo;t familar it earlier.\nIt\u0026rsquo;s usage really simple, and these two are my frequent using:\ncrontab -e #edit crontab file that reside in \/var\/spool\/cron crontab -l #list current crontab job It basic syntax as follow, also really simple example of usage:\ndelete file foo every minute * * * * * rm foo delete file foo every 15 minutes 15 * * * * rm foo delete file foo every beginning of hour 0 * * * * rm foo delete file foo every minute after 3 hours * 3 * * * rm foo delete file foo every day at 18:30 30 18 * * * rm foo delete file foo every beginning of month 0 0 0 * * rm foo delete file foo on beginning of 1st,10th of month 0 0 1,10 * * rm foo The usage really simple, I now use it to renew my SSL certification and daily update bt-tracker.", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-08-25 13:40:56 \u002b0800 CST", - "dateModified" : "2022-08-25 13:40:56 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/3\/", - "keywords" : [ ] - } -</script> -<title>Mess with bash(1)</title> - <meta property="og:title" content="Mess with bash(1)" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="Crontab crontab is a useful tool, I really regret that I don&rsquo;t familar it earlier. -It&rsquo;s usage really simple, and these two are my frequent using: -crontab -e #edit crontab file that reside in /var/spool/cron crontab -l #list current crontab job It basic syntax as follow, also really simple example of usage: -delete file foo every minute * * * * * rm foo delete file foo every 15 minutes 15 * * * * rm foo delete file foo every beginning of hour 0 * * * * rm foo delete file foo every minute after 3 hours * 3 * * * rm foo delete file foo every day at 18:30 30 18 * * * rm foo delete file foo every beginning of month 0 0 0 * * rm foo delete file foo on beginning of 1st,10th of month 0 0 1,10 * * rm foo The usage really simple, I now use it to renew my SSL certification and daily update bt-tracker." /> - <meta name="description" content="Crontab crontab is a useful tool, I really regret that I don&rsquo;t familar it earlier. -It&rsquo;s usage really simple, and these two are my frequent using: -crontab -e #edit crontab file that reside in /var/spool/cron crontab -l #list current crontab job It basic syntax as follow, also really simple example of usage: -delete file foo every minute * * * * * rm foo delete file foo every 15 minutes 15 * * * * rm foo delete file foo every beginning of hour 0 * * * * rm foo delete file foo every minute after 3 hours * 3 * * * rm foo delete file foo every day at 18:30 30 18 * * * rm foo delete file foo every beginning of month 0 0 0 * * rm foo delete file foo on beginning of 1st,10th of month 0 0 1,10 * * rm foo The usage really simple, I now use it to renew my SSL certification and daily update bt-tracker." /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">Mess with bash(1)</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-08-25 13:40:56 CST"> - 25 Aug 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <h3 id="crontab">Crontab</h3> -<p><code>crontab</code> is a useful tool, I really regret that I don’t familar it earlier.</p> -<p>It’s usage really simple, and these two are my frequent using:</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>crontab -e <span style="font-style:italic">#edit crontab file that reside in /var/spool/cron</span> -</span></span><span style="display:flex;"><span>crontab -l <span style="font-style:italic">#list current crontab job</span> -</span></span></code></pre></div><p>It basic syntax as follow, also really simple -<img src="https://assets.garhve.com/pictures/screenshots/2022/08/1857817000.jpg" alt="crontab-layout.jpg"></p> -<p>example of usage:</p> -<ol> -<li>delete file <em>foo</em> every minute -<code>* * * * * rm foo</code></li> -<li>delete file <em>foo</em> every 15 minutes -<code>15 * * * * rm foo</code></li> -<li>delete file <em>foo</em> every beginning of hour -<code>0 * * * * rm foo</code></li> -<li>delete file <em>foo</em> every minute after 3 hours -<code>* 3 * * * rm foo</code></li> -<li>delete file <em>foo</em> every day at 18:30 -<code>30 18 * * * rm foo</code></li> -<li>delete file <em>foo</em> every beginning of month -<code>0 0 0 * * rm foo</code></li> -<li>delete file <em>foo</em> on beginning of 1st,10th of month -<code>0 0 1,10 * * rm foo</code></li> -</ol> -<p>The usage really simple, I now use it to renew my SSL certification and daily update bt-tracker.</p> -<hr> -<h3 id="tr">tr</h3> -<p><code>tr</code> is really useful when encountered situation that needs struggle with string. -Three frequency ways of using <code>tr</code></p> -<ol> -<li> -<p><strong>shrink</strong> multiple characters into single one</p> -<p><code>tr -s '[string]'</code> -e.g. <code>echo "ssssssspaaaaace" | tr -s 'sa'</code> would convert “ssssssspace” to “space”</p> -</li> -<li> -<p><strong>delete</strong> specific character. I usually use it to delete white space or delimiter</p> -<p><code>tr -d '[string]'</code> -e.g. <code>echo "blog.garhve.com" | tr -d '.o'</code> would convert url to “blggarhvecm”</p> -</li> -<li> -<p><strong>convert</strong> specific character to another one.</p> -<p><code>tr '[string1]' '[string2]'</code> -e.g. <code>echo "woopwon | tr "wo" "fe"</code> would result “feepfen”</p> -</li> -</ol> -<hr> -<h3 id="cut">cut</h3> -<p>I use <code>cut</code> mostly to get word from a string, especially get relative path from absolute path. Because I always want to loop to get same sub-directories file from different main directory, <code>cut</code> helps a lot.</p> -<p>for now, I only use it one way</p> -<p><code>echo string | cut -d '[character]' -f position</code> -e.g. <code>echo path/to/most/inner/file | cut -d '/' -f1</code> this will give me word before first ‘/’, which is ‘path’</p> -<p>Often, <code>rev</code> will co-work with <code>cut</code> to get last one word</p> -<p>e.g. <code>echo blog.garhve.com | rev | cut -d '.' -f 1 | rev</code> this will give word after last ‘/’, which is com.</p> -<blockquote> -<p><em>a worth noting here is that the <code>rev</code> command needs to appear twice because it usage is not so intuitive, it reverse whole string</em></p> -<p><code>echo "hello world" | rev</code> will get ‘dlrow olleh`</p> -<p><code>echo "hello world" | cut -d ' ' -f1 | rev</code> will give result of ‘dlrow’</p> -<p><code>echo "hello world" | rev | cut -d ' ' -f1</code> will give same result, as ‘dlrow’</p> -<p><code>echo "hello world" | rev | cut -d ' ' -f1 | rev</code> will give expected result, as ‘world’</p> -</blockquote> -<h3 id="daily-update-bt-tracker">Daily update bt tracker</h3> -<p>I already learn shell script for a while.. so I wrote a simple script to test whether I really got used to it, but result is obviously, I need more and more practice to memorize commands.</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="">#! /bin/sh -</span></span></span><span style="display:flex;"><span><span style=""></span><span style="font-style:italic">#bt-tracker.txt</span> -</span></span><span style="display:flex;"><span>site=https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all.txt -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>file=/path_to_aria_directory/aria2.conf -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>Addr=user@addr -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># Get bt-tracker and format it to fulfill aria needs, then store in variable</span> -</span></span><span style="display:flex;"><span>bt=<span style="font-weight:bold">$(</span>curl $site | tr -s <span style="font-style:italic">'[:space:]'</span> | tr <span style="font-style:italic">'[:space:]'</span> <span style="font-style:italic">','</span><span style="font-weight:bold">)</span> -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># sshpass is a software, that can allow me pass ssh password as argument</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># so that I don't need to wait prompt</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># 410 is the line of bt tracker resides, I now no other way to replace it.</span> -</span></span><span style="display:flex;"><span><span style="font-weight:bold">$(</span>sshpass -p <span style="font-style:italic">'password'</span> ssh -T $Addr <span style="font-style:italic">"sed -i '410d' </span>$file<span style="font-style:italic"> | echo </span>$bt<span style="font-style:italic"> >> </span>$file<span style="font-style:italic">"</span><span style="font-weight:bold">)</span> -</span></span></code></pre></div><blockquote> -<p>Usage of <a href="https://blog.garhve.com/index.php/archives/23/#tr">tr</a> and <a href="https://blog.garhve.com/index.php/archives/23/#cut">cut</a>, expansion of ‘command tips’ is needed</p> -</blockquote> -<h3 id="ways-to-find-files-or-specific-string-in-files">Ways to find files or specific string in files</h3> -<p>In order to look up C definitions, I need to know where linux stores header files or which files store definitions I need. So that here comes up some methods to fulfill this need:</p> -<ol> -<li><code>find 'path' -name 'file_name'</code></li> -</ol> -<blockquote> -<p>e.g. <code>find / -name stdio.h</code> will return multiple location that stdio.h resides. this could expand to look for others</p> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/09/find_name.png" alt="image.png"></p> -<p>more info could see <code>man find</code></p> -</blockquote> -<hr> -<ol start="2"> -<li><code>grep -rnw 'path' -e 'pattern'</code></li> -</ol> -<blockquote> -<p>e.g. `grep –include=*.{h,c} -rnw / -e “from_kuid” will return string and filename that contains string.</p> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/09/grep_string.png" alt="image.png"></p> -<ul> -<li><code>-r</code> or <code>-R</code> is recursive,</li> -<li><code>-n</code> is line number, and</li> -<li><code>-w</code> stands for match the whole word.</li> -<li><code>-l</code> (lower-case L) can be added to just give the file name of matching files.</li> -<li><code>-e</code> is the pattern used during the search</li> -</ul> -<p>Along with these, <code>--exclude</code>, <code>--include</code>, <code>--exclude-dir</code> flags could be used for efficient searching:</p> -<ul> -<li>This will only search through those files which have .c or .h extensions:</li> -</ul> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>grep --include=<span style="font-weight:bold;font-style:italic">\*</span>.{c,h} -rnw <span style="font-style:italic">'/path/to/somewhere/'</span> -e <span style="font-style:italic">"pattern"</span> -</span></span></code></pre></div><ul> -<li>This will exclude searching all the files ending with .o extension:</li> -</ul> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>grep --exclude=<span style="font-weight:bold;font-style:italic">\*</span>.o -rnw <span style="font-style:italic">'/path/to/somewhere/'</span> -e <span style="font-style:italic">"pattern"</span> -</span></span></code></pre></div><ul> -<li>For directories it’s possible to exclude one or more directories using the <code>--exclude-dir</code> parameter. For example, this will exclude the dirs dir1/, dir2/ and all of them matching *.dst/:</li> -</ul> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>grep --exclude-dir={dir1,dir2,*.dst} -rnw <span style="font-style:italic">'/path/to/somewhere/'</span> -e <span style="font-style:italic">"pattern"</span> -</span></span></code></pre></div><p>more info could see <a href="https://ss64.com/bash/grep.html"><code>man grep</code></a>.</p> -</blockquote> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/4/index.html b/posts/4/index.html deleted file mode 100644 index 0f3907a..0000000 --- a/posts/4/index.html +++ /dev/null @@ -1,199 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/4/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/4/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Architecture of Linux Kernel", - "headline" : "Architecture of Linux Kernel", - "description" : "Description Modern microcontrollers nowadays support at least two privilege levels. Intel\/AMD x86-64 family supports 4 levels, whilst ARM (32bit) microcontrollers support up to 7 levels (6 privileged, 1 non-privileged).\nModern operating systems support at least 2 levels:\nUser space: For applications to run in unprivileged user mode Kernel space: For the kernel (and all its components) to run in privileged mode – kernel mode Address of these 2 spaces are separate.", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-09-03 14:33:37 \u002b0800 CST", - "dateModified" : "2022-09-03 14:33:37 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/4\/", - "keywords" : [ ] - } -</script> -<title>Architecture of Linux Kernel</title> - <meta property="og:title" content="Architecture of Linux Kernel" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="Description Modern microcontrollers nowadays support at least two privilege levels. Intel/AMD x86-64 family supports 4 levels, whilst ARM (32bit) microcontrollers support up to 7 levels (6 privileged, 1 non-privileged). -Modern operating systems support at least 2 levels: -User space: For applications to run in unprivileged user mode Kernel space: For the kernel (and all its components) to run in privileged mode – kernel mode Address of these 2 spaces are separate." /> - <meta name="description" content="Description Modern microcontrollers nowadays support at least two privilege levels. Intel/AMD x86-64 family supports 4 levels, whilst ARM (32bit) microcontrollers support up to 7 levels (6 privileged, 1 non-privileged). -Modern operating systems support at least 2 levels: -User space: For applications to run in unprivileged user mode Kernel space: For the kernel (and all its components) to run in privileged mode – kernel mode Address of these 2 spaces are separate." /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - <!DOCTYPE html> -<html> - <head> - <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.css" integrity="sha384-Juol1FqnotbkyZUT5Z7gUPjQ9gzlwCENvUZTpQBAPxtusdwFLRy382PSDx5UUJ4/" crossorigin="anonymous"> - - - <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/katex.min.js" integrity="sha384-97gW6UIJxnlKemYavrqDHSX3SiygeOwIZhwyOKRfSaf0JWKRVj9hLASHgFTzT+0O" crossorigin="anonymous"></script> - - - <script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.3/dist/contrib/auto-render.min.js" integrity="sha384-+VBxd3r6XgURycqtZ117nYw44OOcIax56Z4dCRWbxyPt0Koah1uHoK0o4+/RRE05" crossorigin="anonymous" - onload="renderMathInElement(document.body);"></script> - </head> - - <script> -document.addEventListener("DOMContentLoaded", function() { - renderMathInElement(document.body, { - delimiters: [ - {left: "$$", right: "$$", display: true}, - {left: "$", right: "$", display: false} - ] - }); -}); -</script> -</html> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">Architecture of Linux Kernel</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-09-03 14:33:37 CST"> - 03 Sep 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <h2 id="description">Description</h2> -<p>Modern microcontrollers nowadays support at least two privilege levels. Intel/AMD x86-64 family supports 4 levels, whilst ARM (32bit) microcontrollers support up to 7 levels (6 privileged, 1 non-privileged).</p> -<p>Modern operating systems support at least 2 levels:</p> -<ul> -<li><strong>User space</strong>: For applications to run in unprivileged user mode</li> -<li><strong>Kernel space</strong>: For the kernel (and all its components) to run in privileged mode – kernel mode</li> -</ul> -<p>Address of these 2 spaces are separate.</p> -<p>Applications in user mode will auto-linked to glibc(the GNU standard C library). Libraries only available in user mode, kernel mode doesn’t have this conception. An application only can through <strong>System call</strong> to access kernel. On the other hand, system calls are the only legal entry point into the kernel space.</p> -<blockquote> -<p>Libraries APIs: man section 3 -System calls APIs: man section 2</p> -</blockquote> -<p>to be continue…</p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/5/index.html b/posts/5/index.html deleted file mode 100644 index 9d3be5f..0000000 --- a/posts/5/index.html +++ /dev/null @@ -1,1452 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/5/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/5/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Escape Sequences", - "headline" : "Escape Sequences", - "description" : "copied from github in case one day it disappears\nmore information could visit vt100 User Guide\nANSI Escape Sequences Standard escape codes are prefixed with Escape:\nCtrl-Key: ^[ Octal: \\033 Unicode: \\u001b Hexadecimal: \\x1B Decimal: 27 Followed by the command, somtimes delimited by opening square bracket ([), known as a Control Sequence Introducer (CSI), optionally followed by arguments and the command itself.\nArguments are delimeted by semi colon (;).", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-09-12 09:02:06 \u002b0800 CST", - "dateModified" : "2022-09-12 09:02:06 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/5\/", - "keywords" : [ ] - } -</script> -<title>Escape Sequences</title> - <meta property="og:title" content="Escape Sequences" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="copied from github in case one day it disappears -more information could visit vt100 User Guide -ANSI Escape Sequences Standard escape codes are prefixed with Escape: -Ctrl-Key: ^[ Octal: \033 Unicode: \u001b Hexadecimal: \x1B Decimal: 27 Followed by the command, somtimes delimited by opening square bracket ([), known as a Control Sequence Introducer (CSI), optionally followed by arguments and the command itself. -Arguments are delimeted by semi colon (;)." /> - <meta name="description" content="copied from github in case one day it disappears -more information could visit vt100 User Guide -ANSI Escape Sequences Standard escape codes are prefixed with Escape: -Ctrl-Key: ^[ Octal: \033 Unicode: \u001b Hexadecimal: \x1B Decimal: 27 Followed by the command, somtimes delimited by opening square bracket ([), known as a Control Sequence Introducer (CSI), optionally followed by arguments and the command itself. -Arguments are delimeted by semi colon (;)." /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">Escape Sequences</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-09-12 09:02:06 CST"> - 12 Sep 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <blockquote> -<p>copied from <a href="https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797">github</a> in case one day it disappears</p> -<p>more information could visit <a href="https://vt100.net/docs/vt100-ug/chapter3.html">vt100 User Guide</a></p> -</blockquote> -<h1 id="ansi-escape-sequences">ANSI Escape Sequences</h1> -<p>Standard escape codes are prefixed with <code>Escape</code>:</p> -<ul> -<li>Ctrl-Key: <code>^[</code></li> -<li>Octal: <code>\033</code></li> -<li>Unicode: <code>\u001b</code></li> -<li>Hexadecimal: <code>\x1B</code></li> -<li>Decimal: <code>27</code></li> -</ul> -<p>Followed by the command, somtimes delimited by opening square bracket (<code>[</code>), known as a Control Sequence Introducer (CSI), optionally followed by arguments and the command itself.</p> -<p>Arguments are delimeted by semi colon (<code>;</code>).</p> -<p>For example:</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span><span style="font-weight:bold;font-style:italic">\x</span>1b[1;31m <span style="font-style:italic"># Set style to bold, red foreground.</span> -</span></span></code></pre></div><h2 id="sequences">Sequences</h2> -<ul> -<li><code>ESC</code> - sequence starting with <code>ESC</code> (<code>\x1B</code>)</li> -<li><code>CSI</code> - Control Sequence Introducer: sequence starting with <code>ESC [</code> or CSI (<code>\x9B</code>)</li> -<li><code>DCS</code> - Device Control String: sequence starting with <code>ESC P</code> or DCS (<code>\x90</code>)</li> -<li><code>OSC</code> - Operating System Command: sequence starting with <code>ESC ]</code> or OSC (<code>\x9D</code>)</li> -</ul> -<p>Any whitespaces between sequences and arguments should be ignored. They are present for improved readability.</p> -<h2 id="general-ascii-codes">General ASCII Codes</h2> -<table> -<thead> -<tr> -<th>Name</th> -<th>decimal</th> -<th>octal</th> -<th>hex</th> -<th>C-escape</th> -<th>Ctrl-Key</th> -<th>Description</th> -</tr> -</thead> -<tbody> -<tr> -<td><code>BEL</code></td> -<td>7</td> -<td>007</td> -<td>0x07</td> -<td><code>\a</code></td> -<td><code>^G</code></td> -<td>Terminal bell</td> -</tr> -<tr> -<td><code>BS</code></td> -<td>8</td> -<td>010</td> -<td>0x08</td> -<td><code>\b</code></td> -<td><code>^H</code></td> -<td>Backspace</td> -</tr> -<tr> -<td><code>HT</code></td> -<td>9</td> -<td>011</td> -<td>0x09</td> -<td><code>\t</code></td> -<td><code>^I</code></td> -<td>Horizontal TAB</td> -</tr> -<tr> -<td><code>LF</code></td> -<td>10</td> -<td>012</td> -<td>0x0A</td> -<td><code>\n</code></td> -<td><code>^J</code></td> -<td>Linefeed (newline)</td> -</tr> -<tr> -<td><code>VT</code></td> -<td>11</td> -<td>013</td> -<td>0x0B</td> -<td><code>\v</code></td> -<td><code>^K</code></td> -<td>Vertical TAB</td> -</tr> -<tr> -<td><code>FF</code></td> -<td>12</td> -<td>014</td> -<td>0x0C</td> -<td><code>\f</code></td> -<td><code>^L</code></td> -<td>Formfeed (also: New page<code>NP</code>)</td> -</tr> -<tr> -<td><code>CR</code></td> -<td>13</td> -<td>015</td> -<td>0x0D</td> -<td><code>\r</code></td> -<td><code>^M</code></td> -<td>Carriage return</td> -</tr> -<tr> -<td><code>ESC</code></td> -<td>27</td> -<td>033</td> -<td>0x1B</td> -<td><code>\e</code><a href="#escape">*</a></td> -<td><code>^[</code></td> -<td>Escape character</td> -</tr> -<tr> -<td><code>DEL</code></td> -<td>127</td> -<td>177</td> -<td>0x7F</td> -<td><code><none></code></td> -<td><code><none></code></td> -<td>Delete character</td> -</tr> -</tbody> -</table> -<div id="escape"></div> -<blockquote> -<p><strong>Note:</strong> Some control escape sequences, like <code>\e</code> for <code>ESC</code>, are not guaranteed to work in all languages and compilers. It is recommended to use the decimal, octal or hex representation as escape code.</p> -</blockquote> -<blockquote> -<p><strong>Note:</strong> The <strong>Ctrl-Key</strong> representation is simply associating the non-printable characters from ASCII code 1 with the printable (letter) characters from ASCII code 65 (“A”). ASCII code 1 would be <code>^A</code> (Ctrl-A), while ASCII code 7 (BEL) would be <code>^G</code> (Ctrl-G). This is a common representation (and input method) and historically comes from one of the VT series of terminals.</p> -</blockquote> -<h2 id="cursor-controls">Cursor Controls</h2> -<table> -<thead> -<tr> -<th style="text-align:left">ESC Code Sequence</th> -<th style="text-align:left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left"><code>ESC[H</code></td> -<td style="text-align:left">moves cursor to home position (0, 0)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[{line};{column}H</code> <br> <code>ESC[{line};{column}f</code></td> -<td style="text-align:left">moves cursor to line #, column #</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[#A</code></td> -<td style="text-align:left">moves cursor up # lines</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[#B</code></td> -<td style="text-align:left">moves cursor down # lines</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[#C</code></td> -<td style="text-align:left">moves cursor right # columns</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[#D</code></td> -<td style="text-align:left">moves cursor left # columns</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[#E</code></td> -<td style="text-align:left">moves cursor to beginning of next line, # lines down</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[#F</code></td> -<td style="text-align:left">moves cursor to beginning of previous line, # lines up</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[#G</code></td> -<td style="text-align:left">moves cursor to column #</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[6n</code></td> -<td style="text-align:left">request cursor position (reports as<code>ESC[#;#R</code>)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC M</code></td> -<td style="text-align:left">moves cursor one line up, scrolling if needed</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC 7</code></td> -<td style="text-align:left">save cursor position (DEC)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC 8</code></td> -<td style="text-align:left">restores the cursor to the last saved position (DEC)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[s</code></td> -<td style="text-align:left">save cursor position (SCO)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[u</code></td> -<td style="text-align:left">restores the cursor to the last saved position (SCO)</td> -</tr> -</tbody> -</table> -<blockquote> -<p><strong>Note:</strong> Some sequences, like saving and restoring cursors, are private sequences and are not standardized. While some terminal emulators (i.e. xterm and derived) support both SCO and DEC sequences, they are likely to have different functionality. It is therefore recommended to use DEC sequences.</p> -</blockquote> -<h2 id="erase-functions">Erase Functions</h2> -<table> -<thead> -<tr> -<th style="text-align:left">ESC Code Sequence</th> -<th style="text-align:left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left"><code>ESC[J</code></td> -<td style="text-align:left">erase in display (same as ESC[0J)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[0J</code></td> -<td style="text-align:left">erase from cursor until end of screen</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[1J</code></td> -<td style="text-align:left">erase from cursor to beginning of screen</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[2J</code></td> -<td style="text-align:left">erase entire screen</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[3J</code></td> -<td style="text-align:left">erase saved lines</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[K</code></td> -<td style="text-align:left">erase in line (same as ESC[0K)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[0K</code></td> -<td style="text-align:left">erase from cursor to end of line</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[1K</code></td> -<td style="text-align:left">erase start of line to the cursor</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[2K</code></td> -<td style="text-align:left">erase the entire line</td> -</tr> -</tbody> -</table> -<blockquote> -<p>Note: Erasing the line won’t move the cursor, meaning that the cursor will stay at the last position it was at before the line was erased. You can use <code>\r</code> after erasing the line, to return the cursor to the start of the current line.</p> -</blockquote> -<h2 id="colors--graphics-mode">Colors / Graphics Mode</h2> -<table> -<thead> -<tr> -<th style="text-align:left">ESC Code Sequence</th> -<th style="text-align:left">Reset Sequence</th> -<th style="text-align:left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left"><code>ESC[1;34;{...}m</code></td> -<td style="text-align:left"></td> -<td style="text-align:left">Set graphics modes for cell, separated by semicolon (<code>;</code>).</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[0m</code></td> -<td style="text-align:left"></td> -<td style="text-align:left">reset all modes (styles and colors)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[1m</code></td> -<td style="text-align:left"><code>ESC[22m</code></td> -<td style="text-align:left">set bold mode.</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[2m</code></td> -<td style="text-align:left"><code>ESC[22m</code></td> -<td style="text-align:left">set dim/faint mode.</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[3m</code></td> -<td style="text-align:left"><code>ESC[23m</code></td> -<td style="text-align:left">set italic mode.</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[4m</code></td> -<td style="text-align:left"><code>ESC[24m</code></td> -<td style="text-align:left">set underline mode.</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[5m</code></td> -<td style="text-align:left"><code>ESC[25m</code></td> -<td style="text-align:left">set blinking mode</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[7m</code></td> -<td style="text-align:left"><code>ESC[27m</code></td> -<td style="text-align:left">set inverse/reverse mode</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[8m</code></td> -<td style="text-align:left"><code>ESC[28m</code></td> -<td style="text-align:left">set hidden/invisible mode</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[9m</code></td> -<td style="text-align:left"><code>ESC[29m</code></td> -<td style="text-align:left">set strikethrough mode.</td> -</tr> -</tbody> -</table> -<blockquote> -<p><strong>Note:</strong> Some terminals may not support some of the graphic mode sequences listed above.</p> -</blockquote> -<blockquote> -<p><strong>Note:</strong> Both dim and bold modes are reset with the <code>ESC[22m</code> sequence. The <code>ESC[21m</code> sequence is a non-specified sequence for double underline mode and only work in some terminals and is reset with <code>ESC[24m</code>.</p> -</blockquote> -<h3 id="color-codes">Color codes</h3> -<p>Most terminals support 8 and 16 colors, as well as 256 (8-bit) colors. These colors are set by the user, but have commonly defined meanings.</p> -<h4 id="8-16-colors">8-16 Colors</h4> -<table> -<thead> -<tr> -<th style="text-align:left">Color Name</th> -<th style="text-align:left">Foreground Color Code</th> -<th style="text-align:left">Background Color Code</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left">Black</td> -<td style="text-align:left"><code>30</code></td> -<td style="text-align:left"><code>40</code></td> -</tr> -<tr> -<td style="text-align:left">Red</td> -<td style="text-align:left"><code>31</code></td> -<td style="text-align:left"><code>41</code></td> -</tr> -<tr> -<td style="text-align:left">Green</td> -<td style="text-align:left"><code>32</code></td> -<td style="text-align:left"><code>42</code></td> -</tr> -<tr> -<td style="text-align:left">Yellow</td> -<td style="text-align:left"><code>33</code></td> -<td style="text-align:left"><code>43</code></td> -</tr> -<tr> -<td style="text-align:left">Blue</td> -<td style="text-align:left"><code>34</code></td> -<td style="text-align:left"><code>44</code></td> -</tr> -<tr> -<td style="text-align:left">Magenta</td> -<td style="text-align:left"><code>35</code></td> -<td style="text-align:left"><code>45</code></td> -</tr> -<tr> -<td style="text-align:left">Cyan</td> -<td style="text-align:left"><code>36</code></td> -<td style="text-align:left"><code>46</code></td> -</tr> -<tr> -<td style="text-align:left">White</td> -<td style="text-align:left"><code>37</code></td> -<td style="text-align:left"><code>47</code></td> -</tr> -<tr> -<td style="text-align:left">Default</td> -<td style="text-align:left"><code>39</code></td> -<td style="text-align:left"><code>49</code></td> -</tr> -<tr> -<td style="text-align:left">Reset</td> -<td style="text-align:left"><code>0</code></td> -<td style="text-align:left"><code>0</code></td> -</tr> -</tbody> -</table> -<blockquote> -<p><strong>Note:</strong> the <em>Reset</em> color is the reset code that resets <em>all</em> colors and text effects, Use <em>Default</em> color to reset colors only.</p> -</blockquote> -<p>Most terminals, apart from the basic set of 8 colors, also support the “bright” or “bold” colors. These have their own set of codes, mirroring the normal colors, but with an additional <code>;1</code> in their codes:</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span><span style="font-style:italic"># Set style to bold, red foreground.</span> -</span></span><span style="display:flex;"><span><span style="font-weight:bold;font-style:italic">\x</span>1b[1;31mHello -</span></span><span style="display:flex;"><span><span style="font-style:italic"># Set style to dimmed white foreground with red background.</span> -</span></span><span style="display:flex;"><span><span style="font-weight:bold;font-style:italic">\x</span>1b[2;37;41mWorld -</span></span></code></pre></div><p>Terminals that support the <a href="https://sites.ualberta.ca/dept/chemeng/AIX-43/share/man/info/C/a_doc_lib/cmds/aixcmds1/aixterm.htm">aixterm specification</a> provides bright versions of the ISO colors, without the need to use the bold modifier:</p> -<table> -<thead> -<tr> -<th style="text-align:left">Color Name</th> -<th style="text-align:left">Foreground Color Code</th> -<th style="text-align:left">Background Color Code</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left">Bright Black</td> -<td style="text-align:left"><code>90</code></td> -<td style="text-align:left"><code>100</code></td> -</tr> -<tr> -<td style="text-align:left">Bright Red</td> -<td style="text-align:left"><code>91</code></td> -<td style="text-align:left"><code>101</code></td> -</tr> -<tr> -<td style="text-align:left">Bright Green</td> -<td style="text-align:left"><code>92</code></td> -<td style="text-align:left"><code>102</code></td> -</tr> -<tr> -<td style="text-align:left">Bright Yellow</td> -<td style="text-align:left"><code>93</code></td> -<td style="text-align:left"><code>103</code></td> -</tr> -<tr> -<td style="text-align:left">Bright Blue</td> -<td style="text-align:left"><code>94</code></td> -<td style="text-align:left"><code>104</code></td> -</tr> -<tr> -<td style="text-align:left">Bright Magenta</td> -<td style="text-align:left"><code>95</code></td> -<td style="text-align:left"><code>105</code></td> -</tr> -<tr> -<td style="text-align:left">Bright Cyan</td> -<td style="text-align:left"><code>96</code></td> -<td style="text-align:left"><code>106</code></td> -</tr> -<tr> -<td style="text-align:left">Bright White</td> -<td style="text-align:left"><code>97</code></td> -<td style="text-align:left"><code>107</code></td> -</tr> -</tbody> -</table> -<h4 id="256-colors">256 Colors</h4> -<p>The following escape codes tells the terminal to use the given color ID:</p> -<table> -<thead> -<tr> -<th style="text-align:left">ESC Code Sequence</th> -<th style="text-align:left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left"><code>ESC[38;5;{ID}m</code></td> -<td style="text-align:left">Set foreground color.</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[48;5;{ID}m</code></td> -<td style="text-align:left">Set background color.</td> -</tr> -</tbody> -</table> -<p>Where <code>{ID}</code> should be replaced with the color index from 0 to 255 of the following color table:</p> -<p><img src="https://user-images.githubusercontent.com/995050/47952855-ecb12480-df75-11e8-89d4-ac26c50e80b9.png" alt="256 Color table"></p> -<p>The table starts with the original 16 colors (0-15).</p> -<p>The proceeding 216 colors (16-231) or formed by a 3bpc RGB value offset by 16, packed into a single value.</p> -<p>The final 24 colors (232-255) are grayscale starting from a shade slighly lighter than black, ranging up to shade slightly darker than white.</p> -<p>Some emulators interpret these steps as linear increments (<code>256 / 24</code>) on all three channels, although some emulators may explicitly define these values.</p> -<h4 id="rgb-colors">RGB Colors</h4> -<p>More modern terminals supports <a href="https://en.wikipedia.org/wiki/Color_depth#True_color_.2824-bit.29">Truecolor</a> (24-bit RGB), which allows you to set foreground and background colors using RGB.</p> -<p>These escape sequences are usually not well documented.</p> -<table> -<thead> -<tr> -<th style="text-align:left">ESC Code Sequence</th> -<th style="text-align:left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left"><code>ESC[38;2;{r};{g};{b}m</code></td> -<td style="text-align:left">Set foreground color as RGB.</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[48;2;{r};{g};{b}m</code></td> -<td style="text-align:left">Set background color as RGB.</td> -</tr> -</tbody> -</table> -<blockquote> -<p>Note that <code>;38</code> and <code>;48</code> corresponds to the 16 color sequence and is interpreted by the terminal to set the foreground and background color respectively. Where as <code>;2</code> and <code>;5</code> sets the color format.</p> -</blockquote> -<h2 id="screen-modes">Screen Modes</h2> -<h3 id="set-mode">Set Mode</h3> -<table> -<thead> -<tr> -<th style="text-align:left">ESC Code Sequence</th> -<th style="text-align:left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left"><code>ESC[={value}h</code></td> -<td style="text-align:left">Changes the screen width or type to the mode specified by value.</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=0h</code></td> -<td style="text-align:left">40 x 25 monochrome (text)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=1h</code></td> -<td style="text-align:left">40 x 25 color (text)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=2h</code></td> -<td style="text-align:left">80 x 25 monochrome (text)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=3h</code></td> -<td style="text-align:left">80 x 25 color (text)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=4h</code></td> -<td style="text-align:left">320 x 200 4-color (graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=5h</code></td> -<td style="text-align:left">320 x 200 monochrome (graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=6h</code></td> -<td style="text-align:left">640 x 200 monochrome (graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=7h</code></td> -<td style="text-align:left">Enables line wrapping</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=13h</code></td> -<td style="text-align:left">320 x 200 color (graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=14h</code></td> -<td style="text-align:left">640 x 200 color (16-color graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=15h</code></td> -<td style="text-align:left">640 x 350 monochrome (2-color graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=16h</code></td> -<td style="text-align:left">640 x 350 color (16-color graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=17h</code></td> -<td style="text-align:left">640 x 480 monochrome (2-color graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=18h</code></td> -<td style="text-align:left">640 x 480 color (16-color graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[=19h</code></td> -<td style="text-align:left">320 x 200 color (256-color graphics)</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[={value}l</code></td> -<td style="text-align:left">Resets the mode by using the same values that Set Mode uses, except for 7, which disables line wrapping. The last character in this escape sequence is a lowercase L.</td> -</tr> -</tbody> -</table> -<h3 id="common-private-modes">Common Private Modes</h3> -<p>These are some examples of private modes, which are not defined by the specification, but are implemented in most terminals.</p> -<table> -<thead> -<tr> -<th style="text-align:left">ESC Code Sequence</th> -<th style="text-align:left">Description</th> -</tr> -</thead> -<tbody> -<tr> -<td style="text-align:left"><code>ESC[?25l</code></td> -<td style="text-align:left">make cursor invisible</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[?25h</code></td> -<td style="text-align:left">make cursor visible</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[?47l</code></td> -<td style="text-align:left">restore screen</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[?47h</code></td> -<td style="text-align:left">save screen</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[?1049h</code></td> -<td style="text-align:left">enables the alternative buffer</td> -</tr> -<tr> -<td style="text-align:left"><code>ESC[?1049l</code></td> -<td style="text-align:left">disables the alternative buffer</td> -</tr> -</tbody> -</table> -<p>Refer to the <a href="https://invisible-island.net/xterm/ctlseqs/ctlseqs.html">XTerm Control Sequences</a> for a more in-depth list of private modes defined by XTerm.</p> -<blockquote> -<p>Note: While these modes may be supported by the most terminals, some may not work in multiplexers like tmux.</p> -</blockquote> -<h3 id="keyboard-strings">Keyboard Strings</h3> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span>ESC[{code};{string};{...}p -</span></span></code></pre></div><p>Redefines a keyboard key to a specified string.</p> -<p>The parameters for this escape sequence are defined as follows:</p> -<ul> -<li><code>code</code> is one or more of the values listed in the following table. These values represent keyboard keys and key combinations. When using these values in a command, you must type the semicolons shown in this table in addition to the semicolons required by the escape sequence. The codes in parentheses are not available on some keyboards. <code>ANSI.SYS</code> will not interpret the codes in parentheses for those keyboards unless you specify the <code>/X</code> switch in the <code>DEVICE</code> command for <code>ANSI.SYS</code>.</li> -<li><code>string</code> is either the ASCII code for a single character or a string contained in quotation marks. For example, both 65 and “A” can be used to represent an uppercase A.</li> -</ul> -<blockquote> -<p><strong>IMPORTANT:</strong> Some of the values in the following table are not valid for all computers. Check your computer’s documentation for values that are different.</p> -</blockquote> -<h4 id="list-of-keyboard-strings">List of keyboard strings</h4> -<table> -<thead> -<tr> -<th>Key</th> -<th>Code</th> -<th>SHIFT+code</th> -<th>CTRL+code</th> -<th>ALT+code</th> -</tr> -</thead> -<tbody> -<tr> -<td>F1</td> -<td>0;59</td> -<td>0;84</td> -<td>0;94</td> -<td>0;104</td> -</tr> -<tr> -<td>F2</td> -<td>0;60</td> -<td>0;85</td> -<td>0;95</td> -<td>0;105</td> -</tr> -<tr> -<td>F3</td> -<td>0;61</td> -<td>0;86</td> -<td>0;96</td> -<td>0;106</td> -</tr> -<tr> -<td>F4</td> -<td>0;62</td> -<td>0;87</td> -<td>0;97</td> -<td>0;107</td> -</tr> -<tr> -<td>F5</td> -<td>0;63</td> -<td>0;88</td> -<td>0;98</td> -<td>0;108</td> -</tr> -<tr> -<td>F6</td> -<td>0;64</td> -<td>0;89</td> -<td>0;99</td> -<td>0;109</td> -</tr> -<tr> -<td>F7</td> -<td>0;65</td> -<td>0;90</td> -<td>0;100</td> -<td>0;110</td> -</tr> -<tr> -<td>F8</td> -<td>0;66</td> -<td>0;91</td> -<td>0;101</td> -<td>0;111</td> -</tr> -<tr> -<td>F9</td> -<td>0;67</td> -<td>0;92</td> -<td>0;102</td> -<td>0;112</td> -</tr> -<tr> -<td>F10</td> -<td>0;68</td> -<td>0;93</td> -<td>0;103</td> -<td>0;113</td> -</tr> -<tr> -<td>F11</td> -<td>0;133</td> -<td>0;135</td> -<td>0;137</td> -<td>0;139</td> -</tr> -<tr> -<td>F12</td> -<td>0;134</td> -<td>0;136</td> -<td>0;138</td> -<td>0;140</td> -</tr> -<tr> -<td>HOME (num keypad)</td> -<td>0;71</td> -<td>55</td> -<td>0;119</td> -<td>--</td> -</tr> -<tr> -<td>UP ARROW (num keypad)</td> -<td>0;72</td> -<td>56</td> -<td>(0;141)</td> -<td>--</td> -</tr> -<tr> -<td>PAGE UP (num keypad)</td> -<td>0;73</td> -<td>57</td> -<td>0;132</td> -<td>--</td> -</tr> -<tr> -<td>LEFT ARROW (num keypad)</td> -<td>0;75</td> -<td>52</td> -<td>0;115</td> -<td>--</td> -</tr> -<tr> -<td>RIGHT ARROW (num keypad)</td> -<td>0;77</td> -<td>54</td> -<td>0;116</td> -<td>--</td> -</tr> -<tr> -<td>END (num keypad)</td> -<td>0;79</td> -<td>49</td> -<td>0;117</td> -<td>--</td> -</tr> -<tr> -<td>DOWN ARROW (num keypad)</td> -<td>0;80</td> -<td>50</td> -<td>(0;145)</td> -<td>--</td> -</tr> -<tr> -<td>PAGE DOWN (num keypad)</td> -<td>0;81</td> -<td>51</td> -<td>0;118</td> -<td>--</td> -</tr> -<tr> -<td>INSERT (num keypad)</td> -<td>0;82</td> -<td>48</td> -<td>(0;146)</td> -<td>--</td> -</tr> -<tr> -<td>DELETE (num keypad)</td> -<td>0;83</td> -<td>46</td> -<td>(0;147)</td> -<td>--</td> -</tr> -<tr> -<td>HOME</td> -<td>(224;71)</td> -<td>(224;71)</td> -<td>(224;119)</td> -<td>(224;151)</td> -</tr> -<tr> -<td>UP ARROW</td> -<td>(224;72)</td> -<td>(224;72)</td> -<td>(224;141)</td> -<td>(224;152)</td> -</tr> -<tr> -<td>PAGE UP</td> -<td>(224;73)</td> -<td>(224;73)</td> -<td>(224;132)</td> -<td>(224;153)</td> -</tr> -<tr> -<td>LEFT ARROW</td> -<td>(224;75)</td> -<td>(224;75)</td> -<td>(224;115)</td> -<td>(224;155)</td> -</tr> -<tr> -<td>RIGHT ARROW</td> -<td>(224;77)</td> -<td>(224;77)</td> -<td>(224;116)</td> -<td>(224;157)</td> -</tr> -<tr> -<td>END</td> -<td>(224;79)</td> -<td>(224;79)</td> -<td>(224;117)</td> -<td>(224;159)</td> -</tr> -<tr> -<td>DOWN ARROW</td> -<td>(224;80)</td> -<td>(224;80)</td> -<td>(224;145)</td> -<td>(224;154)</td> -</tr> -<tr> -<td>PAGE DOWN</td> -<td>(224;81)</td> -<td>(224;81)</td> -<td>(224;118)</td> -<td>(224;161)</td> -</tr> -<tr> -<td>INSERT</td> -<td>(224;82)</td> -<td>(224;82)</td> -<td>(224;146)</td> -<td>(224;162)</td> -</tr> -<tr> -<td>DELETE</td> -<td>(224;83)</td> -<td>(224;83)</td> -<td>(224;147)</td> -<td>(224;163)</td> -</tr> -<tr> -<td>PRINT SCREEN</td> -<td>--</td> -<td>--</td> -<td>0;114</td> -<td>--</td> -</tr> -<tr> -<td>PAUSE/BREAK</td> -<td>--</td> -<td>--</td> -<td>0;0</td> -<td>--</td> -</tr> -<tr> -<td>BACKSPACE</td> -<td>8</td> -<td>8</td> -<td>127</td> -<td>(0)</td> -</tr> -<tr> -<td>ENTER</td> -<td>13</td> -<td>--</td> -<td>10</td> -<td>(0</td> -</tr> -<tr> -<td>TAB</td> -<td>9</td> -<td>0;15</td> -<td>(0;148)</td> -<td>(0;165)</td> -</tr> -<tr> -<td>NULL</td> -<td>0;3</td> -<td>--</td> -<td>--</td> -<td>--</td> -</tr> -<tr> -<td>A</td> -<td>97</td> -<td>65</td> -<td>1</td> -<td>0;30</td> -</tr> -<tr> -<td>B</td> -<td>98</td> -<td>66</td> -<td>2</td> -<td>0;48</td> -</tr> -<tr> -<td>C</td> -<td>99</td> -<td>66</td> -<td>3</td> -<td>0;46</td> -</tr> -<tr> -<td>D</td> -<td>100</td> -<td>68</td> -<td>4</td> -<td>0;32</td> -</tr> -<tr> -<td>E</td> -<td>101</td> -<td>69</td> -<td>5</td> -<td>0;18</td> -</tr> -<tr> -<td>F</td> -<td>102</td> -<td>70</td> -<td>6</td> -<td>0;33</td> -</tr> -<tr> -<td>G</td> -<td>103</td> -<td>71</td> -<td>7</td> -<td>0;34</td> -</tr> -<tr> -<td>H</td> -<td>104</td> -<td>72</td> -<td>8</td> -<td>0;35</td> -</tr> -<tr> -<td>I</td> -<td>105</td> -<td>73</td> -<td>9</td> -<td>0;23</td> -</tr> -<tr> -<td>J</td> -<td>106</td> -<td>74</td> -<td>10</td> -<td>0;36</td> -</tr> -<tr> -<td>K</td> -<td>107</td> -<td>75</td> -<td>11</td> -<td>0;37</td> -</tr> -<tr> -<td>L</td> -<td>108</td> -<td>76</td> -<td>12</td> -<td>0;38</td> -</tr> -<tr> -<td>M</td> -<td>109</td> -<td>77</td> -<td>13</td> -<td>0;50</td> -</tr> -<tr> -<td>N</td> -<td>110</td> -<td>78</td> -<td>14</td> -<td>0;49</td> -</tr> -<tr> -<td>O</td> -<td>111</td> -<td>79</td> -<td>15</td> -<td>0;24</td> -</tr> -<tr> -<td>P</td> -<td>112</td> -<td>80</td> -<td>16</td> -<td>0;25</td> -</tr> -<tr> -<td>Q</td> -<td>113</td> -<td>81</td> -<td>17</td> -<td>0;16</td> -</tr> -<tr> -<td>R</td> -<td>114</td> -<td>82</td> -<td>18</td> -<td>0;19</td> -</tr> -<tr> -<td>S</td> -<td>115</td> -<td>83</td> -<td>19</td> -<td>0;31</td> -</tr> -<tr> -<td>T</td> -<td>116</td> -<td>84</td> -<td>20</td> -<td>0;20</td> -</tr> -<tr> -<td>U</td> -<td>117</td> -<td>85</td> -<td>21</td> -<td>0;22</td> -</tr> -<tr> -<td>V</td> -<td>118</td> -<td>86</td> -<td>22</td> -<td>0;47</td> -</tr> -<tr> -<td>W</td> -<td>119</td> -<td>87</td> -<td>23</td> -<td>0;17</td> -</tr> -<tr> -<td>X</td> -<td>120</td> -<td>88</td> -<td>24</td> -<td>0;45</td> -</tr> -<tr> -<td>Y</td> -<td>121</td> -<td>89</td> -<td>25</td> -<td>0;21</td> -</tr> -<tr> -<td>Z</td> -<td>122</td> -<td>90</td> -<td>26</td> -<td>0;44</td> -</tr> -<tr> -<td>1</td> -<td>49</td> -<td>33</td> -<td>--</td> -<td>0;120</td> -</tr> -<tr> -<td>2</td> -<td>50</td> -<td>64</td> -<td>0</td> -<td>0;121</td> -</tr> -<tr> -<td>3</td> -<td>51</td> -<td>35</td> -<td>--</td> -<td>0;122</td> -</tr> -<tr> -<td>4</td> -<td>52</td> -<td>36</td> -<td>--</td> -<td>0;123</td> -</tr> -<tr> -<td>5</td> -<td>53</td> -<td>37</td> -<td>--</td> -<td>0;124</td> -</tr> -<tr> -<td>6</td> -<td>54</td> -<td>94</td> -<td>30</td> -<td>0;125</td> -</tr> -<tr> -<td>7</td> -<td>55</td> -<td>38</td> -<td>--</td> -<td>0;126</td> -</tr> -<tr> -<td>8</td> -<td>56</td> -<td>42</td> -<td>--</td> -<td>0;126</td> -</tr> -<tr> -<td>9</td> -<td>57</td> -<td>40</td> -<td>--</td> -<td>0;127</td> -</tr> -<tr> -<td>0</td> -<td>48</td> -<td>41</td> -<td>--</td> -<td>0;129</td> -</tr> -<tr> -<td>-</td> -<td>45</td> -<td>95</td> -<td>31</td> -<td>0;130</td> -</tr> -<tr> -<td>=</td> -<td>61</td> -<td>43</td> -<td>-–</td> -<td>0;131</td> -</tr> -<tr> -<td>[</td> -<td>91</td> -<td>123</td> -<td>27</td> -<td>0;26</td> -</tr> -<tr> -<td>]</td> -<td>93</td> -<td>125</td> -<td>29</td> -<td>0;27</td> -</tr> -<tr> -<td></td> -<td>92</td> -<td>124</td> -<td>28</td> -<td>0;43</td> -</tr> -<tr> -<td>;</td> -<td>59</td> -<td>58</td> -<td>--</td> -<td>0;39</td> -</tr> -<tr> -<td>'</td> -<td>39</td> -<td>34</td> -<td>--</td> -<td>0;40</td> -</tr> -<tr> -<td>,</td> -<td>44</td> -<td>60</td> -<td>--</td> -<td>0;51</td> -</tr> -<tr> -<td>.</td> -<td>46</td> -<td>62</td> -<td>--</td> -<td>0;52</td> -</tr> -<tr> -<td>/</td> -<td>47</td> -<td>63</td> -<td>--</td> -<td>0;53</td> -</tr> -<tr> -<td>`</td> -<td>96</td> -<td>126</td> -<td>--</td> -<td>(0;41)</td> -</tr> -<tr> -<td>ENTER (keypad)</td> -<td>13</td> -<td>--</td> -<td>10</td> -<td>(0;166)</td> -</tr> -<tr> -<td>/ (keypad)</td> -<td>47</td> -<td>47</td> -<td>(0;142)</td> -<td>(0;74)</td> -</tr> -<tr> -<td>* (keypad)</td> -<td>42</td> -<td>(0;144)</td> -<td>(0;78)</td> -<td>--</td> -</tr> -<tr> -<td>- (keypad)</td> -<td>45</td> -<td>45</td> -<td>(0;149)</td> -<td>(0;164)</td> -</tr> -<tr> -<td>+ (keypad)</td> -<td>43</td> -<td>43</td> -<td>(0;150)</td> -<td>(0;55)</td> -</tr> -<tr> -<td>5 (keypad)</td> -<td>(0;76)</td> -<td>53</td> -<td>(0;143)</td> -<td>--</td> -</tr> -</tbody> -</table> -<h2 id="resources">Resources</h2> -<ul> -<li><a href="https://en.wikipedia.org/wiki/ANSI_escape_code">Wikipedia: ANSI escape code</a></li> -<li><a href="http://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html">Build your own Command Line with ANSI escape codes</a></li> -<li><a href="http://ascii-table.com/ansi-escape-sequences.php">ascii-table: ANSI Escape sequences</a></li> -<li><a href="https://bluesock.org/~willkg/dev/ansi.html">bluesock: ansi codes</a></li> -<li><a href="http://wiki.bash-hackers.org/scripting/terminalcodes">bash-hackers: Terminal Codes (ANSI/VT100) introduction</a></li> -<li><a href="https://invisible-island.net/xterm/ctlseqs/ctlseqs.html">XTerm Control Sequences</a></li> -<li><a href="https://vt100.net/">VT100 – Various terminal manuals</a></li> -<li><a href="https://xtermjs.org/docs/api/vtfeatures/">xterm.js – Supported Terminal Sequences</a></li> -</ul> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/6/index.html b/posts/6/index.html deleted file mode 100644 index ecb751a..0000000 --- a/posts/6/index.html +++ /dev/null @@ -1,361 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/6/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/6/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Mess with Bash(2)", - "headline" : "Mess with Bash(2)", - "description" : "More info is in this tutorial\nall value expansions (ie. all syntax with a $ prefix) can only expand inside quoted arguments if the argument was double-quoted . Single quotes will turn the dollar-syntax into literal characters, causing bash to output the dollar rather than expand its value in-place!\n\u0026ldquo;Value expansions ($...) must always be double-quoted.\u0026rdquo;\nNever leave a value expansion unquoted.\nRedirection File Redirection 0 is standard input, 1 is standard output, 2 is standard error", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-09-29 09:43:02 \u002b0800 CST", - "dateModified" : "2022-09-29 09:43:02 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/6\/", - "keywords" : [ ] - } -</script> -<title>Mess with Bash(2)</title> - <meta property="og:title" content="Mess with Bash(2)" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="More info is in this tutorial -all value expansions (ie. all syntax with a $ prefix) can only expand inside quoted arguments if the argument was double-quoted . Single quotes will turn the dollar-syntax into literal characters, causing bash to output the dollar rather than expand its value in-place! -&ldquo;Value expansions ($...) must always be double-quoted.&rdquo; -Never leave a value expansion unquoted. -Redirection File Redirection 0 is standard input, 1 is standard output, 2 is standard error" /> - <meta name="description" content="More info is in this tutorial -all value expansions (ie. all syntax with a $ prefix) can only expand inside quoted arguments if the argument was double-quoted . Single quotes will turn the dollar-syntax into literal characters, causing bash to output the dollar rather than expand its value in-place! -&ldquo;Value expansions ($...) must always be double-quoted.&rdquo; -Never leave a value expansion unquoted. -Redirection File Redirection 0 is standard input, 1 is standard output, 2 is standard error" /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">Mess with Bash(2)</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-09-29 09:43:02 CST"> - 29 Sep 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <blockquote> -<p>More info is in this <a href="https://https://guide.bash.academy">tutorial</a></p> -</blockquote> -<blockquote> -<p>all value expansions (ie. all syntax with a <code>$</code> prefix) can only expand inside quoted arguments if the argument was <em>double-quoted</em> . Single quotes will turn the dollar-syntax into literal characters, causing bash to output the dollar rather than expand its value in-place!</p> -</blockquote> -<p><em>“Value expansions (<code>$...</code>) must <strong>always</strong> be double-quoted.”</em></p> -<p><em>Never leave a value expansion unquoted.</em></p> -<h2 id="redirection">Redirection</h2> -<h3 id="file-redirection">File Redirection</h3> -<p><strong>0 is standard input, 1 is standard output, 2 is standard error</strong></p> -<p><code>[x] > file, [x] < file</code></p> -<p>Make <em><strong>File descriptor</strong></em>(FD) <code>x</code> write to / read from file.</p> -<blockquote> -<p><code>echo hello > ~/World</code></p> -<p><code>read line < ~/Word</code></p> -<p><code>rm file 2>/dev/null</code></p> -</blockquote> -<h3 id="file-descriptor-copying">File Descriptor copying</h3> -<p><code>[x] >& y, [x] <& y</code></p> -<p>make FD <code>x</code> write to / read from FD <code>y</code>’s stream</p> -<blockquote> -<p>the connection to the stream used by FD <code>y</code> is copied to FD <code>x</code></p> -<p><code>curl cip.cc > result 2>&1</code></p> -<p><code>ping localhost > result 2>&1</code></p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="font-style:italic"># exec can be used to change the file descriptors of bash itself,</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># and if you use an x that doesn't yet exist,</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># bash will create a new file descriptor ("plug") for you with that number.</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># - in command is to close new FD 3 we'd created before.</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># >&- is to close FD 1, <&- is to close FD0</span> -</span></span><span style="display:flex;"><span>exec 3>&1 >mylog; echo moo; exec 1>&3 3>&- -</span></span></code></pre></div></blockquote> -<h3 id="appending-file-redirection">Appending file redirection</h3> -<p><code>[x] >> file</code></p> -<p>make FD <code>x</code> append to end of the file</p> -<blockquote> -<p>A stream to <code>file</code> is opened for writing in append mode and is connected to file descriptor <code>x</code>. The regular file redirection operator <code>></code> empties the file’s contents when it opens the file so that only your bytes will be in the file.</p> -<p><code>echo hello >> ~/world</code></p> -<p><code>echo world >> ~/world</code></p> -</blockquote> -<h3 id="redirecting-standard-output-and-standard-error">Redirecting standard output and standard error</h3> -<p><code>&>file</code></p> -<p>Make both FD 1 (standard output) and FD 2 (standard error) write to file</p> -<blockquote> -<p>This is a convenience operator which does the same thing as <code>>file 2>&1</code> but is more concise. Again, you can append rather than truncate by doubling the arrow: <code>&>>file</code></p> -<p><code>ping localhost &>result</code></p> -</blockquote> -<h3 id="here-documents">Here documents</h3> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="font-style:italic"><<delimiter -</span></span></span><span style="display:flex;"><span><span style="font-style:italic"> Here document -</span></span></span><span style="display:flex;"><span><span style="font-style:italic">delimiter</span> -</span></span></code></pre></div><p>Make FD 0 read from the string between <code>delimiter</code>s</p> -<blockquote> -<p>Here-Documents are great for reading blocks of text to command line.</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cat <span style="font-style:italic"><< EOF -</span></span></span><span style="display:flex;"><span><span style="font-style:italic">this is within here document -</span></span></span><span style="display:flex;"><span><span style="font-style:italic">I can write as many lines as I like -</span></span></span><span style="display:flex;"><span><span style="font-style:italic">and terminate with line of demiliter only -</span></span></span><span style="display:flex;"><span><span style="font-style:italic">EOF</span> //end of heredoc -</span></span></code></pre></div></blockquote> -<h3 id="here-strings">Here strings</h3> -<p><code><<< string</code></p> -<p>Make FD 0 read from the <code>string</code></p> -<blockquote> -<p>Here strings are very similar to here documents but more concise. They are generally preferred over here documents.</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>cat <<< <span style="font-style:italic">"This, -</span></span></span><span style="display:flex;"><span><span style="font-style:italic">is the here strings. tab will also be read."</span> -</span></span></code></pre></div></blockquote> -<h3 id="moving-file-decipher">Moving file decipher</h3> -<p><code>[x]>&y-, [x]<&y-</code></p> -<p>Replace FD <code>x</code> with FD <code>y</code> and close FD <code>y</code></p> -<blockquote> -<p>Easy way of <code>[x]>&y, y>&-</code></p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="font-style:italic"># 3>&1-: copy FD 1 to FD 3 and close FD 1.</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># >&3-: copy FD 3 to FD 1 and close FD 3.</span> -</span></span><span style="display:flex;"><span>exec 3>&1- >mylog; echo moo; exec >&3- -</span></span></code></pre></div></blockquote> -<h3 id="reading-and-writing-with-file-descriptor">Reading and writing with file descriptor</h3> -<p><code>[x] <> file</code></p> -<p>Open FD <code>x</code> for both reading and writing to <code>file</code></p> -<blockquote> -<p>The file descriptor at x is opened with a stream to the file that can be used for writing as well as reading bytes. Usually you’ll use two file descriptors for this. <strong>One of the rare cases where this is useful is when setting up a stream with a read/write device such as a network socket</strong>.</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>exec 5<>aFile -</span></span><span style="display:flex;"><span>cat >&5 <span style="font-style:italic">"Hello world"</span> <span style="font-style:italic"># make FD 1 write to where FD 5 currently writing, copy file descriptor FD 5 to FD 1</span> -</span></span><span style="display:flex;"><span>cat <&5 <span style="font-style:italic"># make FD 0 read from where FD 5 currently reading, copy file descriptor FD 5 to FD 0, then cat will send content to FD 1</span> -</span></span></code></pre></div></blockquote> -<p>Exercise</p> -<blockquote> -<p>Q: fix <code>exec 3>&2 2>log; echo 'Hello!'; exec 2>&3</code> so that the message is properly saved into the <code>log</code> file and such that FD 3 is properly closed afterwards:</p> -<p>A:</p> -<ol> -<li><code>exec 3>&1- 3>log; echo 'Hello!'; exec 1>&3-</code></li> -<li><code>exec 3>&1 1>&- 3>log; echo 'Hello!'; exec 1>&3 3>&-</code></li> -</ol> -</blockquote> -<h2 id="expansion">Expansion</h2> -<h3 id="pathname-expansion">pathname expansion</h3> -<ol> -<li> -<p>pattern expansion is performed by bash before command even execute</p> -<blockquote> -<p><code>file *</code> will show info about all file in current directory. <code>*</code> will expand to content before <code>file</code> execute.</p> -</blockquote> -</li> -<li> -<p>A <em>glob</em> is the name of the type of pattern supported by the bash shell.</p> -<blockquote> -<p>basic glob name supported by bash<img src="https://assets.garhve.com/pictures/screenshots/2022/10/1665123982.png" alt="explanation"></p> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/10/1665133964.png" alt="example"></p> -<p><strong>Those glob will only affect current directory, explicit expression is required to working on other directory.</strong> <code>ls /sub/*</code></p> -</blockquote> -</li> -<li> -<p>extended glob can be enable to get more powerful but also easy confusing feature of bash</p> -<blockquote> -<p>bash: <code>shopt -s extglob</code> -zsh. : <code>setopt extendedglob</code> -<img src="https://assets.garhve.com/pictures/screenshots/2022/10/1665134156.png" alt="explanation"></p> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/10/1665134205.png" alt="!(my)* get expand because of * is outside !(), which makes it expland another whole pathname"></p> -</blockquote> -</li> -</ol> -<h3 id="command-substitution">Command Substitution</h3> -<p>we can expansion commands within commands, but must use double-quote <code>""</code> instead of <code>''</code></p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="font-style:italic"># this will output contents in hello.h to screen</span> -</span></span><span style="display:flex;"><span>cat hello.h -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># this will expand `cat hello.h` to real contents in </span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># file hello.h and concatenate to previous sentence</span> -</span></span><span style="display:flex;"><span>echo <span style="font-style:italic">"file hello.h contains contents of </span><span style="font-weight:bold">$(</span>cat hello.h<span style="font-weight:bold">)</span><span style="font-style:italic">"</span> -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># this will output 'file hello.h contains contents of $(cat hello.h)'</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># without expand command in $()</span> -</span></span><span style="display:flex;"><span>echo <span style="font-style:italic">'file hello.h contains contents of $(cat hello.h)'</span> -</span></span></code></pre></div><p>In command, <code>$()</code> is called <em>value expansion</em>, it consists of value-expansion prefix <code>$</code> and subshell <code>(...)</code>. A subshell is essentially a small new bash process that is used to run a command while the main bash shell waits for the result.</p> -<h2 id="parameters">Parameters</h2> -<p>There are three kind of parameters:</p> -<ol> -<li>Environment Parameter</li> -<li>Positional Parameter</li> -<li>Variables</li> -</ol> -<h3 id="environment-parameter">Environment Parameter</h3> -<p>environment variables exist at the process level. That means they are not a feature of the bash shell, but rather a feature of any program process on your system. They can inherit by children, but children’s EV can’t be given to parent.</p> -<h3 id="positional-parameter">Positional Parameter</h3> -<p>Just as name indicates, these kind of parameters indicate arguments’ position, and always starting from 0.</p> -<p>for example, imaging we have a script <code>rename</code>, arguments could be passed to it to extend its usage:</p> -<p><code>rename dir name</code> there, we passed <code>dir</code> and <code>name</code> as argument, so that positional parameters in script would be <code>$1</code> and <code>$2</code>, representing arguments respectively. after <code>$2</code>, such as <code>$3</code> is unset since there has no more argument.</p> -<blockquote> -<p>Positional Parameter is read-only</p> -</blockquote> -<p>a new usage: <code>bash -c 'ls "$1"' -- '/home'</code>. This will working like <code>ls /home</code>, dash is necessary since it is first variable in shell we ran commands and it makes positional value of arguments populated after it stand as we expect in shell single-quoted command gonna run in.</p> -<h3 id="special-parameter">Special Parameter</h3> -<p>Special parameters are parameters whose name is a single symbolic character, they are used to request certain state information from the bash shell. Like positional parameter, they are <em>read-only</em>.</p> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/10/1666054171.png" alt="different kinds of special parameters and the information they hold"></p> -<h3 id="variables">Variables</h3> -<p>definition: <code>name=value</code> <em>//no space around <code>=</code> like other programming language support</em></p> -<p>call: like <em>command expansion</em>, using variable is to expand it with prefix <code>$</code>, e.g. <code>$name</code></p> -<ul> -<li>Keep in mind, Expansion should always be double-quoted *</li> -</ul> -<h3 id="parameter-expansion">Parameter expansion</h3> -<blockquote> -<p><a href="https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html">GNU material</a></p> -</blockquote> -<p>we expand parameters by prefixing their name with a <code>$</code> symbol</p> -<blockquote> -<p>e.g. <code>name=me; echo hello "$name"</code>. <code>hello me</code>.</p> -</blockquote> -<p>In addition, we can put braces (<code>{</code> and <code>}</code>) around our parameter, which indicates where variable is about to begin and end.</p> -<blockquote> -<p>e.g. <code>name=orange; echo there are 4 "${name}s"</code> <code>there are 4 oranges</code>.</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>name=orange -</span></span><span style="display:flex;"><span>echo <span style="font-style:italic">"there are 4 </span><span style="font-weight:bold;font-style:italic">${</span>name<span style="font-weight:bold;font-style:italic">}</span><span style="font-style:italic">s."</span> <span style="font-style:italic"># there are 4 oranges.</span> -</span></span><span style="display:flex;"><span>echo <span style="font-style:italic">"there are 4 </span>$names<span style="font-style:italic">."</span> <span style="font-style:italic"># there are 4 .</span> -</span></span></code></pre></div><p>here, we put <code>{}</code>around<code>name</code>so that bash can be told that suffix <code>s</code> is not a part of variable. otherwise, it will treat <code>names</code> as parameter and looking for its value, which is none in our example.</p> -</blockquote> -<p>parameter expansion brings up a powerful feature: <em>parameter expansion oerators</em></p> -<blockquote> -<p>While expanding a parameter, it is possible to apply an operator to the expanding value without alternate original value.</p> -<p>I use these mostly</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span><span style="font-style:italic"># remove string before pattern ${name#pattern} shortest ${name##pattern} longest</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># remove string after pattern ${name%pattern} longest ${name%%pattern} shortest</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># delete first matching pattern ${name/pattern}</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># delete all matching pattern ${name//pattern}</span> -</span></span><span style="display:flex;"><span><span style="font-style:italic"># substitute pattern with string ${name//pattern/string}</span> -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>foo=<span style="font-style:italic">"foo-bar-foobar"</span> -</span></span><span style="display:flex;"><span>echo <span style="font-weight:bold;font-style:italic">${</span>foo#*-<span style="font-weight:bold;font-style:italic">}</span> <span style="font-style:italic"># echoes 'bar-foobar' (Removes 'foo-' because that matches '*-')</span> -</span></span><span style="display:flex;"><span>echo <span style="font-weight:bold;font-style:italic">${</span>foo##*-<span style="font-weight:bold;font-style:italic">}</span> <span style="font-style:italic"># echoes 'foobar' (Removes 'foo-bar-')</span> -</span></span><span style="display:flex;"><span>echo <span style="font-weight:bold;font-style:italic">${</span>foo%-*<span style="font-weight:bold;font-style:italic">}</span> <span style="font-style:italic"># echoes 'foo-bar'</span> -</span></span><span style="display:flex;"><span>echo <span style="font-weight:bold;font-style:italic">${</span>foo%%-*<span style="font-weight:bold;font-style:italic">}</span> <span style="font-style:italic"># echoes 'foo'</span> -</span></span><span style="display:flex;"><span>echo <span style="font-weight:bold;font-style:italic">${</span>foo/-<span style="font-weight:bold;font-style:italic">}</span> <span style="font-style:italic"># echoes 'foobar-foobar'</span> -</span></span><span style="display:flex;"><span>echo <span style="font-weight:bold;font-style:italic">${</span>foo//-<span style="font-weight:bold;font-style:italic">}</span> <span style="font-style:italic"># echoes 'foobarfoobar'</span> -</span></span><span style="display:flex;"><span>echo <span style="font-weight:bold;font-style:italic">${</span>foo//-/_<span style="font-weight:bold;font-style:italic">}</span> <span style="font-style:italic"># echoes 'foo_bar_foobar'</span> -</span></span></code></pre></div></blockquote> -<p><img src="https://assets.garhve.com/pictures/screenshots/2022/10/1665660923.png" alt="part of operators as shown picture"></p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/7/index.html b/posts/7/index.html deleted file mode 100644 index 0678690..0000000 --- a/posts/7/index.html +++ /dev/null @@ -1,166 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/7/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/7/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Past Is Great", - "headline" : "Past Is Great", - "description" : "Lately, there’s a sign has been keeping jumping out in front of my eyes. That the past is great!\nFirst is in the movie Midnight in Paris, directed by Woody Allen, which I just finished a week ago. It tells a story of how a screen writer loves 20th century because his loving artists all living in it. Though he finally realized that he loves past because the present is imperfect.", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-11-07 09:16:15 \u002b0800 CST", - "dateModified" : "2022-11-07 09:16:15 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/7\/", - "keywords" : [ ] - } -</script> -<title>Past Is Great</title> - <meta property="og:title" content="Past Is Great" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="Lately, there’s a sign has been keeping jumping out in front of my eyes. That the past is great! -First is in the movie Midnight in Paris, directed by Woody Allen, which I just finished a week ago. It tells a story of how a screen writer loves 20th century because his loving artists all living in it. Though he finally realized that he loves past because the present is imperfect." /> - <meta name="description" content="Lately, there’s a sign has been keeping jumping out in front of my eyes. That the past is great! -First is in the movie Midnight in Paris, directed by Woody Allen, which I just finished a week ago. It tells a story of how a screen writer loves 20th century because his loving artists all living in it. Though he finally realized that he loves past because the present is imperfect." /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">Past Is Great</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-11-07 09:16:15 CST"> - 07 Nov 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <p>Lately, there’s a sign has been keeping jumping out in front of my eyes. That the past is great!</p> -<p>First is in the movie Midnight in Paris, directed by Woody Allen, which I just finished a week ago. It tells a story of how a screen writer loves 20th century because his loving artists all living in it. Though he finally realized that he loves past because the present is imperfect.</p> -<p>Second is my YouTube keeps suggesting songs that got me reminiscence bump. Such songs that remind me when the time power cut is regular and the phone has not yet existed. I still remember the feel when I am wrapped in quilt and watch TV in the cold night… dizzy.</p> -<p>Third just happened now, I was gonna start watching Doraemon, and the title of the episode I’m getting at is ‘Past is Great’, seriously???</p> -<p>even two of them would tell me the present is better than past, I still miss past. Midnight in Paris said we love past because present unsatisfied. And ‘Past is Great’ shows us comparing of ancient and modern lives style. Both views are most people miss about past, either think their life sucks or just wanna experience life in past.</p> -<p>Well, I’m not both… I miss past is that it is fixed, it is unchangeable. No matter what we do now, past is past, it right there, waiting to be read. this feel just like when I watch shows or movies. I’d want to know what ending it will be, and release my imagination along with shows to get that result.</p> -<p>Same thing happens here. Few scenes I remember, or the music I think familiar, but I don’t know when or where I experienced it, I would start my imagination. Maybe I was doing something funny, maybe I was going to somewhere nice, maybe… maybe… then, I got here. The beauty part is, I always thought nice thing, and it always make me feel ease. That’s good enough for me.</p> -<p>I said there’s this sign… Actually, not really. Just some shit things happend recently that make me want to run away. The ‘sign’ just is what I want to see now, not that it really a sign.</p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/8/index.html b/posts/8/index.html deleted file mode 100644 index 8166ea7..0000000 --- a/posts/8/index.html +++ /dev/null @@ -1,168 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/8/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/8/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Getting unified experience", - "headline" : "Getting unified experience", - "description" : "Lately, I\u0026rsquo;m trying get my tools working seamlessly cross my 2 working machines as well as a server.\nSince I already heard dotfiles for a while, but didn\u0026rsquo;t get chance to familiar with. So I start searching around trying to set a dotfile up.\nFrankly, it is not that simple as I thought, given that my grounds differ from each other: 1x macOS, 1x archLinux, 1x archLinux server.\nHere\u0026rsquo;s a brief description: all configuration files I want to put in .", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-12-07 15:05:30 \u002b0800 CST", - "dateModified" : "2022-12-07 15:05:30 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/8\/", - "keywords" : [ ] - } -</script> -<title>Getting unified experience</title> - <meta property="og:title" content="Getting unified experience" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="Lately, I&rsquo;m trying get my tools working seamlessly cross my 2 working machines as well as a server. -Since I already heard dotfiles for a while, but didn&rsquo;t get chance to familiar with. So I start searching around trying to set a dotfile up. -Frankly, it is not that simple as I thought, given that my grounds differ from each other: 1x macOS, 1x archLinux, 1x archLinux server. -Here&rsquo;s a brief description: all configuration files I want to put in ." /> - <meta name="description" content="Lately, I&rsquo;m trying get my tools working seamlessly cross my 2 working machines as well as a server. -Since I already heard dotfiles for a while, but didn&rsquo;t get chance to familiar with. So I start searching around trying to set a dotfile up. -Frankly, it is not that simple as I thought, given that my grounds differ from each other: 1x macOS, 1x archLinux, 1x archLinux server. -Here&rsquo;s a brief description: all configuration files I want to put in ." /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">Getting unified experience</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-12-07 15:05:30 CST"> - 07 Dec 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <p>Lately, I’m trying get my tools working seamlessly cross my 2 working machines as well as a server.</p> -<p>Since I already heard dotfiles for a while, but didn’t get chance to familiar with. So I start searching around trying to set a dotfile up.</p> -<p>Frankly, it is not that simple as I thought, given that my grounds differ from each other: 1x macOS, 1x archLinux, 1x archLinux server.</p> -<p>Here’s a brief description: all configuration files I want to put in <code>.config</code>, all plugins and config related files I want to place in <code>.local</code>. -The files I want to sync now are the configs and plugins of vim, zsh, tmux, gpg, and git. Those 5 softwares are my root.</p> -<p>The problem is, due to different environment, my config for those machines have some custom setting, such as <code>XDG</code> env, my macOS doesn’t need it.</p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/9/index.html b/posts/9/index.html deleted file mode 100644 index 2826311..0000000 --- a/posts/9/index.html +++ /dev/null @@ -1,256 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/9/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/9/" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "测试自动创建博客", - "headline" : "测试自动创建博客", - "description" : "hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题:\n写作 编辑器随便用个支持MD的就行了,这句陈述挺好。\n但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local 文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, 同步文件再在每台电脑上额外加个云,想想我都受不了。\n不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 问题我不太想用。\n其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, 达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 直接使用vim写文章,有点别扭\u0026hellip; 用vim写markdown。\n图片 图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, 但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。\n在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, 后面使用即可。\nLinux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~\n发布 Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, 其中便包括这个博客。 Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。\n原先,发布一篇博客我的流程为,\nhugo new post -\u0026gt; vim 找到文章 -\u0026gt; 保存或者发布 -\u0026gt; 然后到public文件夹 push出去。\n太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 我也可以直接将草稿发布出来,看得见,我才有动力写~\n###################################################################### # @author : garhve (dev@garhve.com) # @file : blog # @created : Friday Dec 09, 2022 16:09:42 CST # # @description : simplify blog publishing.", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-12-09 16:38:56 \u002b0800 CST", - "dateModified" : "2022-12-09 16:38:56 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/9\/", - "keywords" : [ ] - } -</script> -<title>测试自动创建博客</title> - <meta property="og:title" content="测试自动创建博客" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题: -写作 编辑器随便用个支持MD的就行了,这句陈述挺好。 -但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local 文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, 同步文件再在每台电脑上额外加个云,想想我都受不了。 -不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 问题我不太想用。 -其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, 达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 直接使用vim写文章,有点别扭&hellip; 用vim写markdown。 -图片 图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, 但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。 -在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, 后面使用即可。 -Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~ -发布 Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, 其中便包括这个博客。 Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。 -原先,发布一篇博客我的流程为, -hugo new post -&gt; vim 找到文章 -&gt; 保存或者发布 -&gt; 然后到public文件夹 push出去。 -太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 我也可以直接将草稿发布出来,看得见,我才有动力写~ -###################################################################### # @author : garhve (dev@garhve.com) # @file : blog # @created : Friday Dec 09, 2022 16:09:42 CST # # @description : simplify blog publishing." /> - <meta name="description" content="hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题: -写作 编辑器随便用个支持MD的就行了,这句陈述挺好。 -但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local 文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, 同步文件再在每台电脑上额外加个云,想想我都受不了。 -不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 问题我不太想用。 -其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, 达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 直接使用vim写文章,有点别扭&hellip; 用vim写markdown。 -图片 图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, 但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。 -在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, 后面使用即可。 -Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~ -发布 Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, 其中便包括这个博客。 Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。 -原先,发布一篇博客我的流程为, -hugo new post -&gt; vim 找到文章 -&gt; 保存或者发布 -&gt; 然后到public文件夹 push出去。 -太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 我也可以直接将草稿发布出来,看得见,我才有动力写~ -###################################################################### # @author : garhve (dev@garhve.com) # @file : blog # @created : Friday Dec 09, 2022 16:09:42 CST # # @description : simplify blog publishing." /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="" /> - - - - - <style>body{font-family:bree serif,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:85%;background-color:#f6f8fa;border-radius:6px;font-family:fira code,monospace}.markdown-body pre>code{padding:0;font-size:80%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">测试自动创建博客</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-12-09 16:38:56 CST"> - 09 Dec 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <p>hugo挺不错的,就是太麻烦了。以下几点都是在使用时遇到的一些问题:</p> -<h3 id="写作">写作</h3> -<p>编辑器随便用个支持MD的就行了,这句陈述挺好。</p> -<p>但现实是,我家里一台MacBook,一台arch Linux的Thinkpad,公司一台MacBook。 -所以跨平台对我来说就很重要了。我有点洁癖,家目录我都在努力的把config和local -文件整合在各自不同的区域名以至于不那么乱。在每台电脑上下个markdown editor, -同步文件再在每台电脑上额外加个云,想想我都受不了。</p> -<p>不过目前我试过了一个软件marktext,功能和UI都很不错,但由于同步 -问题我不太想用。</p> -<p>其实我比较倾向于下载个web app搭在我raspberry pi上,再通过公网挂出去, -达到我在任意地方都能使用的目的来着,但目前的app总有这样那样的问题 -使我不是很满意,也就一直耽搁着了,现在也就是通过ssh直接到我的arch里 -直接使用vim写文章,有点别扭… 用vim写markdown。</p> -<h3 id="图片">图片</h3> -<p>图片怎么管理原本也是个问题,我买入了一个存储桶并配置好了nginx, -但这比较适合fetch图片,当我截了新图要上传时,要么登录存储桶要么scp到 -服务器去上传,而且传好后的url也是一个麻烦事。试了各种方法都不太行之后。</p> -<p>在Mac端我用了uPic,这个比较方便的是不止可以传图片,其他文件需要 -保存了也可以通过它上传,并且,它支持上传后直接拿到自定义对url,对于 -我自定义了域名去匹配nginx的规则很方便。而且只需第一次配置好, -后面使用即可。</p> -<p>Linux端呢,则暂时没有什么好办法,只能老老实实打开网页上传了~</p> -<h3 id="发布">发布</h3> -<p>Hugo的发布其实也是一个问题。在上面说过,我有洁癖,其实我还有一些强迫症。 -自从GitHub被微软收购后,我很少使用了。虽然我只是一介平民,但我还是希望 -尽可能将我不同的指纹分散隔离开来。我用了我自有的服务器去托管我的一些服务, -其中便包括这个博客。 -Hugo我是安装在我的Linux上,我并没有让它接入公网。我有在服务器上托管了一个 -cgit来当我的私人仓库,于是理所当然的,我把public给git到服务器上了。</p> -<p>原先,发布一篇博客我的流程为,</p> -<blockquote> -<p>hugo new post -> vim 找到文章 -> 保存或者发布 -> 然后到public文件夹 -push出去。</p> -</blockquote> -<p>太麻烦了,我就写了个简单的脚本来简化一下流程,反正是自用的,所以也不用考虑 -怎么处理不同的位置,并且原先由于发布比较繁琐,草稿就都存在本地了,现在 -我也可以直接将草稿发布出来,看得见,我才有动力写~</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>###################################################################### -</span></span><span style="display:flex;"><span># @author : garhve (dev@garhve.com) -</span></span><span style="display:flex;"><span># @file : blog -</span></span><span style="display:flex;"><span># @created : Friday Dec 09, 2022 16:09:42 CST -</span></span><span style="display:flex;"><span># -</span></span><span style="display:flex;"><span># @description : simplify blog publishing. -</span></span><span style="display:flex;"><span>###################################################################### -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>p="$(pwd)" -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>cd "$HOME/Storage/data/blog" -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>echo "Enter the blog name" -</span></span><span style="display:flex;"><span>read -r name -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>hugo new posts/"$name" -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>echo "1. en" -</span></span><span style="display:flex;"><span>echo "2. cn" -</span></span><span style="display:flex;"><span>echo "all option would be default to 1 except 2[1 or 2]: " -</span></span><span style="display:flex;"><span>read l -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>if [ l -eq 1 ]; then -</span></span><span style="display:flex;"><span> lang="en" -</span></span><span style="display:flex;"><span>elif [ l -eq 2 ]; then -</span></span><span style="display:flex;"><span> lang="cn" -</span></span><span style="display:flex;"><span>else -</span></span><span style="display:flex;"><span> lang="en" -</span></span><span style="display:flex;"><span>fi -</span></span><span style="display:flex;"><span>[ lang == "cn" ] && mv "content/en/posts/$name" "content/cn/posts/$name" -</span></span><span style="display:flex;"><span>vim "content/$lang/posts/$name" -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>hugo -</span></span><span style="display:flex;"><span>cd public -</span></span><span style="display:flex;"><span>git add . -</span></span><span style="display:flex;"><span>read -r -p "commit message: " com -</span></span><span style="display:flex;"><span>git commit -m "$com" -</span></span><span style="display:flex;"><span> -</span></span><span style="display:flex;"><span>cd "$p" -</span></span></code></pre></div><p>这片文章的出现,也只是我想确认一下能不能正确处理好中文内容。这样一说,突然想起来编辑也挺麻烦的。。 -也许可以将代码优化下以后就省心了,哈哈。</p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> diff --git a/posts/index.html b/posts/index.html deleted file mode 100644 index c6f649b..0000000 --- a/posts/index.html +++ /dev/null @@ -1,243 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "Posts", - "headline" : "Posts", - "description" : "", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-12-14 11:03:52 \u002b0800 CST", - "dateModified" : "2022-12-14 11:03:52 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/", - "keywords" : [ ] - } -</script> -<title>Posts</title> - <meta property="og:title" content="Posts" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="" /> - <meta name="description" content="" /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="posts"> - <div class="row"> - <div class="col-xs-12"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - - <h1 class="taxonomy-term"></h1> - <div id="posts-list"> - <section> - <h1 class="site-date-catalog">2022</h1> - - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-12-14 11:03:52 CST">Dec 14</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/no-problemo/">[draft]No Problemo</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-12-07 15:05:30 CST">Dec 07</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/8/">Getting unified experience</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-11-07 09:16:15 CST">Nov 07</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/7/">Past Is Great</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-09-29 09:43:02 CST">Sep 29</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/6/">Mess with Bash(2)</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-09-12 09:02:06 CST">Sep 12</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/5/">Escape Sequences</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-09-03 14:33:37 CST">Sep 03</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/4/">Architecture of Linux Kernel</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-08-25 13:40:56 CST">Aug 25</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/3/">Mess with bash(1)</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-08-10 19:24:59 CST">Aug 10</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/2/">Install arch linux on Tencent server</a> - </div> - </div> - </div> - </div> - - <div class="row posts-line"> - <div class="posts-date col-xs-2"> - <time datetime="2022-08-10 17:21:02 CST">Aug 10</time> - </div> - <div class="posts-title col-xs-10"> - <div class="row"> - <div class="col-xs-12"> - <a href="/posts/1/">First Website</a> - </div> - </div> - </div> - </div> - - </section> - - </div> - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - -</body> - -</html> diff --git a/posts/index.xml b/posts/index.xml deleted file mode 100644 index 6f8785d..0000000 --- a/posts/index.xml +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0" encoding="utf-8" standalone="yes"?> -<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> - <channel> - <title>Posts on blog | garhve's hub</title> - <link>https://blog.garhve.com/posts/</link> - <description>Recent content in Posts on blog | garhve's hub</description> - <generator>Hugo -- gohugo.io</generator> - <language>en-us</language> - <lastBuildDate>Wed, 14 Dec 2022 11:03:52 +0800</lastBuildDate><atom:link href="https://blog.garhve.com/posts/index.xml" rel="self" type="application/rss+xml" /> - <item> - <title>[draft]No Problemo</title> - <link>https://blog.garhve.com/posts/no-problemo/</link> - <pubDate>Wed, 14 Dec 2022 11:03:52 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/no-problemo/</guid> - <description>My feeling to express are fading&hellip; Not sure how I know it, just got this sense. Recently, I picked up an anime named &ldquo;The Simpsons&rdquo; which I watched first episode back in highschool. I fell in love with it right after re-watched first episode! So I downloaded the whole</description> - </item> - - <item> - <title>Getting unified experience</title> - <link>https://blog.garhve.com/posts/8/</link> - <pubDate>Wed, 07 Dec 2022 15:05:30 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/8/</guid> - <description>Lately, I&rsquo;m trying get my tools working seamlessly cross my 2 working machines as well as a server. -Since I already heard dotfiles for a while, but didn&rsquo;t get chance to familiar with. So I start searching around trying to set a dotfile up. -Frankly, it is not that simple as I thought, given that my grounds differ from each other: 1x macOS, 1x archLinux, 1x archLinux server. -Here&rsquo;s a brief description: all configuration files I want to put in .</description> - </item> - - <item> - <title>Past Is Great</title> - <link>https://blog.garhve.com/posts/7/</link> - <pubDate>Mon, 07 Nov 2022 09:16:15 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/7/</guid> - <description>Lately, there’s a sign has been keeping jumping out in front of my eyes. That the past is great! -First is in the movie Midnight in Paris, directed by Woody Allen, which I just finished a week ago. It tells a story of how a screen writer loves 20th century because his loving artists all living in it. Though he finally realized that he loves past because the present is imperfect.</description> - </item> - - <item> - <title>Mess with Bash(2)</title> - <link>https://blog.garhve.com/posts/6/</link> - <pubDate>Thu, 29 Sep 2022 09:43:02 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/6/</guid> - <description>More info is in this tutorial -all value expansions (ie. all syntax with a $ prefix) can only expand inside quoted arguments if the argument was double-quoted . Single quotes will turn the dollar-syntax into literal characters, causing bash to output the dollar rather than expand its value in-place! -&ldquo;Value expansions ($...) must always be double-quoted.&rdquo; -Never leave a value expansion unquoted. -Redirection File Redirection 0 is standard input, 1 is standard output, 2 is standard error</description> - </item> - - <item> - <title>Escape Sequences</title> - <link>https://blog.garhve.com/posts/5/</link> - <pubDate>Mon, 12 Sep 2022 09:02:06 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/5/</guid> - <description>copied from github in case one day it disappears -more information could visit vt100 User Guide -ANSI Escape Sequences Standard escape codes are prefixed with Escape: -Ctrl-Key: ^[ Octal: \033 Unicode: \u001b Hexadecimal: \x1B Decimal: 27 Followed by the command, somtimes delimited by opening square bracket ([), known as a Control Sequence Introducer (CSI), optionally followed by arguments and the command itself. -Arguments are delimeted by semi colon (;).</description> - </item> - - <item> - <title>Architecture of Linux Kernel</title> - <link>https://blog.garhve.com/posts/4/</link> - <pubDate>Sat, 03 Sep 2022 14:33:37 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/4/</guid> - <description>Description Modern microcontrollers nowadays support at least two privilege levels. Intel/AMD x86-64 family supports 4 levels, whilst ARM (32bit) microcontrollers support up to 7 levels (6 privileged, 1 non-privileged). -Modern operating systems support at least 2 levels: -User space: For applications to run in unprivileged user mode Kernel space: For the kernel (and all its components) to run in privileged mode – kernel mode Address of these 2 spaces are separate.</description> - </item> - - <item> - <title>Mess with bash(1)</title> - <link>https://blog.garhve.com/posts/3/</link> - <pubDate>Thu, 25 Aug 2022 13:40:56 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/3/</guid> - <description>Crontab crontab is a useful tool, I really regret that I don&rsquo;t familar it earlier. -It&rsquo;s usage really simple, and these two are my frequent using: -crontab -e #edit crontab file that reside in /var/spool/cron crontab -l #list current crontab job It basic syntax as follow, also really simple example of usage: -delete file foo every minute * * * * * rm foo delete file foo every 15 minutes 15 * * * * rm foo delete file foo every beginning of hour 0 * * * * rm foo delete file foo every minute after 3 hours * 3 * * * rm foo delete file foo every day at 18:30 30 18 * * * rm foo delete file foo every beginning of month 0 0 0 * * rm foo delete file foo on beginning of 1st,10th of month 0 0 1,10 * * rm foo The usage really simple, I now use it to renew my SSL certification and daily update bt-tracker.</description> - </item> - - <item> - <title>Install arch linux on Tencent server</title> - <link>https://blog.garhve.com/posts/2/</link> - <pubDate>Wed, 10 Aug 2022 19:24:59 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/2/</guid> - <description>In order to build a website for myself, I rent a server from Tencent. This is my final decision, the process is turtuous&hellip; -My requirement as below: -abroad provider because they don&rsquo;t have to register.. the the budget&rsquo;s not relax, all I can choosing was in range of $0 - $10. It can runs Arch linux seamlessly I already eye on one: Linode. But they don&rsquo;t see me&hellip; and banned all my gmail account from their service&hellip;</description> - </item> - - <item> - <title>First Website</title> - <link>https://blog.garhve.com/posts/1/</link> - <pubDate>Wed, 10 Aug 2022 17:21:02 +0800</pubDate> - - <guid>https://blog.garhve.com/posts/1/</guid> - <description>So now I can say my website is on.. even though it just literally has nothing but a printing hello I got this garhve.com domain on namesilo for $9.95 per year, it&rsquo;s really cheap! I always want a domain that is .com suffix. -Now, the web is https, this is a bit difficult for me. -Due to personal interest, I didn&rsquo;t choose frame to base my website. I use Nginx but I don&rsquo;t familiar with it.</description> - </item> - - </channel> -</rss> diff --git a/posts/no-problemo/index.html b/posts/no-problemo/index.html deleted file mode 100644 index 3cf1a18..0000000 --- a/posts/no-problemo/index.html +++ /dev/null @@ -1,159 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="utf-8" /> - <meta name="generator" content="Hugo 0.108.0"> - - <meta http-equiv="X-UA-Compatible" content="IE=edge" /> - <meta name="viewport" content="width=device-width, initial-scale=1" /> - <meta name="author" content="garhve" /> - <meta property="og:url" content="https://blog.garhve.com/posts/no-problemo/" /> - <link rel="canonical" href="https://blog.garhve.com/posts/no-problemo/" /><link rel="apple-touch-icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="icon" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - <link rel="shortcut" href="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /><link rel="alternate" type="application/atom+xml" href="https://blog.garhve.comindex.xml" title="blog | garhve's hub"> - - <script type="application/ld+json"> - { - "@context" : "http://schema.org", - "@type" : "BlogPosting", - "mainEntityOfPage": { - "@type": "WebPage", - "@id": "https:\/\/blog.garhve.com" - }, - "articleSection" : "posts", - "name" : "[draft]No Problemo", - "headline" : "[draft]No Problemo", - "description" : "My feeling to express are fading\u0026hellip; Not sure how I know it, just got this sense. Recently, I picked up an anime named \u0026ldquo;The Simpsons\u0026rdquo; which I watched first episode back in highschool. I fell in love with it right after re-watched first episode! So I downloaded the whole", - "inLanguage" : "en-US", - "author" : "garhve", - "creator" : "garhve", - "publisher": "garhve", - "accountablePerson" : "garhve", - "copyrightHolder" : "garhve", - "copyrightYear" : "2022", - "datePublished": "2022-12-14 11:03:52 \u002b0800 CST", - "dateModified" : "2022-12-14 11:03:52 \u002b0800 CST", - "url" : "https:\/\/blog.garhve.com\/posts\/no-problemo\/", - "keywords" : [ ] - } -</script> -<title>[draft]No Problemo</title> - <meta property="og:title" content="[draft]No Problemo" /> - <meta property="og:type" content="article" /> - <meta property="og:description" content="My feeling to express are fading&hellip; Not sure how I know it, just got this sense. Recently, I picked up an anime named &ldquo;The Simpsons&rdquo; which I watched first episode back in highschool. I fell in love with it right after re-watched first episode! So I downloaded the whole" /> - <meta name="description" content="My feeling to express are fading&hellip; Not sure how I know it, just got this sense. Recently, I picked up an anime named &ldquo;The Simpsons&rdquo; which I watched first episode back in highschool. I fell in love with it right after re-watched first episode! So I downloaded the whole" /> - <meta property="og:locale" content="en-us" /><meta property="og:image" content="https://assets.garhve.com/pictures/assets/images/favicon/favicon.ico" /> - - - - - <style>@font-face{font-family:huanzi;src:url(/fonts/huanzi.woff2)format('woff2')}@font-face{font-family:fira code;src:url(/fonts/FiraCode-Regular.woff2)format('woff2')}body{font-family:bree serif,huanzi,sans-serif;-webkit-font-smoothing:antialiased;margin:0 20px}article{max-width:800px;margin-left:auto;margin-right:auto}a{color:#000;text-decoration:none}a:hover{font-weight:600;text-decoration:underline}.post-ads{margin:50px 0}.markdown-body{font-size:18px;max-width:100%}.markdown-body a{text-decoration:underline;text-decoration-color:#000}.markdown-body blockquote{margin:0;padding:0 1em;color:#57606a;border-left:.25em solid #d0d7de}.markdown-body pre{padding:16px;overflow:auto;border-radius:10px}.markdown-body code{padding:.2em .4em;font-size:80%;background-color:inherit;border-radius:6px;font-family:fira code,monospace}code{text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-text-size-adjust:100%;-webkit-text-size-adjust:100%}table{width:100%}.markdown-body pre>code{padding:0;font-size:70%;background-color:inherit;border:0;font-family:fira code,monospace}.Chinese .markdown-body{line-height:200%}.site-date-catalog{font-size:2rem}.header-title{font-size:2rem;font-weight:700;margin-top:32px;font-family:bungee shade,sans-serif}.header-title a{text-decoration:none}.header-subtitle{color:#666}.header-items{margin:10px 0}.header-item{margin:0 5px}.header-line{width:100%;border-width:2px;border-color:#482936;border-style:solid none none none}.lang-switch{font-weight:600}#posts-list{min-height:600px}.posts-line{font-size:1.2rem;margin:12px 0}.posts-categories{font-size:.8rem;margin:auto;text-align:center}.posts-category{padding:3px 0;border:#000 2px solid;border-radius:5px}.site-footer{margin-top:50px}.site-footer-item{margin-right:12px}.post-content img{max-width:100%;display:block;margin-right:auto;margin-top:12px}.post-header{margin-bottom:50px}.post-title{font-size:2rem;font-weight:600}.post-tags{display:inline;font-weight:600;padding:2px 5px;margin-right:6px;border:#000 2px solid;border-radius:5px}.post-date{font-weight:800;font-style:italic}.post-author{float:right;font-weight:600}.page-content{min-height:60%}.post-content{margin-bottom:50px}.post-content p{hyphens:auto;line-height:1.8;text-justify:ideographic;margin-bottom:1em}.related-content{border-width:3px;border-style:solid;border-color:#000;padding:0 10px;margin-bottom:50px;margin-top:100px}.related-content li{margin:5px 0}.taxonomy-term{font-size:3rem}.gallery-img{text-align:center}.gallery-img span{text-align:center}.gallery-img-desc{font-size:.8em;font-weight:800}#disqus_thread{position:relative}#disqus_thread:after{content:"";display:block;height:55px;width:100%;position:absolute;bottom:0;background:#fff}@media screen and (max-width:600px){.header-title,.header-subtitle,.header-items{text-align:center}.posts-line{font-size:16px}.markdown-body{font-size:16px}.post-title{font-size:2rem}.post-content p{letter-spacing:.05em}}@media screen and (max-width:48em){.posts-category{display:none}}</style> - - - <style>.container,.container-fluid{margin-right:auto;margin-left:auto}.container-fluid{padding-right:2rem;padding-left:2rem}.row{box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:0;-ms-flex:0 1 auto;flex:initial;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-.5rem;margin-left:-.5rem}.row.reverse{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.col.reverse{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-direction:column-reverse;flex-direction:column-reverse}.col-xs,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-offset-0,.col-xs-offset-1,.col-xs-offset-10,.col-xs-offset-11,.col-xs-offset-12,.col-xs-offset-2,.col-xs-offset-3,.col-xs-offset-4,.col-xs-offset-5,.col-xs-offset-6,.col-xs-offset-7,.col-xs-offset-8,.col-xs-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-xs{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-xs-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-xs-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-xs-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-xs-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-xs-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-xs-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-xs-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-xs-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-xs-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-xs-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-xs-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-xs-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-xs-offset-0{margin-left:0}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-11{margin-left:91.66666667%}.start-xs{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-xs{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-xs{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-xs{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-xs{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-xs{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-xs{-ms-flex-pack:distribute;justify-content:space-around}.between-xs{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-xs{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-xs{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}@media only screen and (min-width:48em){.container{width:49rem}.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-offset-0,.col-sm-offset-1,.col-sm-offset-10,.col-sm-offset-11,.col-sm-offset-12,.col-sm-offset-2,.col-sm-offset-3,.col-sm-offset-4,.col-sm-offset-5,.col-sm-offset-6,.col-sm-offset-7,.col-sm-offset-8,.col-sm-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-sm{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-sm-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-sm-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-sm-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-sm-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-sm-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-sm-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-sm-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-sm-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-sm-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-sm-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-sm-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-sm-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-sm-offset-0{margin-left:0}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-11{margin-left:91.66666667%}.start-sm{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-sm{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-sm{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-sm{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-sm{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-sm{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-sm{-ms-flex-pack:distribute;justify-content:space-around}.between-sm{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-sm{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-sm{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:64em){.container{width:65rem}.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-offset-0,.col-md-offset-1,.col-md-offset-10,.col-md-offset-11,.col-md-offset-12,.col-md-offset-2,.col-md-offset-3,.col-md-offset-4,.col-md-offset-5,.col-md-offset-6,.col-md-offset-7,.col-md-offset-8,.col-md-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-md{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-md-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-md-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-md-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-md-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-md-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-md-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-md-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-md-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-md-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-md-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-md-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-md-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-md-offset-0{margin-left:0}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-3{margin-left:25%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-6{margin-left:50%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-9{margin-left:75%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-11{margin-left:91.66666667%}.start-md{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-md{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-md{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-md{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-md{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-md{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-md{-ms-flex-pack:distribute;justify-content:space-around}.between-md{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-md{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-md{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media only screen and (min-width:75em){.container{width:76rem}.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-offset-0,.col-lg-offset-1,.col-lg-offset-10,.col-lg-offset-11,.col-lg-offset-12,.col-lg-offset-2,.col-lg-offset-3,.col-lg-offset-4,.col-lg-offset-5,.col-lg-offset-6,.col-lg-offset-7,.col-lg-offset-8,.col-lg-offset-9{box-sizing:border-box;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:none;padding-right:.5rem;padding-left:.5rem}.col-lg{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-ms-flex-preferred-size:0;flex-basis:0;max-width:100%}.col-lg-1{-ms-flex-preferred-size:8.33333333%;flex-basis:8.33333333%;max-width:8.33333333%}.col-lg-2{-ms-flex-preferred-size:16.66666667%;flex-basis:16.66666667%;max-width:16.66666667%}.col-lg-3{-ms-flex-preferred-size:25%;flex-basis:25%;max-width:25%}.col-lg-4{-ms-flex-preferred-size:33.33333333%;flex-basis:33.33333333%;max-width:33.33333333%}.col-lg-5{-ms-flex-preferred-size:41.66666667%;flex-basis:41.66666667%;max-width:41.66666667%}.col-lg-6{-ms-flex-preferred-size:50%;flex-basis:50%;max-width:50%}.col-lg-7{-ms-flex-preferred-size:58.33333333%;flex-basis:58.33333333%;max-width:58.33333333%}.col-lg-8{-ms-flex-preferred-size:66.66666667%;flex-basis:66.66666667%;max-width:66.66666667%}.col-lg-9{-ms-flex-preferred-size:75%;flex-basis:75%;max-width:75%}.col-lg-10{-ms-flex-preferred-size:83.33333333%;flex-basis:83.33333333%;max-width:83.33333333%}.col-lg-11{-ms-flex-preferred-size:91.66666667%;flex-basis:91.66666667%;max-width:91.66666667%}.col-lg-12{-ms-flex-preferred-size:100%;flex-basis:100%;max-width:100%}.col-lg-offset-0{margin-left:0}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-11{margin-left:91.66666667%}.start-lg{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;text-align:start}.center-lg{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.end-lg{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;text-align:end}.top-lg{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start}.middle-lg{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.bottom-lg{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.around-lg{-ms-flex-pack:distribute;justify-content:space-around}.between-lg{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.first-lg{-webkit-box-ordinal-group:0;-ms-flex-order:-1;order:-1}.last-lg{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}</style> - - - - - <link href="/index.xml" rel="alternate" type="application/rss+xml" - title="blog | garhve's hub"> - - <link rel="preconnect" href="https://fonts.gstatic.com"> - <link href="https://fonts.googleapis.com/css?family=Bree+Serif|Bungee+Shade" rel="stylesheet"> - - - -</head> - - -<body> - <article class="post English" id="article"> - <div class="row"> - <div class="col-xs-12"> - <div class="site-header"> - -<header> - <div class="header-title"> - <a href="/" - >Garhve</a - > - </div> - <div class="header-subtitle"></div> -</header> -<div class="row end-md center-xs header-items"> -</div> -<div class="row end-xs"> - - <div class="lang-switch col-xs-3 col-xs-offset-9"> - <a href="/cn/">Chinese</a> - </div> - -</div> -<div class="header-line"></div> - - </div> - <header class="post-header"> - <h1 class="post-title">[draft]No Problemo</h1> - - <div class="row post-desc"> - <div class="col-xs-6"> - - <time class="post-date" datetime="2022-12-14 11:03:52 CST"> - 14 Dec 2022 - </time> - - </div> - <div class="col-xs-6"> - - <div class="post-author"> - <a target="_blank" href="https://garhve.com">@garhve</a> - </div> - - </div> - </div> - - </header> - - <div class="post-content markdown-body"> - - <p>My feeling to express are fading… Not sure how I know it, just got this sense. -Recently, I picked up an anime named “<a href="https://en.wikipedia.org/wiki/The_Simpsons">The Simpsons</a>” which I watched first episode back in highschool. -I fell in love with it right after re-watched first episode! So I downloaded the whole</p> - - </div> - - <div class="row"> - <div class="col-xs-12"> - - </div> - </div> - - - <div style="height: 50px;"></div> - - - <div class="site-footer"> - - - -</div> - - </div> - </div> - </article> - - - -<script> - - - - - -</script> - - - -</body> - -</html> |