<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>月与灯依旧</title>
	<atom:link href="https://www.zhukun.net/feed" rel="self" type="application/rss+xml" />
	<link>https://www.zhukun.net</link>
	<description>不见去年人， 泪湿春衫袖。</description>
	<lastBuildDate>Sun, 07 Apr 2024 23:56:53 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>Set up self-hosted runners for Github Actions</title>
		<link>https://www.zhukun.net/archives/8732</link>
					<comments>https://www.zhukun.net/archives/8732#respond</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Sun, 07 Apr 2024 17:15:39 +0000</pubDate>
				<category><![CDATA[编程学习]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[Github]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8732</guid>

					<description><![CDATA[Add and Install a new runner on our host Highly recommand run self-hosted runner as a systemd service Then, we will see these below Set up the workflow for our Github Actions Official Document https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">Add and Install a new runner on our host</h3>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1681" height="1383" data-id="8733" src="https://www.zhukun.net/wp-content/uploads/8732.01.png" alt="" class="wp-image-8733" srcset="https://www.zhukun.net/wp-content/uploads/8732.01.png 1681w, https://www.zhukun.net/wp-content/uploads/8732.01-600x494.png 600w, https://www.zhukun.net/wp-content/uploads/8732.01-1536x1264.png 1536w" sizes="(max-width: 1681px) 100vw, 1681px" /></figure>
</figure>



<figure class="wp-block-image size-full"><img decoding="async" width="1650" height="1825" src="https://www.zhukun.net/wp-content/uploads/8732.02.png" alt="" class="wp-image-8734" srcset="https://www.zhukun.net/wp-content/uploads/8732.02.png 1650w, https://www.zhukun.net/wp-content/uploads/8732.02-600x664.png 600w, https://www.zhukun.net/wp-content/uploads/8732.02-1389x1536.png 1389w" sizes="(max-width: 1650px) 100vw, 1650px" /></figure>



<p>Highly recommand run self-hosted runner as a systemd service</p>



<pre class="wp-block-code"><code># Save settings
./config.cmd --url https://github.com/XXX/MyApp --token XXXXXXXXX

# Lets's deploy a systemd service
# Refer: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service
sudo ./svc.sh install</code></pre>



<p>Then, we will see these below</p>



<pre class="wp-block-code"><code>Run as user: zhang3
Run as uid: 1000
gid: 1000
Created symlink /etc/systemd/system/multi-user.target.wants/actions.runner.XXX.service → /etc/systemd/system/actions.runner.XXX.service.</code></pre>



<h3 class="wp-block-heading">Set up the workflow for our Github Actions</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="1675" height="1352" src="https://www.zhukun.net/wp-content/uploads/8732.03.png" alt="" class="wp-image-8735" srcset="https://www.zhukun.net/wp-content/uploads/8732.03.png 1675w, https://www.zhukun.net/wp-content/uploads/8732.03-600x484.png 600w, https://www.zhukun.net/wp-content/uploads/8732.03-1536x1240.png 1536w" sizes="(max-width: 1675px) 100vw, 1675px" /></figure>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1735" height="1429" src="https://www.zhukun.net/wp-content/uploads/8732.04-1.png" alt="" class="wp-image-8737" srcset="https://www.zhukun.net/wp-content/uploads/8732.04-1.png 1735w, https://www.zhukun.net/wp-content/uploads/8732.04-1-600x494.png 600w, https://www.zhukun.net/wp-content/uploads/8732.04-1-1536x1265.png 1536w" sizes="auto, (max-width: 1735px) 100vw, 1735px" /></figure>



<h3 class="wp-block-heading">Official Document</h3>



<p><a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners">https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners</a></p>



<p><a href="https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service">https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8732/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Javascript Array</title>
		<link>https://www.zhukun.net/archives/8723</link>
					<comments>https://www.zhukun.net/archives/8723#respond</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Thu, 11 Jan 2024 16:24:39 +0000</pubDate>
				<category><![CDATA[编程学习]]></category>
		<category><![CDATA[javascript]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8723</guid>

					<description><![CDATA[Handle element in an Array Find element A shorter code: Find an element in Object find() method ONLY returns the first element in the provided array that satisfies the provided testing function Filter Iterate Array Combine Array Destruct an Array We can also destruct an Object like this:]]></description>
										<content:encoded><![CDATA[
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h3 class="wp-block-heading">Handle element in an Array</h3>



<pre class="wp-block-code"><code>const hobbies = &#91;"sports", "cooking", "reading"];

console.log(hobbies&#91;0]);       # Get single element

hobbies.push("surfing");       # Add new element to the end
hobbies.unshift("movies");     # Add new element to th start

hobbies.pop();                 # remove the last element
hobbies.shift();               # remove the first element</code></pre>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h3 class="wp-block-heading">Find element</h3>



<pre class="wp-block-code"><code>const index = hobbies.findIndex((item) => {
    return item === "reading"
});
console.log(index);</code></pre>



<p>A shorter code:</p>



<pre class="wp-block-code"><code>const index = hobbies.findIndex((item) => item === "reading");
console.log(index);

// Result
2</code></pre>



<p>Find an element in Object</p>



<pre class="wp-block-code"><code>const inventory = &#91;
  { name: "apples", quantity: 2 },
  { name: "bananas", quantity: 0 },
  { name: "cherries", quantity: 5 },
];

const result = inventory.find(({ name,quantity }) => name === "cherries");

console.log(result); 

// Result:
 { name: 'cherries', quantity: 5 }</code></pre>



<p><strong><code>find()</code></strong> method ONLY returns the <strong>first element</strong> in the provided array that satisfies the provided testing function</p>
</div></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h3 class="wp-block-heading">Filter</h3>



<pre class="wp-block-code"><code>const words = &#91;'spray', 'elite', 'exuberant', 'destruction', 'present'];
const result = words.filter((word) => word.length > 6);

// Result:
&#91;"exuberant", "destruction", "present"]</code></pre>
</div></div>



<h3 class="wp-block-heading">Iterate Array</h3>



<pre class="wp-block-code"><code>const newHobbies = hobbies.map((item) => item + "!");
consoloe.log(newHobbies);

// Result
(3) &#91;"sports!", "cooking!", "reading!"]</code></pre>



<h3 class="wp-block-heading">Combine Array</h3>



<pre class="wp-block-code"><code>const numbers = &#91;1,2,4,5];
const all = &#91;...hobbies, ...numbers];
console.log(all);

// Result
(7) &#91;"sports", "cooking", "reading", 1, 2, 4, 5]</code></pre>



<h3 class="wp-block-heading">Destruct an Array</h3>



<pre class="wp-block-code"><code>const userName = &#91;"John", "Ted"];

// Old School Way
// const firstName = userName&#91;0];
// const lastName = userName&#91;1];

// New Way
const &#91;firstName, lastName] = &#91;"John", "Ted"];
console.log(firstName);
console.log(lastName);

// Result:
John
Ted</code></pre>



<p>We can also destruct an Object like this:</p>



<pre class="wp-block-code"><code>const {name,quantity} = { name: "apples", quantity: 2 };
console.log(name);
console.log(quantity);

// Result:
apples
2</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8723/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Get Ubuntu release code name in Script</title>
		<link>https://www.zhukun.net/archives/8719</link>
					<comments>https://www.zhukun.net/archives/8719#respond</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Sun, 24 Dec 2023 17:39:54 +0000</pubDate>
				<category><![CDATA[Linux运维]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8719</guid>

					<description><![CDATA[Use it in Shell Script]]></description>
										<content:encoded><![CDATA[
<pre class="wp-block-code"><code>$ lsb_release -h
Usage: lsb_release &#91;options]

Options:
  -h, --help         show this help message and exit
  -v, --version      show LSB modules this system supports
  -i, --id           show distributor ID
  -d, --description  show description of this distribution
  -r, --release      show release number of this distribution
  -c, --codename     show code name of this distribution
  -a, --all          show all of the above information
  -s, --short        show requested information in short format


$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy


$ lsb_release -sc
jammy

$ lsb_release -sr
22.04</code></pre>



<p>Use it in Shell Script</p>



<pre class="wp-block-code"><code>echo "deb http://apt.kubernetes.io/ kubernetes-$(lsb_release -sc) main kubernetes-$(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/kubernetes.list</code></pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8719/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>大学回忆录之2023</title>
		<link>https://www.zhukun.net/archives/8708</link>
					<comments>https://www.zhukun.net/archives/8708#comments</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Thu, 21 Dec 2023 14:36:08 +0000</pubDate>
				<category><![CDATA[记录生活]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8708</guid>

					<description><![CDATA[真不敢相信, 今天是我在这所大学的 last day. 好像昨天还是刚刚入学的日子一样, 时间, 过的真是快啊. 同学们陆陆续续的散去, 这个陕小的教室也终于安静下来了 我是这么的不愿意离开, 这里的回忆简直太多了 那个好看的尼泊尔同学, 名字叫Dipesh, 每次从我身边经过的时候, 我都会偷偷打量他. 每次都在作业的 due date 前一天, 他也会准时在whats app上找我帮忙, 我也很乐意帮忙, 谁叫人家长的好看呢 坐在对角的哥伦比亚大龄同学, 每次路过我的座位的时候, 都要双掌合十, 然后喊我一句&#8221;master&#8221; 还有我前面那位印度大胡子同学, 叫什么Pavit的, 每次回头看我, 嘴里都要哼着一句我听不懂的印度歌曲, 好像叫什么faya kun的, 这位大胡子同学每次课堂上咳嗽的时候, 嘴里也会小声说一句sorry. 另外一位尼泊尔的同学, 自从我教会了他 how to say fuck you in chinese 以后, 每次见面, 他都要说一句&#8221;草拟&#8221;&#8230; 哦对了, 那位哥伦比亚同学, 也教过我 how to say fuck you [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>真不敢相信, 今天是我在这所大学的 last day.</p>



<p>好像昨天还是刚刚入学的日子一样, 时间, 过的真是快啊.</p>



<p>同学们陆陆续续的散去, 这个陕小的教室也终于安静下来了</p>



<p>我是这么的不愿意离开, 这里的回忆简直太多了</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2560" height="1920" src="https://www.zhukun.net/wp-content/uploads/8708.03-scaled.jpg" alt="初见" class="wp-image-8712" srcset="https://www.zhukun.net/wp-content/uploads/8708.03-scaled.jpg 2560w, https://www.zhukun.net/wp-content/uploads/8708.03-600x450.jpg 600w, https://www.zhukun.net/wp-content/uploads/8708.03-1536x1152.jpg 1536w, https://www.zhukun.net/wp-content/uploads/8708.03-2048x1536.jpg 2048w" sizes="auto, (max-width: 2560px) 100vw, 2560px" /></figure>



<p>那个好看的尼泊尔同学, 名字叫Dipesh, 每次从我身边经过的时候, 我都会偷偷打量他. 每次都在作业的 due date 前一天, 他也会准时在whats app上找我帮忙, 我也很乐意帮忙, 谁叫人家长的好看呢</p>



<p>坐在对角的哥伦比亚大龄同学, 每次路过我的座位的时候, 都要双掌合十, 然后喊我一句&#8221;master&#8221;</p>



<p>还有我前面那位印度大胡子同学, 叫什么Pavit的, 每次回头看我, 嘴里都要哼着一句我听不懂的印度歌曲, 好像叫什么faya kun的, 这位大胡子同学每次课堂上咳嗽的时候, 嘴里也会小声说一句sorry.</p>



<p>另外一位尼泊尔的同学, 自从我教会了他 how to say fuck you in chinese 以后, 每次见面, 他都要说一句&#8221;草拟&#8221;&#8230;</p>



<p>哦对了, 那位哥伦比亚同学, 也教过我 how to say fuck you in spanish, 好像是什么类似于 &#8216;budha&#8217; 的发音. 有一次我在休息区说了一句 budha, 他们吓的全跑开了, 也不知道为啥</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="2114" height="2560" src="https://www.zhukun.net/wp-content/uploads/8708.04-scaled.jpg" alt="" class="wp-image-8713" srcset="https://www.zhukun.net/wp-content/uploads/8708.04-scaled.jpg 2114w, https://www.zhukun.net/wp-content/uploads/8708.04-600x727.jpg 600w, https://www.zhukun.net/wp-content/uploads/8708.04-1268x1536.jpg 1268w, https://www.zhukun.net/wp-content/uploads/8708.04-1691x2048.jpg 1691w" sizes="auto, (max-width: 2114px) 100vw, 2114px" /></figure>



<p>还有一次, 我记得那是一节 Programming basic 课程, 一个胖胖的男老师, 虽然很胖, 但是眼神里却透露着一股子凶恶的感觉. 那次, 也不知道讲到哪个知识点了, 大胡子 Pavit 同学当场拿着 ChatGPT 的结果上去提出了疑问&#8230; 结果, 课间的 Break time 之后, 这位&#8221;凶恶&#8221;的男老师再也没有回来了&#8230;. 后来还是教学主任出马, 把他请了回来. 当然, 不是请回了教室, 只是改为了远程上课了&#8230;</p>



<p>还有那个高贵冷艳的 Indigeneous 女生, 平时也懒得搭理我的, 最后的 e-commerce project 却跟她分到了一组, 当时觉得天都塌了, 没想到在做 Project 的时候, 她竟然异常的热情&#8230;</p>



<p>太多的回忆了, 数都数不过来&#8230;</p>



<p>自己一直是个极其怀旧的人, 大家都走了, 我还一个人坐在这个空荡荡的教室里, 舍不得离开</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1280" height="720" src="https://www.zhukun.net/wp-content/uploads/8708.jpg" alt="" class="wp-image-8709" srcset="https://www.zhukun.net/wp-content/uploads/8708.jpg 1280w, https://www.zhukun.net/wp-content/uploads/8708-600x338.jpg 600w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></figure>



<p>在这间教室的一年, 是我人生中技术领域进步最快的一年了</p>



<p>也许上北美的老师都很负责吧, 又或者同学们都太努力了, 这一年在各种 Project + Assignment + Quiz 的轮翻轰炸下, 我也算是入了前端的门了. 虽然还是很菜, 但至少, 现在有了能自己写 WordPress 主题的能力了, 也能写出一个简单的 CMS 了. 收获还是大大滴.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1280" height="720" data-id="8711" src="https://www.zhukun.net/wp-content/uploads/8708.02.jpg" alt="" class="wp-image-8711" srcset="https://www.zhukun.net/wp-content/uploads/8708.02.jpg 1280w, https://www.zhukun.net/wp-content/uploads/8708.02-600x338.jpg 600w" sizes="auto, (max-width: 1280px) 100vw, 1280px" /></figure>
</figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8708/feed</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>error converting YAML to JSON: yaml: line 16: found a tab character that violates indentation</title>
		<link>https://www.zhukun.net/archives/8706</link>
					<comments>https://www.zhukun.net/archives/8706#respond</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Tue, 19 Dec 2023 08:40:31 +0000</pubDate>
				<category><![CDATA[Linux运维]]></category>
		<category><![CDATA[docker]]></category>
		<category><![CDATA[kubernetes]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8706</guid>

					<description><![CDATA[We might be got this error when executing kubectl command: Fix it: Use vim to open this file, then :set list, then you will see the special characters.]]></description>
										<content:encoded><![CDATA[
<p>We might be got this error when executing kubectl command:</p>



<pre class="wp-block-code"><code>$ kubectl apply -f test1.yaml 
error: error parsing test1.yaml: error converting YAML to JSON: yaml: line 16: found a tab character that violates indentation</code></pre>



<p>Fix it: Use <code>vim</code> to open this file, then <code>:set list</code>, then you will see the special characters.</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="988" height="365" src="https://www.zhukun.net/wp-content/uploads/8706.png" alt="" class="wp-image-8707" srcset="https://www.zhukun.net/wp-content/uploads/8706.png 988w, https://www.zhukun.net/wp-content/uploads/8706-600x222.png 600w" sizes="auto, (max-width: 988px) 100vw, 988px" /></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8706/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Protected: 那些年，我所呆过的互联网公司</title>
		<link>https://www.zhukun.net/archives/8655</link>
					<comments>https://www.zhukun.net/archives/8655#comments</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Tue, 03 Jan 2023 01:53:44 +0000</pubDate>
				<category><![CDATA[记录生活]]></category>
		<category><![CDATA[互联网]]></category>
		<category><![CDATA[工作]]></category>
		<category><![CDATA[生活]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8655</guid>

					<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
										<content:encoded><![CDATA[<form action="https://www.zhukun.net/wp-login.php?action=postpass" class="post-password-form" method="post"><input type="hidden" name="redirect_to" value="https://www.zhukun.net/archives/8655" /></p>
<p>This content is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-8655">Password: <input name="post_password" id="pwbox-8655" type="password" spellcheck="false" required size="20" /></label> <input type="submit" name="Submit" value="Enter" /></p>
</form>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8655/feed</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>The easiest way to build a http/ftp server with Python</title>
		<link>https://www.zhukun.net/archives/8656</link>
					<comments>https://www.zhukun.net/archives/8656#respond</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Thu, 01 Dec 2022 16:30:08 +0000</pubDate>
				<category><![CDATA[Linux运维]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8656</guid>

					<description><![CDATA[Build a HTTP Server Build a FTP Server A powershell script could run in Windows place a file named &#8220;ftp.ps1&#8221; with the following content: and then run with Powershell Advanced Usage Referencehttps://blog.51cto.com/phyger/5182139]]></description>
										<content:encoded><![CDATA[
<h3 class="wp-block-heading">Build a HTTP Server</h3>



<pre class="wp-block-code"><code># Python2
python -m SimpleHTTPServer PORT

# Python 3
python -m http.server PORT
python -m http.server PORT --bind example.com</code></pre>



<h3 class="wp-block-heading">Build a FTP Server</h3>



<pre class="wp-block-code"><code>pip install pyftpdlib

python -m pyftpdlib -p 21    # notice: it's ftpd, not ftp

# if you want a username and password
python -m pyftpdlib -u USERNAME -P PASSWORD</code></pre>



<h3 class="wp-block-heading">A powershell script could run in Windows</h3>



<p>place a file named &#8220;ftp.ps1&#8221; with the following content:</p>



<pre class="wp-block-code"><code>Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Set-Location -Path D:\Download
Start-Process -NoNewWindow python --version
python -m pyftpdlib -p 21 -u USERNAME -P PASSWORD
Read-Host -Prompt "Press Enter to exit"</code></pre>



<p>and then run with <code>Powershell</code></p>



<h3 class="wp-block-heading">Advanced Usage</h3>



<pre class="wp-block-code"><code>from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
from pyftpdlib.authorizers import DummyAuthorizer


authorizer = DummyAuthorizer()
authorizer.add_user('python', '123456', 'F:\\Working~Study', perm='elradfmwM')
handler = FTPHandler
handler.authorizer = authorizer


server = FTPServer(('0.0.0.0', 8888), handler)
server.serve_forever()</code></pre>



<p>Reference<br>https://blog.51cto.com/phyger/5182139</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8656/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>pproxy简单介绍</title>
		<link>https://www.zhukun.net/archives/8650</link>
					<comments>https://www.zhukun.net/archives/8650#comments</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Mon, 24 Oct 2022 19:52:29 +0000</pubDate>
				<category><![CDATA[电脑网络]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8650</guid>

					<description><![CDATA[pproxy是一个简单的小工具, 顾名思议它是一个临时的代理小工具. 下面介绍其使用方法. 安装 服务端和客户端都可以使用如下方式进行安装 服务端运行 客户端运行 客户端简单运行 然后客户端会提示&#8221;Serving on :8080 by http,socks4,socks5&#8243;. 客户端建立http代理 然后客户端会提示&#8221;Serving on 127.0.0.1:8080 by http&#8221;. 客户端建立DNS tunnel 由于ss(AEAD)协议不支持udp, 因此我们只能换用socks5或者tunnel (raw socket)协议来支持udp. 然后客户端会提示&#8221;Serving on UDP 127.0.0.1:53 by tunnel&#8221;, 可以在客户端使用dig @127.0.0.1 dropbox.com检验tunnel效果.]]></description>
										<content:encoded><![CDATA[
<p><a rel="noreferrer noopener" href="https://github.com/qwj/python-proxy" target="_blank">pproxy</a>是一个简单的小工具, 顾名思议它是一个临时的代理小工具. 下面介绍其使用方法.</p>



<h2 class="wp-block-heading">安装</h2>



<p>服务端和客户端都可以使用如下方式进行安装</p>



<pre class="wp-block-code"><code>pip3 install pproxy</code></pre>



<h2 class="wp-block-heading">服务端运行</h2>



<pre class="wp-block-code"><code>pproxy -l ss://aes-128-gcm:MyPassword@:3389</code></pre>



<h2 class="wp-block-heading">客户端运行</h2>



<p><strong>客户端简单运行</strong></p>



<pre class="wp-block-code"><code>pproxy -r ss://aes-128-gcm:MyPassword@ServerIP:3389 -vv</code></pre>



<p>然后客户端会提示&#8221;Serving on :8080 by http,socks4,socks5&#8243;.</p>



<p><strong>客户端建立http代理</strong></p>



<pre class="wp-block-code"><code>sudo pproxy -l http://127.0.0.1:8080 -r ss://aes-128-gcm:MyPassword@ServerIP:3389 -vv</code></pre>



<p>然后客户端会提示&#8221;Serving on 127.0.0.1:8080 by http&#8221;.</p>



<p><strong>客户端建立DNS tunnel</strong></p>



<p>由于ss(AEAD)协议不支持udp, 因此我们只能换用socks5或者tunnel (raw socket)协议来支持udp.</p>



<pre class="wp-block-code"><code>服务端:
pproxy -ul socks5://0.0.0.0:3389

客户端:
sudo pproxy -ul tunnel{8.8.8.8}://127.0.0.1:53 -ur socks5://ServerIP::3389 -vv</code></pre>



<p>然后客户端会提示&#8221;Serving on UDP 127.0.0.1:53 by tunnel&#8221;, 可以在客户端使用dig @127.0.0.1 dropbox.com检验tunnel效果.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8650/feed</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to add or remove a directory from media library on Windows</title>
		<link>https://www.zhukun.net/archives/8642</link>
					<comments>https://www.zhukun.net/archives/8642#respond</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Wed, 31 Aug 2022 15:31:18 +0000</pubDate>
				<category><![CDATA[电脑网络]]></category>
		<category><![CDATA[media server]]></category>
		<category><![CDATA[Windows]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8642</guid>

					<description><![CDATA[在Windows 10系统里添加一个文件夹到media server里非常容易. 仅仅需要右击文件夹, 并选择&#8221;Include in library&#8221;即可. 但是要把这个文件夹从library里移出来, 可能就稍显麻烦了. 下面介绍解决方法(点击可以查看大图). Windows 11系统里, 也很容易, 打开&#8221;文件夹选项&#8220;, 按如下所示操作即可]]></description>
										<content:encoded><![CDATA[
<p>在Windows 10系统里添加一个文件夹到media server里非常容易. 仅仅需要右击文件夹, 并选择&#8221;Include in library&#8221;即可. 但是要把这个文件夹从library里移出来, 可能就稍显麻烦了. 下面介绍解决方法(点击可以查看大图).</p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://www.zhukun.net/wp-content/uploads/8642.jpg" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" src="https://www.zhukun.net/wp-content/uploads/8642.jpg" alt="" class="wp-image-8643" width="965" height="654" srcset="https://www.zhukun.net/wp-content/uploads/8642.jpg 1930w, https://www.zhukun.net/wp-content/uploads/8642-600x407.jpg 600w, https://www.zhukun.net/wp-content/uploads/8642-1536x1041.jpg 1536w" sizes="auto, (max-width: 965px) 100vw, 965px" /></a></figure></div>


<p>Windows 11系统里, 也很容易, 打开&#8221;<strong>文件夹选项</strong>&#8220;, 按如下所示操作即可</p>



<figure class="wp-block-image size-full"><a href="https://www.zhukun.net/wp-content/uploads/8642.02.jpg" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="574" height="725" src="https://www.zhukun.net/wp-content/uploads/8642.02.jpg" alt="" class="wp-image-8653"/></a></figure>
]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8642/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>鼻炎手术</title>
		<link>https://www.zhukun.net/archives/8637</link>
					<comments>https://www.zhukun.net/archives/8637#comments</comments>
		
		<dc:creator><![CDATA[bear]]></dc:creator>
		<pubDate>Fri, 05 Aug 2022 19:27:52 +0000</pubDate>
				<category><![CDATA[电脑网络]]></category>
		<guid isPermaLink="false">https://www.zhukun.net/?p=8637</guid>

					<description><![CDATA[虽然已经出院好几个月了, 但是还是想写点什么来记录一下这次鼻炎手术. 知乎上有一个关于鼻中隔手术的帖子, 有个上海的患者说他手术前全麻, 手术后鼻子里被医生塞了止血抗菌的材料整整3天, 导致那3天只能用嘴呼吸, 3天之后才感受到了“世界的美好”. 另一个患者说他在美国做的鼻中隔手术, 做完以后医生当天就让他回家了, 第二天鼻腔一直血流不止, 于是他打电话过去问了一下医生, 医生说没事, 果然第3天流血的情况好了一些&#8230;&#8230; 看到那个帖子的时候, 我是有点犹豫的, 我深深知道用嘴呼吸是一件很难受的事儿, 但是考虑到, 要难受也就难受3天. 而且, 看起来我也有一些“非做不可”的理由, 比如, 我需要赶在离职前还有医保的状况下解决一下鼻炎问题, 同时, 我也需要赶在出国前夕解决一下自己身上的小毛病, 避免把“鼻炎”这份难受带到国外. 于是, 尽管纠结了好一段时间, 最后还是鼓起勇气走进了这家著名三甲医院的耳鼻喉科. 事后回想起来, 自己还是too young too naive了. 其实稍微想想也知道, 如果真的是一个小手术, 怎么可能做”全麻“! 最早去医院检测的时候, 我看到这个著名三甲医院里有一片郁郁葱葱的园林区, 里面种满了各种植物树木, 和一些假山假水啥的, 我猜是给住院病人的休息区. 我天真的以为, 住院的时候, 我可以抱着笔记本在这片园林区度过那难受的3天. 当时的我, 根本就没想过, 现在是疫情期间, 怎么可能让病人在医院内部到处走动&#8230;. 进入耳鼻喉科的时候, 我发现楼层是感应门, 从外面进来需要刷卡, 或者按门铃让里面的护士开门. 办理住院手续的时候, 被告知能活动的范围仅限于耳鼻喉科这一层, 前台护士警告说如果擅自跑出去”后果自负“&#8230; [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>虽然已经出院好几个月了, 但是还是想写点什么来记录一下这次鼻炎手术.</p>



<p>知乎上有一个关于鼻中隔手术的帖子, 有个上海的患者说他手术前全麻, 手术后鼻子里被医生塞了止血抗菌的材料整整3天, 导致那3天只能用嘴呼吸, 3天之后才感受到了“世界的美好”. 另一个患者说他在美国做的鼻中隔手术, 做完以后医生当天就让他回家了, 第二天鼻腔一直血流不止, 于是他打电话过去问了一下医生, 医生说没事, 果然第3天流血的情况好了一些&#8230;&#8230; </p>



<p>看到那个帖子的时候, 我是有点犹豫的, 我深深知道用嘴呼吸是一件很难受的事儿, 但是考虑到, 要难受也就难受3天. 而且, 看起来我也有一些“非做不可”的理由, 比如, 我需要赶在离职前还有医保的状况下解决一下鼻炎问题, 同时, 我也需要赶在出国前夕解决一下自己身上的小毛病, 避免把“鼻炎”这份难受带到国外. 于是, 尽管纠结了好一段时间, 最后还是鼓起勇气走进了这家著名三甲医院的耳鼻喉科.</p>



<p>事后回想起来,  自己还是too young too naive了. 其实稍微想想也知道, 如果真的是一个小手术, 怎么可能做”全麻“! 最早去医院检测的时候, 我看到这个著名三甲医院里有一片郁郁葱葱的园林区, 里面种满了各种植物树木, 和一些假山假水啥的, 我猜是给住院病人的休息区. 我天真的以为, 住院的时候, 我可以抱着笔记本在这片园林区度过那难受的3天. 当时的我, 根本就没想过, 现在是疫情期间, 怎么可能让病人在医院内部到处走动&#8230;. 进入耳鼻喉科的时候, 我发现楼层是感应门, 从外面进来需要刷卡, 或者按门铃让里面的护士开门. 办理住院手续的时候, 被告知能活动的范围仅限于耳鼻喉科这一层, 前台护士警告说如果擅自跑出去”后果自负“&#8230;</p>



<p>手术过程由于是全麻, 所以是没有知觉的. 不过人生头一次被推进手术室, 还是感觉挺奇妙. 比如, 一大早2个护士就推个移动病床到门口, 并让我脱的全光光的躺上去, 盖上一层白布把我推出楼层, 推进电梯, 又推进手术室. 当时我心想, 我还没做手术呢, 让我自己走过去不行吗? 让我没有料到的是, 手术后我鼻腔里的止血抗菌材料塞了整整7天, 那7天的难受可想而知, 虽然之前长年鼻塞, 但至少可以用一些日本的抗充血剂来让鼻腔暂时通几个小时, 现在回想起来, 这7天的时间可真是不知道怎么熬过来的. 如果一开始我就知道鼻腔会完全丧失7天的功能, 我可能最终不会去做这样一个手术. 我多次要求医生提前把鼻腔里的填充材料取出来, 都被拒绝了, 他告诉我, 之前有过一例因为提前取出材料导致鼻腔大出血被推进急救室的案例&#8230;</p>



<p>除了因为填充物导致全程鼻腔丧失了7天的呼吸功能, 也会有一些别的问题. 比如, 做完手术的48小时内, 鼻腔一直血流不止, 需要不停的更换棉纱. 每换一次, 基本上那小块棉纱都被鲜血染的透透的. 之前也听说过术后的第一天夜里基本上是无法睡觉的, 事实证明的确如此, 由于鼻血一直流, 加上用嘴呼吸导致口腔异常干噪, 差不多就是一夜无眠. 我还记得第二天早上, 护工走进病房的时候, 发现我半边脸都被鲜血染红了, 而且由于过了一夜, 我脸上的鲜血都干噪的”结痂“了. 吓的护工赶紧拿了块湿毛巾进来把脸上的“血痂”擦洗掉. 她一边擦一边说, 如果我这样子被护士长看到了是要处罚她们的&#8230;</p>



<p>我旁边病床的小哥差不多是跟我同一天做的手术, 不过他的鼻炎手术跟我有些差异, 他的鼻腔也没塞填充物. 术后的那晚, 我听到他一直在哼哼鼻子, 好像也是很不舒服的样子. 第2天, 护工把我脸上的血迹擦干以后, 我看到他也起床了. 这时我才发现, 他的半块枕头都被鲜血染红了&#8230;</p>



<p>当时我才真真切切的领教到, 原来一个小小的鼻炎手术, 竟要这般遭罪.  </p>


<div class="wp-block-image">
<figure class="aligncenter size-full is-resized"><a href="https://www.zhukun.net/wp-content/uploads/8637.jpg" target="_blank" rel="noreferrer noopener"><img decoding="async" src="https://www.zhukun.net/wp-content/uploads/8637.jpg" alt="" class="wp-image-8639" width="600" srcset="https://www.zhukun.net/wp-content/uploads/8637.jpg 1024w, https://www.zhukun.net/wp-content/uploads/8637-600x626.jpg 600w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure></div>]]></content:encoded>
					
					<wfw:commentRss>https://www.zhukun.net/archives/8637/feed</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
