├── CNAME ├── img ├── bg.jpg ├── bg.webp ├── 404-bg.jpg ├── favicon.ico ├── home-bg.jpg ├── about-bg.jpg ├── home-bg.webp ├── my │ ├── ypingcn.png │ └── ypingcn.webp ├── home-bg-Sm5ceH.jpg ├── home-bg-z2XLF8.jpg ├── home-bg-Sm5ceH.webp ├── home-bg-z2XLF8.webp ├── travelling-logo.gif ├── post │ ├── git-flow-main.png │ ├── 20211121-search-ublock.jpg │ ├── 20211205-dev-branch-release-main.png │ ├── 20211205-dev-main-release-main.png │ ├── 20230101-45b4e9085db1f6fe441f6c9604445601.jpg │ └── 20230101-ad5db8dd043df6904fb7eed16fdcbd56.jpg └── special │ ├── firefox │ ├── floorp.png │ ├── librewolf.png │ ├── firefox-trains.png │ ├── firefox-clearurls.png │ ├── firefox-gesturefy.png │ ├── firefox-nightly-about.png │ ├── firefox-ublock-origin.png │ ├── firefox-release-calendar.png │ ├── Fx-Browser-icon-fullColor-128.png │ ├── firefox-multi-account-containers.png │ ├── Fx-Browser-Beta-icon-fullColor-128.png │ ├── firefox-all-version-download-option.png │ ├── Fx-Browser-Nightly-icon-fullColor-128.png │ └── Fx-Browser-Developer-icon-fullColor-128.png │ └── fund │ └── china-fund-scale-1998-2021.jpg ├── favicon.ico ├── pwa ├── icons │ └── 128.png └── manifest.json ├── .gitignore ├── fonts ├── fontawesome-webfont.eot ├── fontawesome-webfont.ttf ├── fontawesome-webfont.woff ├── fontawesome-webfont.woff2 ├── glyphicons-halflings-regular.eot ├── glyphicons-halflings-regular.ttf ├── glyphicons-halflings-regular.woff └── glyphicons-halflings-regular.woff2 ├── about.html ├── less ├── variables.less ├── sidebar.less ├── mixins.less └── side-catalog.less ├── _layouts └── default.html ├── wiki ├── guestbook.md ├── affiliate.md ├── privacy.md ├── lctt.md └── index.md ├── robots.txt ├── notes ├── Linux │ ├── xargs.md │ ├── awk.md │ ├── sed.md │ └── find.md ├── C │ ├── apue9-process-relationship.md │ ├── apue7-process-environment.md │ ├── apue3-file-IO.md │ └── apue11-thread.md ├── Snippet │ ├── bin2hex.md │ ├── unique-ptr.md │ ├── shared-ptr.md │ └── union-find.md ├── sitemap.xml ├── Git │ ├── git-flow.md │ └── basic.md ├── Python │ ├── requests.md │ └── django-models.md ├── Cpp │ ├── function-bind.md │ └── gdb.md ├── Redis │ └── redis-in-cpp.md ├── Vim │ └── config.md ├── index-generate.py ├── Markdown │ └── basic.md ├── Https │ └── LetsEncrypt.md └── SQL │ └── syntax.md ├── _posts ├── 2016-04-01-hello-github-page.markdown ├── 2016-09-30-ssh-related-usage.markdown ├── 2018-01-28-annual-summary-2017.markdown ├── 2016-04-06-interesting-code-in-MATLAB-class.markdown ├── 2016-12-06-wps-catalogue-generate.markdown ├── 2018-03-18-spring-recruitment-2018.markdown ├── 2024-11-17-artificial-intelligence-for-work.markdown ├── 2016-11-30-nodeppt.markdown ├── 2022-10-24-seven-up.md ├── 2023-05-02-podcast.markdown ├── 2023-09-09-designing-data-intensive-applications.markdown ├── 2016-04-01-thanks.markdown ├── 2022-01-30-cache-in-microservice.markdown ├── 2017-11-21-firefox-quantum-and-related-discussion.markdown ├── 2023-01-01-annual-summary-2022.markdown ├── 2017-09-20-a-woman-like-me.markdown ├── 2016-04-04-how-to-use-jekyll-to-build-a-blog.markdown ├── 2020-10-23-investment-service.markdown ├── 2022-07-28-user-permission-service.md ├── 2019-01-27-the-south.markdown ├── 2022-06-02-promote-personal-blog.md ├── 2022-11-13-short-url-for-static-page.markdown ├── 2021-11-21-effective-search.markdown ├── 2023-12-31-implementation-linkmic-pk-voiceroom.markdown ├── 2022-10-14-user-attribute-service.md └── 2022-12-04-retirement-pension-plan.markdown ├── special ├── sitemap.xml ├── song │ ├── index.md │ ├── iu-the-forgotten-season.md │ ├── jukjae-lullaby.md │ ├── joy-introduce-me-a-good-person.md │ ├── iu-drama.md │ ├── janabi-a-thought-on-an-autumn-night.md │ ├── d.ear-december-24th.md │ ├── iu-your-meaning.md │ ├── jannabi-for-lover-who-hesitate.md │ ├── jannabi-november-rain.md │ └── iu-suga-eight.md └── firefox │ ├── zen.md │ ├── waterfox.md │ ├── index.md │ ├── floorp.md │ ├── trains.md │ ├── theme.md │ ├── website.md │ ├── librewolf.md │ ├── version.md │ ├── edition-faq.md │ └── mercury.md ├── js ├── hux-blog.min.js ├── jquery.tagcloud.js ├── hux-blog.js └── animatescroll.min.js ├── package.json ├── 404.html ├── offline.html ├── feed.xml ├── index.html ├── _config.yml ├── sitemap.xml ├── Gruntfile.js ├── tags.html ├── css └── syntax.css └── _includes └── nav.html /CNAME: -------------------------------------------------------------------------------- 1 | blog.ypingcn.com -------------------------------------------------------------------------------- /img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/bg.jpg -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/favicon.ico -------------------------------------------------------------------------------- /img/bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/bg.webp -------------------------------------------------------------------------------- /img/404-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/404-bg.jpg -------------------------------------------------------------------------------- /img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/favicon.ico -------------------------------------------------------------------------------- /img/home-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/home-bg.jpg -------------------------------------------------------------------------------- /img/about-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/about-bg.jpg -------------------------------------------------------------------------------- /img/home-bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/home-bg.webp -------------------------------------------------------------------------------- /pwa/icons/128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/pwa/icons/128.png -------------------------------------------------------------------------------- /img/my/ypingcn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/my/ypingcn.png -------------------------------------------------------------------------------- /img/my/ypingcn.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/my/ypingcn.webp -------------------------------------------------------------------------------- /img/home-bg-Sm5ceH.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/home-bg-Sm5ceH.jpg -------------------------------------------------------------------------------- /img/home-bg-z2XLF8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/home-bg-z2XLF8.jpg -------------------------------------------------------------------------------- /img/home-bg-Sm5ceH.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/home-bg-Sm5ceH.webp -------------------------------------------------------------------------------- /img/home-bg-z2XLF8.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/home-bg-z2XLF8.webp -------------------------------------------------------------------------------- /img/travelling-logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/travelling-logo.gif -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | node_modules 3 | .sass-cache 4 | .jekyll-cache 5 | .jekyll-metadate 6 | package-lock.json 7 | -------------------------------------------------------------------------------- /img/post/git-flow-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/post/git-flow-main.png -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /img/special/firefox/floorp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/floorp.png -------------------------------------------------------------------------------- /about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /img/post/20211121-search-ublock.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/post/20211121-search-ublock.jpg -------------------------------------------------------------------------------- /img/special/firefox/librewolf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/librewolf.png -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /img/special/firefox/firefox-trains.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-trains.png -------------------------------------------------------------------------------- /img/special/firefox/firefox-clearurls.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-clearurls.png -------------------------------------------------------------------------------- /img/special/firefox/firefox-gesturefy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-gesturefy.png -------------------------------------------------------------------------------- /img/post/20211205-dev-branch-release-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/post/20211205-dev-branch-release-main.png -------------------------------------------------------------------------------- /img/post/20211205-dev-main-release-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/post/20211205-dev-main-release-main.png -------------------------------------------------------------------------------- /img/special/firefox/firefox-nightly-about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-nightly-about.png -------------------------------------------------------------------------------- /img/special/firefox/firefox-ublock-origin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-ublock-origin.png -------------------------------------------------------------------------------- /img/special/fund/china-fund-scale-1998-2021.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/fund/china-fund-scale-1998-2021.jpg -------------------------------------------------------------------------------- /img/special/firefox/firefox-release-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-release-calendar.png -------------------------------------------------------------------------------- /img/post/20230101-45b4e9085db1f6fe441f6c9604445601.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/post/20230101-45b4e9085db1f6fe441f6c9604445601.jpg -------------------------------------------------------------------------------- /img/post/20230101-ad5db8dd043df6904fb7eed16fdcbd56.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/post/20230101-ad5db8dd043df6904fb7eed16fdcbd56.jpg -------------------------------------------------------------------------------- /img/special/firefox/Fx-Browser-icon-fullColor-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/Fx-Browser-icon-fullColor-128.png -------------------------------------------------------------------------------- /img/special/firefox/firefox-multi-account-containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-multi-account-containers.png -------------------------------------------------------------------------------- /img/special/firefox/Fx-Browser-Beta-icon-fullColor-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/Fx-Browser-Beta-icon-fullColor-128.png -------------------------------------------------------------------------------- /img/special/firefox/firefox-all-version-download-option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/firefox-all-version-download-option.png -------------------------------------------------------------------------------- /img/special/firefox/Fx-Browser-Nightly-icon-fullColor-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/Fx-Browser-Nightly-icon-fullColor-128.png -------------------------------------------------------------------------------- /img/special/firefox/Fx-Browser-Developer-icon-fullColor-128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ypingcn/ypingcn.github.io/master/img/special/firefox/Fx-Browser-Developer-icon-fullColor-128.png -------------------------------------------------------------------------------- /less/variables.less: -------------------------------------------------------------------------------- 1 | // Variables 2 | 3 | @brand-primary: #0085A1; 4 | @gray-dark: lighten(black, 25%); 5 | @gray: lighten(black, 50%); 6 | @gray-l: lighten(black, 75%); 7 | @white-faded: fade(white, 80%); 8 | @gray-light: #eee; 9 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | 6 | {% include nav.html %} 7 | {{ content }} 8 | {% include footer.html %} 9 | 10 | 11 | -------------------------------------------------------------------------------- /wiki/guestbook.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 留言 4 | update: 2022-11-11 00:00 +0800 5 | not_show_copyright: true 6 | not_show_ad: true 7 | --- 8 | 9 | 来者皆是客。欢迎! 10 | 11 | 由于多说、网易云跟帖等服务的相继关闭,无法维护本页面下的留言功能,请您留意本页面右侧 [ABOUT ME] 或者顶部 [关于] 栏目的信息更新。 12 | 13 | 后续暂无维护本页面留言功能的计划。抱歉。 14 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | permalink: robots.txt 4 | --- 5 | User-agent: * 6 | Disallow: /files/ 7 | Disallow: /img/my/ 8 | Disallow: /cdn-cgi/ 9 | Sitemap: {{ site.url }}/sitemap.xml 10 | Sitemap: {{ site.url }}/notes/sitemap.xml 11 | Sitemap: {{ site.url }}/special/sitemap.xml 12 | -------------------------------------------------------------------------------- /pwa/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Main()", 3 | "short_name": "Main()", 4 | "description": "A personal blog powered by hux's opensource code", 5 | "icons": [{ 6 | "src": "icons/128.png", 7 | "sizes": "128x128", 8 | "type": "image/png" 9 | }], 10 | "background_color": "#fff", 11 | "theme_color": "#000", 12 | "start_url": "/", 13 | "display": "standalone", 14 | "orientation": "portrait" 15 | } 16 | -------------------------------------------------------------------------------- /notes/Linux/xargs.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Linux 命令 - xargs 4 | update: 2018-03-25 00:05 +0800 5 | --- 6 | 7 | ## 基本 8 | 9 | xargs [option] 10 | 11 | ## 例子 12 | 13 | > cat example.txt | xargs 14 | 15 | 多行输入单行输出 16 | 17 | > cat example.txt | xargs -n3 18 | 19 | 多行输入多行输出 20 | 21 | > echo "test/test/test" | xargs -d/ 22 | > test test test 23 | 24 | 自定义分隔符 25 | 26 | > find -mtime -7 | xargs -I {} cp {} ~/test 27 | 28 | 自定义替换符号(把七天内修改的文件复制到 ~/test 里) 29 | 30 | -------------------------------------------------------------------------------- /notes/C/apue9-process-relationship.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 第九章 进程关系 4 | update: 2017-09-25 20:18 +0800 5 | --- 6 | 7 | ```cpp 8 | #include 9 | pid _t getpgrp(void) // 获得进程组 id == getpgid(0) 10 | int setpgid(__pid_t __pid, __pid_t __pgid) // pid 是0 则使用调用者的进程id 11 | pid_t setsid(void) // 建立一个新的会话,返回进程组id 12 | pid_t getsid(pid_t pid) // 返回回话首进程的进程组id 13 | pid_t tcgetpgrp(int __fd) // 获取前台进程组id 出错-1 14 | pid_t tcsetpgrp(int __fd, __pid_t __pgrp_id) 15 | 16 | //作业控制 17 | ``` -------------------------------------------------------------------------------- /notes/Snippet/bin2hex.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 「代码片段」 bin2hex 4 | update: 2024-10-03 19:00 +0800 5 | --- 6 | 7 | 「代码片段」 bin2hex 8 | 9 | ```cpp 10 | std::string bin2hex(const std::string &input) 11 | { 12 | std::string res; 13 | const char hex[] = "0123456789ABCDEF"; 14 | for (auto sc : input) 15 | { 16 | unsigned char c = static_cast(sc); 17 | res += hex[c >> 4]; 18 | res += hex[c & 0xf]; 19 | } 20 | 21 | return res; 22 | } 23 | ``` -------------------------------------------------------------------------------- /_posts/2016-04-01-hello-github-page.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Hello! Github Page" 4 | subtitle: "Powered by Github Page & Jekyll" 5 | description: "This blog is powered by Github Page & Jekyll. And I am really loving it." 6 | date: 2016-04-01 +0800 7 | update: 2016-04-01 12:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | --- 13 | 14 | This blog is powered by Github Page & Jekyll. And I am really loving it. 15 | :-) 16 | 17 | 18 | -------------------------------------------------------------------------------- /notes/sitemap.xml: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | 5 | {% for page in site.pages %}{% assign now_folder = page.url | slice: 0,7 %}{% assign now_folder_level = page.url | split:"/" | size %}{% if now_folder == "/notes/" and now_folder_level > 3 %} 6 | 7 | {{site.url}}{{page.url}} 8 | {% if page.update %}{{ page.update | date_to_xmlschema }}{% else %}{{ page.date | date_to_xmlschema }}{% endif %} 9 | daily 10 | 0.90 11 | {% endif %}{% endfor %} 12 | 13 | -------------------------------------------------------------------------------- /notes/Git/git-flow.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Git-flow 个人理解 4 | date: 2017-07-16 15:00 +0800 5 | update: 2017-07-16 15:00 +0800 6 | --- 7 | 8 | [Image URL](/img/post/git-flow-main.png) 9 | 10 | 这图很好地表现出了 git-flow 的整个流程。 11 | 12 | ## 概要 13 | 14 | 如图所示,git flow 用了这几个分支: 15 | 16 | - master 17 | 18 | 个人将其理解为正式版的分支,不能在该分支修改只能从其他分支合并而来。 19 | 20 | - develop 21 | 22 | 日常开发用的分支,feature 分支由该分支而来。 23 | 24 | - hotfixes 25 | 26 | 修复正式版代码中的不足之处,修改完成后合并进master 和 develop 分支里。 27 | 28 | - feature 29 | 30 | 新功能/特性分支,修改完成后只能合并进 develop 分支里。 31 | 32 | 值得一提的是,该分支合并时添加参数 ``` --no-ff``` ,能保留原有分支提交历史。 33 | 34 | - release 35 | 36 | 新版本的发布分支,完成所有工作后,合并到 master 和 develop 分支里。 37 | 38 | 39 | -------------------------------------------------------------------------------- /_posts/2016-09-30-ssh-related-usage.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "初试 ssh 命令" 4 | subtitle: "First try ssh commands" 5 | description: "ssh 连接服务器、远程使用命令、上传文件、下载文件" 6 | date: 2016-09-30 +0800 7 | update: 2021-11-02 23:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 技术 14 | --- 15 | 16 | ssh 连接服务器 17 | 18 | ``` 19 | ssh username@host 20 | ``` 21 | 22 | 远程使用命令( ls 为例) 23 | 24 | ``` 25 | ssh username@host command ls 26 | ``` 27 | 28 | 上传文件 29 | 30 | ``` 31 | scp /local-path/file username@host:/romote-path 32 | ``` 33 | 34 | 下载文件 35 | 36 | ``` 37 | scp username@host:/romote-path /local-path 38 | ``` 39 | 40 | -------------------------------------------------------------------------------- /_posts/2018-01-28-annual-summary-2017.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "2017 年终总结" 4 | subtitle: "Annual summary for 2017" 5 | description: "2017 年终总结。说是总结,其实是对自己这年的要求,有太多需要改变的事。" 6 | date: 2018-01-28 +0800 7 | update: 2018-01-28 12:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 总结 14 | --- 15 | 16 | 现在已经是2018年第一个月的月末了,去年一年的经历也多多少岁有点想法,记录下来吧。 17 | 18 | 最大的感触还是人吧。有些人,你跟他聊天的时候会觉得眼前这个人的说话方式很舒服, 说话的内容也不会踩着你的尾巴,故意说那些自己不想提到的事情。有些人却相反,哪壶不开提哪壶,并以此为乐。有些人是很客气地说,明显说话的内容并不会太深入。 19 | 20 | 有时候也会觉得跟某个人的相处关系比较好,可能是对方更加擅长处理与他人的关系。每每想到这一点就觉得自己需要更多地他人学习,也要投入更多,有更多的共同经历。 21 | 22 | 同时也要学点除了专业相关之外的第二技能,少上社交网络。 23 | 24 | 说是总结,其实是对自己这年的要求,有太多需要改变的事。 25 | 26 | -------------------------------------------------------------------------------- /_posts/2016-04-06-interesting-code-in-MATLAB-class.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "MATLAB 选修课上的一些有趣的代码" 4 | subtitle: "Interesting code in matlab class" 5 | description: "Matlab 发出不同频率声音的有趣代码" 6 | date: 2016-04-06 +0800 7 | update: 2016-04-06 12:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 课程 14 | --- 15 | 16 | 今晚的选修课并不是平时的那个老师上的课,来了一个新老师来替课。 17 | 18 | 在课堂快结束的时候他分享了一段代码,如下,说是能用 MATLAB 发出不同频率的声音,还开玩笑说能听到频率越高的人越聪明。[微笑脸]。 19 | 20 | ``` 21 | % MATLAB code 22 | 23 | a=20000; 24 | b=100; 25 | fs=60000; 26 | t=0:1/fs:1; 27 | for index=1:100 28 | c=a-b*index; 29 | d=cos(2*pi*t*c); 30 | sound(d,fs); 31 | pause(2); 32 | end 33 | ``` 34 | 在自己的设备上能听到一点声音但是不明显,而且显示的跟上课演示的也不同。 35 | 36 | 虽然看不懂是什么意思,就暂且记录下来吧。 37 | 38 | -------------------------------------------------------------------------------- /special/sitemap.xml: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | 5 | 6 | {{site.url}}/special/firefox/ 7 | {{ "now" | date_to_xmlschema }} 8 | daily 9 | 1.00 10 | {% for page in site.pages %}{% assign now_folder = page.url | slice: 0,9 %}{% assign now_folder_level = page.url | split:"/" | size %}{% if now_folder == "/special/" and now_folder_level > 3 %} 11 | 12 | {{site.url}}{{page.url}} 13 | {% if page.update %}{{ page.update | date_to_xmlschema }}{% else %}{{ page.date | date_to_xmlschema }}{% endif %} 14 | daily 15 | 1.00 16 | {% endif %}{% endfor %} 17 | 18 | -------------------------------------------------------------------------------- /_posts/2016-12-06-wps-catalogue-generate.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "用 WPS 生成文档目录" 4 | subtitle: "How to generate catalogue with WPS Office" 5 | description: "无需复杂操作,只要几次鼠标点击,即可简单快捷地生成文档目录(以使用 WPS 10.8 版本为例的操作指引)" 6 | date: 2016-12-06 +0800 7 | update: 2021-11-01 22:39 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 教程 14 | --- 15 | 16 | > 下文中是使用 WPS 10.8 的版本生成目录,WPS 后续版本可能有些许操作上的差别,仅供参考。 17 | 18 | ## 目录生成 19 | 20 | 如果全文用【**正文**】【**标题1**】【**标题2**】的预设置排版的话,直接点“引用——插入目录”的按钮就可以直接插入目录。没有的话,在“引用——目录级别”修改相应文字以便正确显示。 21 | 22 | ## 修正页数显示 23 | 24 | 用上面的方法,页码数是从封面开始算的,如果想从正文开始,则要做以下的修改。 25 | 26 | 在正文与目录之间删除所有无关内容,添加下一页分节符(“插入——分隔符——下一页分节符”)。 27 | 28 | 在正文页的页脚双击,取消选中【同前节】(在【页眉与页脚】选项卡里的最后一个)。 29 | 30 | 在页脚的【插入页码】按钮中选择想要的形式,应用范围选【本节】,并选中【重新编号】 31 | 32 | 最后更新目录的页码。 33 | -------------------------------------------------------------------------------- /_posts/2018-03-18-spring-recruitment-2018.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "18 年春招记录" 4 | subtitle: "Spring recruitment record in 2018" 5 | description: "最后也找到实习了,面过算是不少的公司,多少有点感悟。There is a long way to go." 6 | date: 2018-03-18 +0800 7 | update: 2018-03-20 12:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 职场 14 | --- 15 | 16 | 这是今年春招的面试记录,找的是广深的实习,C++ 或者 Python 吧,互勉。 17 | 18 | > 后话(2018-07-10) 19 | 20 | 最后也找到实习了,面过算是不少的公司,多少有点感悟—— 21 | 22 | 1. 最明显的一点是作为面试者的我们,能通过面试官提出的问题判断其能力与该公司岗位对于自己的要求。 23 | 24 | 这一点要有对比才能有体会,投的一家游戏公司,面试官看着简历还是没问出来多少问题,安静了很久。而现在实习公司的面试官(也就是我 leader)能看着简历在一面里问了一个多小时的问题,问的问题深度反映了面试官的能力吧。 25 | 26 | 2. HR 也是公司的代表 27 | 28 | 对于我来说,如果 HR 看着你简历项目问你上面是用什么语言写的,这次面试我可能不太会愿意去。这样问大概是想找些一来就能直接干活的实习生。(个人意见) 29 | 30 | 而且去现场面的时候 HR 能帮面试者打印简历而不是让面试者提前准备,这也是很 OK ! 31 | 32 | 而且如果公司环境、流程什么的比较正式,福利什么的也不会太差。 33 | 34 | 大概这些吧,There is a long way to go. 35 | -------------------------------------------------------------------------------- /notes/C/apue7-process-environment.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 第七章 进程环境 4 | update: 2017-09-25 20:18 +0800 5 | --- 6 | 7 | ```cpp 8 | //八种方式使进程终止(正常终止和异常终止) 9 | #include // ISO C 10 | void exit(int __status) // 有清理工作 11 | void _Exit(int __status) // 直接返回内核 12 | #include // POSIX 13 | void _exit(int __status) // 直接返回内核 14 | int atexit(void (*__func)()) // 注册以便在 main 函数结束后调用,调用顺序和注册顺序相反。 15 | //exit()和atexit()_nobadyelse_新浪博客 16 | //http://blog.sina.com.cn/s/blog_5cec5bad0100b0x2.html 17 | 18 | 19 | #include 20 | void * malloc(size_t __size) 21 | void * calloc(size_t __nmemb, size_t __size) 22 | void * realloc(void *__ptr, size_t __size) 23 | void free(void *__ptr) 24 | 25 | #include 26 | char * getenv(const char *__name); 27 | //P168 28 | int putenv(char *__string) 29 | int setenv(const char *__name, const char *__value, int __replace) // //__replace 为非0 则删除原有定义再重新设置,为0 则不修改 30 | int unsetenv(const char *__name) 31 | 32 | //setjmp longjmp 在函数之间跳转 33 | //gettrlimit settrlimit 资源限制 p175 34 | ``` -------------------------------------------------------------------------------- /js/hux-blog.min.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){$("table").wrap("
"),$("table").addClass("table")}),$(document).ready(function(){$('iframe[src*="youtube.com"]').wrap('
'),$('iframe[src*="youtube.com"]').addClass("embed-responsive-item"),$('iframe[src*="vimeo.com"]').wrap('
'),$('iframe[src*="vimeo.com"]').addClass("embed-responsive-item")}),jQuery(document).ready(function(a){var b=1170;if(a(window).width()>b){var c=a(".navbar-custom").height(),d=a(".intro-header .container").height();a(window).on("scroll",{previousTop:0},function(){var b=a(window).scrollTop(),e=a(".side-catalog");b0&&a(".navbar-custom").hasClass("is-fixed")?a(".navbar-custom").addClass("is-visible"):a(".navbar-custom").removeClass("is-visible is-fixed"):(a(".navbar-custom").removeClass("is-visible"),b>c&&!a(".navbar-custom").hasClass("is-fixed")&&a(".navbar-custom").addClass("is-fixed")),this.previousTop=b,e.show(),b>d+41?e.addClass("fixed"):e.removeClass("fixed")})}}); -------------------------------------------------------------------------------- /_posts/2024-11-17-artificial-intelligence-for-work.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "在工作中使用 AI 辅助" 4 | subtitle: "artificial intelligence for work" 5 | description: "AI 工具分享" 6 | date: 2024-11-17 12:00 +0800 7 | update: 2024-11-17 12:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 分享 14 | --- 15 | 16 | AI在职场中的应用广泛且多样,它正在改变各种职业的工作方式和效率。以下是一些主要用途: 17 | 18 | 自动化和优化常规任务: 19 | AI可以自动执行诸如数据输入、文件整理、邮件筛选等重复性任务,从而减少人工操作,提高效率。 20 | 21 | 智能助手: 22 | AI助手如“小佳”可以帮助员工解答问题,提供即时信息和支持,减少查找和解决问题的时间。 23 | 24 | 招聘和面试: 25 | AI可以用于筛选简历、进行初步面试,甚至评估候选人的适合度,如加多宝集团的AI招聘官。 26 | 27 | 数据分析: 28 | 在金融、医疗、市场研究等领域,AI能够处理大量数据,提供深入的分析和预测,帮助企业做出更明智的决策。 29 | 30 | 客户支持: 31 | AI聊天机器人可以提供24/7的客户服务,回答常见问题,处理投诉和建议,提高客户满意度。 32 | 33 | 创意工作支持: 34 | 在设计、写作和艺术领域,AI可以提供创意建议,生成设计草图或文本,帮助创作者加速创作过程。 35 | 36 | 教育和培训: 37 | AI可以个性化教学,提供定制化的学习材料和课程,同时帮助教师评估学生的学习进度和理解程度。 38 | 39 | 提高生产力和效率: 40 | 在制造业中,AI可以用于优化生产线,预测设备故障,减少停机时间,提高生产效率。 41 | 42 | 医疗诊断和治疗: 43 | AI通过分析医疗图像和患者数据,辅助医生进行疾病诊断和治疗方案的制定,提高诊断的准确性和治疗效果。 44 | 45 | 总之,AI在职场中的应用正在不断扩展,从简单的任务自动化到复杂的决策支持,AI正在成为提高工作效率和质量的重要工具。 46 | -------------------------------------------------------------------------------- /notes/Snippet/unique-ptr.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 「代码片段」 unique_ptr 4 | update: 2024-10-03 19:00 +0800 5 | --- 6 | 7 | 「代码片段」 unique_ptr 8 | 9 | 10 | ```cpp 11 | #include 12 | 13 | template 14 | class unique_ptr { 15 | public: 16 | unique_ptr(T* ptr = nullptr) : ptr(ptr) {} 17 | 18 | ~unique_ptr() { 19 | delete ptr; 20 | } 21 | 22 | unique_ptr(unique_ptr&& other) noexcept : ptr(other.ptr) { 23 | other.ptr = nullptr; 24 | } 25 | 26 | unique_ptr& operator=(unique_ptr&& other) noexcept { 27 | if (this!= &other) { 28 | delete ptr; 29 | ptr = other.ptr; 30 | other.ptr = nullptr; 31 | } 32 | return *this; 33 | } 34 | 35 | T& operator*() const { 36 | return *ptr; 37 | } 38 | 39 | T* operator->() const { 40 | return ptr; 41 | } 42 | 43 | T* release() { 44 | T* temp = ptr; 45 | ptr = nullptr; 46 | return temp; 47 | } 48 | 49 | private: 50 | T* ptr; 51 | unique_ptr(const unique_ptr&) = delete; 52 | unique_ptr& operator=(const unique_ptr&) = delete; 53 | }; 54 | ``` -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hux-blog", 3 | "title": "Hux Blog", 4 | "author": "Hux ", 5 | "version": "1.7.0", 6 | "homepage": "http://huxpro.github.io", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/Huxpro/huxpro.github.io" 10 | }, 11 | "bugs": "https://github.com/Huxpro/huxpro.github.io/issues", 12 | "devDependencies": { 13 | "grunt": ">=1.3.0", 14 | "grunt-contrib-less": "~0.11.4", 15 | "grunt-contrib-watch": "~0.6.1", 16 | "grunt-banner": "~0.2.3", 17 | "grunt-contrib-uglify": "~0.5.1" 18 | }, 19 | "scripts": { 20 | "preview": "cd _site; python -m SimpleHTTPServer 8020", 21 | "py3view": "cd _site; python3 -m http.server 8020", 22 | "watch": "grunt watch & npm run preview & jekyll serve -w", 23 | "py3wa": "grunt watch & npm run py3view & jekyll serve -w", 24 | "boil": "git push boilerplate boilerplate:master", 25 | "push": "git push origin master --tag", 26 | "cafe": "git co gitcafe-pages; git merge master; git push gitcafe gitcafe-pages:gitcafe-pages --tag; git co master;" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | subtitle: "你来到了没有知识的荒原 :(" 4 | header-img: "img/404-bg.jpg" 5 | permalink: /404.html 6 | not_show_copyright: true 7 | not_show_ad: true 8 | --- 9 | 10 | 11 | 12 |
14 |
15 |
16 |
17 |
18 |

404

19 | {{ page.subtitle }} 20 |

21 | 22 | 23 | 24 | 25 |

26 |
27 |
28 |
29 |
30 |
31 | 32 | -------------------------------------------------------------------------------- /offline.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | subtitle: "当前网络不可用 :(" 4 | header-img: "img/404-bg.jpg" 5 | permalink: /offline.html 6 | not_show_copyright: true 7 | not_show_ad: true 8 | --- 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 |

Offline

18 | {{ page.subtitle }} 19 |

20 | 21 | 22 | 23 | 24 |

25 |
26 |
27 |
28 |
29 |
30 | 31 | 34 | -------------------------------------------------------------------------------- /notes/Snippet/shared-ptr.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 「代码片段」 shared_ptr 4 | update: 2024-10-03 19:00 +0800 5 | --- 6 | 7 | 「代码片段」 shared_ptr 8 | 9 | 10 | ```cpp 11 | 12 | #include 13 | 14 | template 15 | class shared_ptr { 16 | public: 17 | shared_ptr(T* ptr = nullptr) : ptr(ptr), ref_count(new size_t(1)) {} 18 | 19 | shared_ptr(const shared_ptr& other) : ptr(other.ptr), ref_count(other.ref_count) { 20 | if (ref_count) ++(*ref_count); 21 | } 22 | 23 | shared_ptr& operator=(const shared_ptr& other) { 24 | if (this!= &other) { 25 | release(); 26 | ptr = other.ptr; 27 | ref_count = other.ref_count; 28 | if (ref_count) ++(*ref_count); 29 | } 30 | return *this; 31 | } 32 | 33 | ~shared_ptr() { 34 | release(); 35 | } 36 | 37 | T& operator*() const { return *ptr; } 38 | T* operator->() const { return ptr; } 39 | 40 | size_t use_count() const { return ref_count? *ref_count : 0; } 41 | 42 | private: 43 | T* ptr; 44 | size_t* ref_count; 45 | 46 | void release() { 47 | if (ref_count && --(*ref_count) == 0) { 48 | delete ptr; 49 | delete ref_count; 50 | } 51 | } 52 | }; 53 | ``` -------------------------------------------------------------------------------- /special/song/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: KPOP 歌曲歌词音译汇总 4 | date: 2023-03-12 23:00 +0800 5 | update: 2024-07-17 00:00 +0800 6 | description: KPOP 歌曲歌词音译汇总 7 | --- 8 | 9 | #《12月24日》- d.ear 10 | 11 | #《Ah Puh》- IU 12 | 13 | #《Drama》- IU 14 | 15 | #《Eight》- IU x SUGA 16 | 17 | #《被遗忘的季节》- IU 18 | 19 | #《你的意义》- IU 20 | 21 | #《秋日思绪》- Jannabi 22 | 23 | #《致犹豫的恋人们》- Jannabi 24 | 25 | #《November Rain》- Jannabi 26 | 27 | #《좋은 사람 있으면 소개시켜줘 》- Joy 28 | 29 | #《面具》- 安七炫 30 | 31 | #《摇篮曲》- Jukjae(郑宰阮) -------------------------------------------------------------------------------- /special/song/iu-the-forgotten-season.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - 被遗忘的季节 @IU 4 | date: 2022-06-03 19:34 +0800 5 | update: 2022-07-07 10:30 +0800 6 | description: 被遗忘的季节 @IU - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | 被遗忘的季节 잊혀진 계절 @IU [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | 잊혀진 계절 17 | 被遗忘的季节 18 | 19 | 지금도 기억하고 있어요 20 | ji gen do ki yo ka go yi so yo 21 | 现在还依然记得 22 | 23 | 시월의 마지막 밤을 24 | xi wo lae ma ji ma bam mer 25 | 十月最后的那个夜晚 26 | 27 | 뜻 모를 이야기만 남긴 채 28 | de mo ler yi ya gi man nam gin qie 29 | 只留下不明不白的话语 30 | 31 | 우리는 헤어졌지요 32 | wu li nen hae o jio ji yo 33 | 我们分手了 34 | 35 | 그 날의 쓸쓸했던 표정이 36 | ke nar le sir sir hae don pio ziong ni 37 | 那天冷漠的表情 38 | 39 | 그대의 진실인 가요 40 | ke dae ae jin xlr lin ga yo 41 | 是你真实的一面吗 42 | 43 | 한 마디 변명도 못하고 44 | han ma di bion miong do mo qia guo 45 | 一句话也没有辨明(解释) 46 | 47 | 잊혀져야 하는 건가요 48 | yi qio jio ya ha nen gon ga yo 49 | 该就这样忘记吗 50 | 51 | 언제나 돌아오는 계절은 52 | on jae na do la o nen kae jior len 53 | 何时再来临的季节 54 | 55 | 나에게 꿈을 주지만 56 | na ae gae gum mer ju ji man 57 | 让我再一次入梦 58 | 59 | 이룰 수 없는 꿈은 슬퍼요 60 | yi lur su ob nen gum men si po yo 61 | 无法实现的梦让我很悲伤 62 | 63 | 나를 울려요 64 | na ler wu lio yo 65 | 我哭了 66 | (无法实现的梦让我很悲伤,所以我哭了 67 | ``` -------------------------------------------------------------------------------- /_posts/2016-11-30-nodeppt.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "用 nodePPT 完成网页演示" 4 | subtitle: "The experience about nodePPT" 5 | description: "不用安装 Office,网页也可以完成演示功能,nodePPT" 6 | date: 2016-11-30 +0800 7 | update: 2021-11-02 23:02 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 技术 14 | --- 15 | 16 | > 最近的课有分小组的课前演讲,想着试一试最近发现的这软件,无奈教室电脑不给力,不能用投影,用网页播放也一大堆错误。但我还是决定简短地记录下来这尝试的过程。 17 | 18 | 最近发现 nodePPT 这个用 Nodejs 做的软件,可以用来做演讲用的网页演示文稿。支持 GFM 的 markdown 语法编写 和 html 语法。生成的网页简单但很实用。 19 | 20 | ``` 21 | This is probably the best web presentation tool so far! 22 | ``` 23 | 24 | ## 安装 25 | 26 | 作者一开始给出的安装命令便是```npm install -g nodeppt``` ,明显是要先安装npm,尝试着用 ```sudo apt install npm``` 装,之后再用作者提供的命令安装。 27 | 28 | 有几个要留意的点: 29 | 30 | 一是要加上管理员权限运行作者提供的命令。刚开始的时候一直错却不知道是哪里的问题。 31 | 32 | 二是要改 npm 的源,默认的一直连不上。方法就是在 ```~/.npmrc``` 里加上以下的内容 33 | 34 | ``` 35 | registry = https://registry.npm.taobao.org 36 | ``` 37 | 38 | ## 使用 39 | 40 | 作者的演示网页里有详细的介绍,这里无需赘言。nodeppt - 这可能是迄今为止最好的网页版演示库 - By 三水清 41 | 42 | 用```nodeppt generate -a file_path/file_name```生成 html 文件,将其放在 Github Page 上也能正常使用。(只要浏览器支持) 43 | -------------------------------------------------------------------------------- /_posts/2022-10-24-seven-up.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "何为同路人? | 人生七年(一)" 4 | subtitle: "Who can come with me?" 5 | description: "人生七年,何为同路人?" 6 | date: 2022-10-24 +0800 7 | update: 2022-12-02 00:02 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 生活 14 | - 分享 15 | --- 16 | 17 | 人生七年,这也是一部纪录片的名字,大致内容讲的是记录不同的小朋友对于例如梦想生活等特定话题的想法,每七年回访他们了解他们的经历和想法的变化。人生七年又七年,现在已经更新到 S7 63 岁了。对于我而言,如果从离开家乡上大学开始算,今年也已经是第七年了。 18 | 19 | 而我之所以选择这个纪录片的名字作为本次博客的更新标题,除去个人经历的特殊时间点,和想记录自己的想法以外,更多是因为庞博在《脱口秀大会》第五季第六集里关于飞机的话题里有触动到我的一句话。原话是“去上海的还有吗?不过在那个时刻,我真的听到了一个声音说,我要去上海。我仔细听了一下,是十八岁的我自己”。 20 | 21 | 说来也巧,庞博也曾经是一名写过三行上过太空的代码的程序员。与大众刻板的“格衬衫”沉闷印象不同的是,他在舞台面前更多表现出来的是活跃文本扎实的一面。脱口秀大会对于他而言更像是各种尝试后收获的事业第二曲线,而且在这种转变中认识了很多志同道合的朋友。这些人对于他而言既是舞台上的竞争对手,也是幕后相互帮助的朋友。突破自己原有的圈子,收获的是自己的改变,也收获了同路人。 22 | 23 | 这个博客是我尝试表达自己的一个地方,也希望借此机会积累下来工作上经验或者其他方面的思考,说来惭愧这部分的内容更新不多后续会争取补上。对于自己的职业,我的理解是这个职业是对于我来说一个完成原始积累的职业,开局不需要太依赖家庭背景,而且与机器打交道的时间长,遇到沟通的事情相对简单的特点避开了我不善表达的缺点。但是随着时间的流逝,我也慢慢地发现了与人聊天的美好,沟通不见得是一件坏事。用当下最流行的``` MBTI ```标签来衡量这种变化的话,我的标签从``` ISFP ```慢慢地变成了``` ESFP ```。学会一点沟通的技巧,工作进度也能有效地推进。而且随着沟通的实践感受和观念的转变,我逐渐发现同事也不仅仅只是工位上的“局域网网友”,而更像是一个有不同优点可以学习和借鉴的榜样,交流中的思维碰撞、细节上的感受和言行举止对我也有明显的改变。 24 | 25 | 我也已经记不住 7 年前自己说过的话,可能我不是一个太念旧的人,相比过去我更在意现在和憧憬未来。今天是 1024 节日,既然遇上了,那也顺祝自己节日快乐吧~ 26 | -------------------------------------------------------------------------------- /special/firefox/zen.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Zen 浏览器资源汇总(2025年) 4 | description: 基于火狐浏览器开发的浏览器「Zen Browser」 5 | date: 2024-12-26 09:00 +0800 6 | update: 2025-05-09 10:30 +0800 7 | --- 8 | 9 | Zen 浏览器是一款以极简主义为核心设计的开源浏览器,基于 Firefox 引擎构建,旨在通过垂直标签管理和高度可定制性提升用户的专注力与效率。 10 | 11 | ## 特点 12 | 13 | 其创新性主要体现在以下几个方面: 14 | 15 | 1. 垂直标签与界面优化:Zen 浏览器采用垂直标签栏设计,将传统横向标签转为侧边栏布局,不仅节省横向空间,还支持更直观的标签分类与管理,用户可通过“Zen Glance”功能快速预览标签内容,减少切换成本。 16 | 17 | 2. Firefox 生态集成:作为 Firefox 的衍生版本,Zen 继承了其强大的隐私保护功能(如内置跟踪拦截)和开源特性,同时支持 Firefox 丰富的扩展库,用户无需牺牲功能性即可享受极简界面。 18 | 19 | 3. 高度可定制化:用户可通过主题、侧边栏工具和设置深度调整界面与功能,满足个性化需求,例如自由配置侧边栏的快捷入口或调整信息展示密度。 20 | 21 | 与 Arc 浏览器的差异主要体现在设计哲学与目标用户群体上: 22 | 23 | 1. 设计理念:Arc 基于 Chromium,强调“重新发明浏览器”,通过“空间”(分场景工作区)和“画架”(内置笔记工具)等功能重构交互逻辑,适合追求工作流创新的高级用户。而 Zen 更注重在传统浏览器框架内优化体验,保留用户熟悉的操作习惯,适合偏好简洁但不愿彻底改变使用方式的用户。 24 | 25 | 2. 技术路径:Zen 依托 Firefox 的开源生态,强调隐私与社区驱动;Arc 则依赖商业化团队推动,2024 年 12 月后 Browser Company 转向 AI 浏览器 Dia 的研发,试图将 AI 深度融入底层架构,而 Zen 暂无类似计划。 26 | 27 | 3. 用户定位:Zen 吸引注重隐私、轻量化和开源技术的用户;Arc 则面向愿意接受学习曲线、需要多任务管理与 AI 整合的极客群体。 28 | 29 | ## 安装 30 | 31 | 官网请认准:```https://zen-browser.app/``` 32 | 33 | 当前所有版本仍处于 beta 测试版中,需注意日常数据备份同步以免意外导致丢失。支持 Windows/MacOS/Linux 三大主流电脑环境,X86_64 是平时更常见的选择,而 ARM64 架构可以在 Apple M1、M2 芯片或其他知情的情况下选择下载。 34 | 35 | 【推荐使用】Zen 浏览器 Windows/MacOS/Linux 官方下载地址:点击前往 36 | -------------------------------------------------------------------------------- /less/sidebar.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | 3 | // Sidebar Components 4 | 5 | // Large Screen 6 | @media (min-width: 1200px){ 7 | .post-container, .sidebar-container{ 8 | padding-right: 5%; 9 | } 10 | } 11 | @media (min-width: 768px){ 12 | .post-container{ 13 | padding-right: 5%; 14 | } 15 | } 16 | 17 | // Container of Sidebar, also Friends 18 | .sidebar-container{ 19 | color: @gray-l; 20 | font-size: 14px; 21 | h5{ 22 | color: @gray; 23 | padding-bottom: 1em; 24 | a{ 25 | color: @gray !important; 26 | text-decoration: none; 27 | } 28 | } 29 | a{ 30 | color: @gray-l !important; 31 | &:hover, &:active{ 32 | color: @brand-primary !important; 33 | } 34 | } 35 | .tags{ 36 | a{ 37 | border-color: @gray-l; 38 | &:hover, &:active{ 39 | border-color: @brand-primary; 40 | } 41 | } 42 | } 43 | .short-about{ 44 | img{ 45 | width: 80%; 46 | display: block; 47 | border-radius: 5px; 48 | margin-bottom: 20px; 49 | } 50 | p{ 51 | margin-top: 0px; 52 | margin-bottom: 20px; 53 | } 54 | .list-inline>li{ 55 | padding-left: 0px; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /special/firefox/waterfox.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: WaterFox 水狐浏览器资源汇总(2025年) 4 | description: Waterfox 水狐浏览器是您的上网的最佳伙伴,提供高效、安全且注重隐私保护的浏览体验。探索水狐浏览器的众多功能,享受顶级的网页浏览速度。 5 | date: 2023-12-02 21:30 +0800 6 | update: 2025-05-09 10:30 +0800 7 | --- 8 | 9 | **快速下载**:最新版 WaterFox 水狐浏览器 Windows 安装程序下载 10 | 11 | --- 12 | 13 | Waterfox 浏览器是一个开源的网络浏览器,它是 Firefox 火狐浏览器的一个分支。 14 | 15 | Waterfox 浏览器的历史可以追溯到 2011 年 3 月,它是由 Alex Kontos 创建的。当时他只是一个 16 岁的学生,出于想帮助 Mozilla 扩展自由开放网络的理想而决定制作 Waterfox 浏览器。 16 | 17 | Waterfox 浏览器的主要特点有: 18 | 19 | - 性能更优 - Waterfox 通过各种编译优化技术,大幅提升了浏览器的速度,尤其是对多核心 CPU 的优化,让其速度可以超过 Firefox。 20 | - 更注重隐私 - Waterfox 默认去除了遥测和数据收集功能,更加尊重用户隐私。用户可以选择加入匿名化的统计功能。 21 | - 资源占用少 - 相比 Firefox,Waterfox 的内存和 CPU 占用都较低,在大量打开标签页的情况下也能保持系统流畅。 22 | - 更高定制化 - Waterfox 允许更多的界面定制和优化选项调整,用户可以调整 Firefox 不允许调整的许多设置。 23 | - 更注重安全 - Waterfox 默认会开启一些额外的安全功能,如防护恶意网站的沙盒功能等。 24 | 25 | Waterfox 也是第一个在网络上广泛传播使用的 64 位浏览器之一,以其先进性、兼容性、性能与隐私著称,并很快获得了忠实的追随者。 26 | 27 | 现如今 WaterFox 水狐浏览器分为两类,Waterfox Current(新版)和 Waterfox Classic(旧版本,有安全隐患不推荐使用) 28 | 29 | ## 安装 30 | 31 | 官网请认准:```https://www.waterfox.net``` 32 | 33 | 【推荐使用】Waterfox 浏览器 Windows/MacOS/Linux 官方下载地址:点击前往 34 | 35 | 【不再维护,不推荐使用】Waterfox 浏览器 Classic 版本 Windows/MacOS/Linux 官方下载地址:点击前往 -------------------------------------------------------------------------------- /wiki/affiliate.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 我的好物推荐 4 | update: 2025-04-22 18:00 +0800 5 | description: 我的好物推荐 6 | not_show_copyright: true 7 | --- 8 | 9 | > 如果对我推荐的东西感觉不错,请使用下面的链接购买/访问,购物链接会获得一定的返佣,其他类型链接无返佣。非常感谢。 10 | 11 | ### 一、建站资源 12 | 13 | > 腾讯云/七牛云/阿里云 相关优惠 14 | 15 | #### 1.1 腾讯云 16 | 17 | 精选云产品专属特惠选购,大额代金券等你 【领取】 18 | 19 | #### 1.2 七牛云 20 | 21 | 对象存储新客好礼:永久免费 免费额度每月送,云存储用户可永久享用 【领取】 22 | 23 | #### 1.3 阿里云 24 | 25 | ECS节点2核2G3M固定带宽不限流量99元/年 【领取】 26 | 27 | 上云优惠聚集地,云小站专属代金券可叠加产品折扣使用 【领取】 28 | 29 | ### 二、投资理财 30 | 31 | > 且慢同路人 32 | 33 | #### 2.1 且慢 34 | 35 | 管好四笔钱,理财不复杂。放下焦虑,安心生活。 36 | 37 | 欢迎【加入同路人】 38 | 39 | ### 三、其他 40 | 41 | > 去广告 NEXTDNS 注册链接 42 | 43 | ### 3.1 NextDns 44 | 45 | 去广告 DNS 服务商,每月可免费查询 300,000 次,同时支持 DoH 、DoT 等方式。【注册】 -------------------------------------------------------------------------------- /notes/Linux/awk.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Linux 命令 - awk 4 | update: 2018-03-23 15:00 +0800 5 | --- 6 | 7 | awk 可以简单地格式化输出。 8 | 9 | awk 将输入的每一行先按制定的分隔符分隔开(如果有),然后根据是否符合 pattern 决定执行 commands 部分,pattern 可以是正则。 10 | 11 | ## 基本 12 | 13 | ```bash 14 | awk [option] 'BEGIN{ print "start" } pattern{ commands } END{ print "end" }' file 15 | awk [option] -f command_file_name file 16 | ``` 17 | 18 | commands 里的```print $1"+"$2 ``` 意味着输出分隔开的第一部分和第二部分,两者用加号连接。$0 是整个部分。 19 | 20 | ## 参数 21 | 22 | | 参数 | 含义 | 23 | | ------------- | ----------------------------------- | 24 | | -F | 指定分隔符 | 25 | | -f [filename] | 从文件中加载命令``` awk -f awk_file file``` | 26 | 27 | ## 内置变量 28 | 29 | | 名称 | 含义 | 30 | | -------- | ---------------- | 31 | | ARGC | 命令行参数个数 | 32 | | ARGV | 命令行参数排列 | 33 | | ENVIRON | 支持队列中系统环境变量的使用 | 34 | | FILENAME | awk处理的文件名 | 35 | | NF | 浏览记录的域的个数(理解为列数) | 36 | | NR | 已读的记录数(理解为行数) | 37 | 38 | ## 其他 39 | 40 | 同样有 C 语言里的 if、if/else、if/else if/else、while、do/while、for、break、continue 41 | 42 | ## 例子 43 | 44 | ### 计数 45 | 46 | ```bash 47 | awk 'BEGIN{cnt=0} {cnt++} END{print "count is "cnt}' filename 48 | ``` 49 | 50 | ### 遍历列表 51 | 52 | ```bash 53 | awk -F ':' 'BEGIN {count=0;} {name[count] = $1;count++;}; END{for (i = 0; i < NR; i++) print i, name[i]}' /etc/passwd 54 | ``` 55 | 56 | -------------------------------------------------------------------------------- /feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | 5 | 6 | 7 | {{ site.title | xml_escape }} 8 | {{ site.description | xml_escape }} 9 | {{ site.url }}{{ site.baseurl }}/ 10 | 11 | {{ site.time | date_to_rfc822 }} 12 | {{ site.time | date_to_rfc822 }} 13 | Jekyll v{{ jekyll.version }} 14 | {% for post in site.posts limit:10 %} 15 | 16 | {{ post.title | xml_escape }} 17 | {{ post.content | xml_escape }} 18 | {{ post.date | date_to_rfc822 }} 19 | {{ post.url | prepend: site.baseurl | prepend: site.url | append: "?utm_medium=rss"}} 20 | {{ post.url | prepend: site.baseurl | prepend: site.url | append: "?utm_medium=rss"}} 21 | {% for tag in post.tags %} 22 | {{ tag | xml_escape }} 23 | {% endfor %} 24 | {% for cat in post.categories %} 25 | {{ cat | xml_escape }} 26 | {% endfor %} 27 | 28 | {% endfor %} 29 | 30 | 31 | -------------------------------------------------------------------------------- /notes/Snippet/union-find.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 「代码片段」 union-find 4 | update: 2024-10-03 19:00 +0800 5 | --- 6 | 7 | 「代码片段」 union-find 8 | 9 | 并查集 10 | 11 | 特别是在需要快速判断两个元素是否属于同一个集合以及进行集合合并的场景中表现尤为出色 12 | 13 | 例题: leetcode 128 最长的连续子序列 14 | 15 | ```cpp 16 | #include 17 | 18 | using namespace std; 19 | 20 | class UnionFind 21 | { 22 | private: 23 | vector parent; 24 | 25 | public: 26 | UnionFind(int n) : parent(n) 27 | { 28 | for (int i = 0; i < n; ++i) 29 | { 30 | parent[i] = i; // 初始化时,每个元素都是其自己的父节点 31 | } 32 | } 33 | 34 | int find(int x) 35 | { 36 | while (x != parent[x]) 37 | { 38 | x = parent[x]; // 路径压缩 39 | } 40 | return x; 41 | } 42 | 43 | void unionFind(int x, int y) 44 | { 45 | int rootX = find(x); 46 | int rootY = find(y); 47 | 48 | if (rootX != rootY) 49 | { 50 | parent[rootX] = rootY; // 将x的根指向y的根 51 | } 52 | } 53 | }; 54 | 55 | int main() 56 | { 57 | int n = 10; // 假设我们有10个元素 58 | UnionFind uf(n); 59 | 60 | // 查找操作示例 61 | cout << "Find(5): " << uf.find(5) << endl; // =5 62 | 63 | // 合并操作示例 64 | uf.unionFind(1, 3); 65 | uf.unionFind(2, 4); 66 | uf.unionFind(3, 5); 67 | uf.unionFind(2, 5); 68 | for (int i = 1; i <= 5; i++) 69 | { 70 | cout << "Find(" << i << "): " << uf.find(i) << endl; // 都是5 71 | } 72 | 73 | return 0; 74 | } 75 | ``` -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: main() 4 | description: "欢迎来到 @ypingcn 的博客,计划分享技术/生活/投资等内容,相信万物逢时而美,Everything is good in its season" 5 | subtitle: "万物逢时而美 Everything is good in its season" 6 | not_show_copyright: true 7 | not_show_ad: true 8 | --- 9 | 10 | {% for post in paginator.posts %} 11 |
12 | 13 |

14 | {{ post.title }} 15 |

16 | {% if post.subtitle %} 17 |

18 | {{ post.subtitle }} 19 |

20 | {% endif %} 21 |
22 | {{ post.content | strip_html | truncate:200 }} 23 |
24 |
25 | 28 |
29 |
30 | {% endfor %} 31 | 32 | 33 | 34 | {% if paginator.total_pages > 1 %} 35 |
    36 | {% if paginator.previous_page %} 37 | 40 | {% endif %} 41 | {% if paginator.next_page %} 42 | 45 | {% endif %} 46 |
47 | {% endif %} 48 | -------------------------------------------------------------------------------- /_posts/2023-05-02-podcast.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Podcast 是新一代的 Blog?| 播客收听体验分享" 4 | subtitle: "播客收听体验分享" 5 | description: "播客收听体验分享" 6 | date: 2023-05-02 +0800 7 | update: 2023-05-02 21:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 生活 14 | - 分享 15 | --- 16 | 17 | > 闲暇听什么:我的私藏播客清单 18 | 19 | 我个人是从 2021 年起才开始用```AntennaPod```接触并收听播客节目的(希望大家能多多支持开源软件~),今年起也会慢慢使用```小宇宙APP```来收听其他苹果播客上搜不到的节目(```AntennaPod```主要是使用苹果播客的数据)作为辅助。收听时长也从 2021 年 11.9h 到 2022 年 54.7h 到今年刚过4个月就已经 13.2+33h 了,播客已经慢慢成为我通勤、在家打扫卫生、跑步锻炼等碎片时间里的一个好陪伴了。 20 | 21 | > Podcast 是新一代的 Blog? 22 | 23 | 不得不说,播客(Podcast)与博客(Blog)多少有点相似之处。对于创作者而言都是一个分享自己经历和感受的方式,发表自己的意见系统化的将自己的想法留存下来。而读者都可以从文字版的博客、音频版的播客里获取信息,“打破信息差”。音频所带来的“信息密度”远没有文字版的博客信息量大,所以说实话播客并不是一个获取信息最高效的方式,但也因音频声音高低、想象空间的特点,能给听众文字所不具备的陪伴感、临场感和生活气息。 24 | 25 | > 闲暇听什么:我的私藏播客清单 26 | 27 | 以下几个是我个人比较喜欢的播客节目—— 28 | 29 | 1.《来都来了》 30 | 31 | 丸籽和 Nico 两位女生用聊天的形式节目,轻松愉悦的聊天氛围。 32 | 33 | 2.《起朱楼宴宾客》 34 | 35 | 创作者是大卫翁,一个金融从业者记录时代和个人经验的分享。 36 | 37 | 3.《阿弥晚安》 38 | 39 | 节目最大的特点是播主狂阿弥的声音,以及每一期最后都会用一首歌曲或者轻音乐作为结束。 -------------------------------------------------------------------------------- /_posts/2023-09-09-designing-data-intensive-applications.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "数据密集型应用系统设计笔记" 4 | subtitle: "Designing Data-Intensive Applications" 5 | description: "Claude AI 关于《数据密集型应用系统设计》一书生成的目录和读书笔记" 6 | date: 2023-09-09 +0800 7 | update: 2023-09-09 22:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 技术 14 | - 后端 15 | - 微服务 16 | --- 17 | 18 | Powered by Claude AI 19 | 20 | 第一章 可靠性、可扩展性和可维护性 21 | 22 | 这三个指标是设计高质量数据密集型系统的基石 23 | 通过冗余机制提高可靠性,避免单点故障 24 | 按需扩展更经济高效,逐步水平拆分是常用方法 25 | 良好的抽象和松耦合设计提高可维护性 26 | 采用合理的缓存策略也很重要 27 | 28 | 第二章 数据模型和查询语言 29 | 30 | 关系型数据库的模式、约束以及SQL查询 31 | 各种NoSQL数据库数据模型,如键值、文档、列存储等 32 | 查询语言的特点、性能考量 33 | 不同的数据模型适合不同的场景 34 | 35 | 第三章 存储与检索 36 | 37 | 磁盘与内存数据存储结构优化 38 | 日志结构、LSM树等写入优化方法 39 | B树等索引结构及查询优化 40 | 数据压缩方法 41 | 42 | 第四章 编码与演化 43 | 44 | 版本控制、AB测试的重要性 45 | 向后兼容的处理 46 | 架构演进的模式 47 | 服务化与微服务架构优点 48 | 49 | 第五章 复制 50 | 51 | 为什么需要复制 52 | 同步与异步复制机制 53 | 一致性与可用性的平衡 54 | 脑裂问题及解决方案 55 | 56 | 第六章 分区 57 | 58 | 数据分区的目的和方法 59 | 分区键的选择 60 | 水平拆分的实现 61 | 动态分区调整 62 | 63 | 第七章 交易 64 | 65 | ACID特性及事务实现 66 | 两阶段提交协议 67 | PostgreSQL的可串行化 68 | NoSQL数据库的分布式事务 69 | 70 | 第八章 分布式系统的麻烦 71 | 72 | 处理延迟的方法 73 | 时钟同步与Globally Unique Identifiers 74 | 一致性问题与解决方案 75 | 幂等性设计的重要性 76 | 77 | 第九章 批处理 78 | 79 | 批处理的适用场景 80 | MapReduce、Spark等技术 81 | 流处理与微批处理的对比 82 | Lambda架构和Kappa架构 83 | 84 | 第十章 操作 85 | 86 | 基础设施管理和自动化 87 | 监控与告警系统设计 88 | 容量规划方法 89 | 数据系统部署和配置最佳实践 -------------------------------------------------------------------------------- /notes/Python/requests.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Python 之 requests 模块 4 | update: 2017-07-17 21:01 +0800 5 | --- 6 | 7 | ## 概述 8 | 9 | requests 模块,注意是最后有 s 的,注意拼写。 10 | 11 | ## 安装  12 | 13 | ```pip install requests``` 14 | 15 | ## 使用 16 | 17 | requests 支持GET POST DELETE等多种方法 18 | 19 | ```python 20 | r = requests.get('https://api.github.com/events') 21 | r = requests.get('https://api.github.com/user', auth=('user', 'pass')) 22 | r = requests.post('http://httpbin.org/post', data = {'key':'value'}) 23 | r = requests.put('http://httpbin.org/put', data = {'key':'value'}) 24 | r = requests.delete('http://httpbin.org/delete') 25 | r = requests.head('http://httpbin.org/get') 26 | r = requests.options('http://httpbin.org/get') 27 | 28 | r.status_code #返回状态码 29 | r.text #返回的内容,同 r.content 30 | r.url #返回最终的URL,重定向的返回重定向后的地址(allow_redirects=False设置禁止重定向) 31 | r.json() #如果返回值能整理成 json 格式,这个函数能将文本弄成相关的 Python 对象 32 | r.encoding='utf-8' #编码方式 33 | 34 | #自定义headers 35 | headers = {'user-agent': 'my-app/0.0.1'} 36 | r = requests.get(url, headers=headers) 37 | 38 | #设置time-out 单位是秒 39 | requests.get(url,timeout=0.01) 40 | 41 | #查看响应头 42 | r.headers 43 | r.headers.get('content-type') 44 | r.headers['content-type'] 45 | 46 | #访问cookies 47 | r.cookies['example_cookie_name'] 48 | 49 | #会话对象,能跨请求保留有关数据,或者提供请求的默认参数 50 | with requests.Session() as s: 51 | s.auth = ('user', 'pass') 52 | s.headers.update({'x-test': 'true'}) 53 | s.get(url) 54 | 55 | #使用代理 56 | proxies = { 57 | "http": "http://10.10.1.10:3128", 58 | "http": "http://user:pass@10.10.1.10:3128/", 59 | "https": "http://10.10.1.10:1080", 60 | } 61 | 62 | requests.get("http://example.org", proxies=proxies) 63 | ``` 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /special/song/jukjae-lullaby.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - Lullaby @Jukjae(郑宰阮) 4 | date: 2023-03-12 22:00 +0800 5 | update: 2023-03-12 22:00 +0800 6 | description: Lullaby @Jukjae(郑宰阮) - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | 摇篮曲 Lullaby @Jukjae(郑宰阮)[更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | jam deul ji mo than bam 17 | 잠들지 못한 밤 18 | 无法入眠的夜晚 19 | mo du ga jam deun bam 20 | 모두가 잠든 밤 21 | 所有人都入睡了的夜晚 22 | meo reo jin sa ram gwa 23 | 멀어진 사람과 24 | 渐行渐远的人 25 | ji na gan si gan 26 | 지나간 시간 27 | 还有过去的时间 28 | ij eot deon gi eok deul 29 | 잊었던 기억들 30 | 忘却的记忆 31 | ich yeo jin eol gul deul 32 | 잊혀진 얼굴들 33 | 忘却的脸庞 34 | tteo ol li da 35 | 떠올리다 36 | 今天也闭上眼睛 37 | on eul do nun gam a bon da 38 | 오늘도 눈 감아본다 39 | 再次回想起来 40 | jam i deul myeon 41 | 잠이 들면 42 | 睡着之后 43 | sa ra jil kka bwa 44 | 사라질까 봐 45 | 会消失吗 46 | bo kja pan ma eum e 47 | 복잡한 마음에 48 | 因为复杂的内心 49 | swip ge jam deul ji mo tha go 50 | 쉽게 잠들지 못하고 51 | 无法轻易入睡 52 | neo ha na myeon 53 | 너 하나면 54 | 只要一个你 55 | chung bun haess eot deon 56 | 충분했었던 57 | 就足够了 58 | su man eun bam eul dwi ro han chae 59 | 수많은 밤을 뒤로한 채 60 | 把无数个这样想的夜晚抛在脑后 61 | ha ru reul dan neun da 62 | 하루를 닫는다 63 | 结束了这一天 64 | 65 | 66 | nun eul gam eu myeon 67 | 눈을 감으면 68 | 闭上眼的话 69 | tteo o reu ni kka 70 | 떠오르니까 71 | 又会再次回想起 72 | bo go peun ma eu me 73 | 보고픈 마음에 74 | 怀着想念的心情 75 | kkeun nae bo nae ji mo tha go 76 | 끝내 보내지 못하고 77 | 始终不能释怀 78 | neo ha na myeon chung bun haess eot deon 79 | 너 하나면 충분했었던 80 | 只要一个你就足够了 81 | geu nar ui u rir dwi ro han chae 82 | 그날의 우릴 뒤로 한 채 83 | 把那时的我们抛在身后 84 | da si tto nun eur gam neun da 85 | 다시 또 눈을 감는다 86 | 再次闭上眼睛 87 | ha ru reul dan neun da 88 | 하루를 닫는다 89 | 结束了这一天 90 | ``` -------------------------------------------------------------------------------- /notes/Cpp/function-bind.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: std::function && std::bind 4 | update: 2017-10-30 21:32 +0800 5 | --- 6 | 7 | ## function 8 | 9 | 留意加``` -std=c++11 ``` 10 | 11 | ```c++ 12 | #include 13 | #include 14 | using namespace std; 15 | 16 | function< void (int) > func;// 括号里类型由未来使用时的类型(占位符的类型)决定 17 | void c(int val) 18 | { 19 | cout< 45 | #include 46 | #include 47 | using namespace std; 48 | 49 | void c(int a,int b) 50 | { 51 | cout< f3 = std::bind(&cpp::c, obj, 200, std::placeholders::_1); 77 | f3(100); 78 | function< void(char)> f4 = std::bind(&cpp::cc, obj, 200, std::placeholders::_1); 79 | f4('a'); 80 | function< void(int,char)> f5 = std::bind(&cpp::cc, obj, std::placeholders::_1, std::placeholders::_2); 81 | f5(666,'e'); 82 | 83 | return 0; 84 | } 85 | ``` 86 | 87 | -------------------------------------------------------------------------------- /_posts/2016-04-01-thanks.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "感谢" 4 | subtitle: "Thank you" 5 | description: "huangxuan.me 博客模板渲染效果" 6 | date: 2016-04-01 12:00:00 7 | update: 2022-08-01 10:00:00 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | --- 13 | 14 | > 不折腾博客页面,够用就好。 15 | 16 | 博客模板来自 huangxuan.me ,页面最下方也有版权信息。感谢 17 | 18 | 博文由 markdown 文件渲染而来,本篇博文暂时不更新。 19 | 20 | 渲染预览如下 21 | 22 | ------ 23 | 24 | ## 二级目录 25 | 26 | ### 三级目录 27 | 28 | #### 四级目录 29 | 30 | ##### 五级目录 31 | 32 | ###### 六级目录 33 | 34 | --- 35 | 36 | 37 | > 文字引用 38 | 39 | 40 | ``` 文字引用 ``` 41 | 42 | 43 | 文字 **加粗** 44 | 45 | 46 | 文字 *斜体* 47 | 48 | 文字 ~~删除~~ 49 | 50 | --- 51 | 52 | ```c++ 53 | // 代码块(语法高亮) 54 | #include 55 | int main() 56 | { 57 | std::cout<<"hello coding page."< Yes 不可以再次点击选中 98 | 99 | 100 | No 可以再次点击选中 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /notes/Redis/redis-in-cpp.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: C++ 使用 redis 4 | update: 2017-09-17 15:43 +0800 5 | --- 6 | 7 | > 参考 [hiredis/README.md at master · redis/hiredis · GitHub](https://github.com/redis/hiredis/blob/master/README.md) 8 | 9 | 10 | C++ 中使用 redis 可以用 hiredis 完成,但是 hiredis 是用 C 语言写的,使用起来还是要做一点改变,而不只是加个头文件。 11 | 12 | ## 下载 hiredis 13 | 14 | ``` git clone https://github.com/redis/hiredis``` 15 | 16 | ## 编译 hiredis 17 | 18 | ``` make ``` 19 | 20 | 文件夹将会有``` libhiredis.so ``` 21 | 22 | ## 准备 C++ 文件 23 | 24 | 在 hiredis 的同级目录下新建``` test.cpp ```,内容如下 25 | 26 | ```c++ 27 | extern "C" 28 | { 29 | #include "hiredis/hiredis.h" 30 | } 31 | 32 | #include 33 | int main(int argc, char const *argv[]) { 34 | redisContext* redis = redisConnect("127.0.0.1", 6379); 35 | // 用来连接redis数据库,参数为数据库的ip地址和端口,一般redis数据库的端口为6379。类似的函数有redisContext* redisConnectWithTimeout(const char *ip, int port, timeval tv) 36 | if( redis == NULL || redis->err ) //当 redis->err 为真时,redis->errstr 显示具体的错误原因 37 | { 38 | std::cout << redis->errstr << '\n'; 39 | } 40 | const char * command = "set test yes"; 41 | redisReply * reply = (redisReply*) redisCommand(redis, command); // 返回值为void*,强制转换成为redisReply类型 42 | if(reply == NULL) 43 | { 44 | std::cout << "error" << '\n'; 45 | redisFree(redis); 46 | } 47 | if(reply->type == REDIS_REPLY_STATUS) // REDIS_REPLY_STATUS 返回状态,可以用 strcasecmp(reply->str,"OK") 判断是否正确执行 48 | { 49 | std::cout << "redis reply is : " << reply->str << '\n'; 50 | } 51 | std::cout << "test finish" << '\n'; 52 | freeReplyObject(reply); // 释放 reply 占用的内存 53 | redisFree(redis); // 断开连接 54 | return 0; 55 | } 56 | ``` 57 | 留意最上面的 58 | 59 | ``` extern "C" ``` 部分即可 60 | 61 | ## 编译 C++ 程序 62 | 63 | ``` g++ test.cpp hiredis/libhiredis.so ``` -------------------------------------------------------------------------------- /special/song/joy-introduce-me-a-good-person.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - 有不错的人就介绍下吧(Introduce me a good person)《机智的医生生活》OST 4 | date: 2024-07-17 00:00 +0800 5 | update: 2024-07-17 00:00 +0800 6 | description: 좋은 사람 있으면 소개시켜줘 (有不错的人就介绍下吧/Introduce me a good person)《机智的医生生活》OST - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | 좋은 사람 있으면 소개시켜줘 (有不错的人就介绍下吧/Introduce me a good person)《机智的医生生活》OST [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | joh eun/sa ram/iss eu myeon/so gae si kyeo jwo 17 | 좋은 사람 있으면 소개시켜줘 18 | 若有好的人就介绍给我吧 19 | 20 | ttae ro neun/mul cheo reom/ttae ro neun/bul cheo reom 21 | 때로는 물처럼 때로는 불처럼 22 | 要是时而像水 时而像火 23 | 24 | jin sim eu ro/na man eur/sa rang har/su/it neun 25 | 진심으로 나만을 사랑할 수 있는 26 | 能够用真心只爱我一个的 27 | 28 | seong suk ha go/seong sil han/sa ram i ra myeon/joh gess eo 29 | 성숙하고 성실한 사람이라면 좋겠어 30 | 成熟而又忠诚的人就好了 31 | 32 | joh eun/sa ram/iss eu myeon/so gae si kyeo jwo 33 | 좋은 사람 있으면 소개시켜줘 34 | 若有好的人就介绍给我吧 35 | 36 | sa rang e do/yeon seub eun/it neun/geo gi e 37 | 사랑에도 연습은 있는 거기에 38 | 要是在爱里有过练习的 39 | 40 | a ju/jo geu man/ir e do/sin gyeong eur/sseo ju neun 41 | 아주 조그만 일에도 신경을 써주는 42 | 连小小事情都会为我操心的 43 | 44 | sa rang/gyeong heom i/manh eun/sa ram i ra myeon/joh gess eo 45 | 사랑 경험이 많은 사람이라면 좋겠어 46 | 恋爱经验丰富的人就好了 47 | 48 | han beon jjeum eun/sir yeon e/ur eoss eot deon 49 | 한번쯤은 실연에 울었었던 50 | 曾为一次的失恋哭泣 51 | 52 | nun i/go un/sa ram/pum e/an gyeo seo 53 | 눈이 고운 사람 품에 안겨서 54 | 想要依偎在拥有美丽双眼的人的怀抱 55 | 56 | tteu geop ge/wi ro bat go/sip eo 57 | 뜨겁게 위로받고 싶어 58 | 得到那滚烫的安慰 59 | 60 | hon ja im e/ji chyeot deon/nae/mo deun geol 61 | 혼자임에 지쳤던 내 모든걸 62 | 多想厌倦孤身的我的一切 63 | 64 | son i/go un/sa ram e ge/mat gin/chae 65 | 손이 고운 사람에게 맡긴 채 66 | 能够交给拥有美丽双手的人 67 | 68 | oe ro um eur/ij eur/su/it da myeon 69 | 외로움을 잊을 수 있다면 70 | 让我能够忘掉那寂寞 71 | 72 | ``` -------------------------------------------------------------------------------- /_posts/2022-01-30-cache-in-microservice.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "使用本地缓存优化微服务" 4 | subtitle: "Cache in microservice" 5 | description: "微服务相较于整体式架构而言具有易拓展的特点,可以使用本地缓存来优化不经常变动的结果避免走网络请求,这种优化是十分显著的" 6 | date: 2022-01-30 +0800 7 | update: 2022-08-09 11:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 技术 14 | - 后端 15 | - 微服务 16 | --- 17 | 18 | ## 一 背景 19 | 20 | 微服务相较于整体式架构而言具有易拓展、敏捷开发、在各个小型独立团队之间职责明确的特点。相关接口在日常维护过程中,根据业务发展情况进行优化是一项必要且成效明显的工作。 21 | 22 | 由于业务逻辑中会经常进行信息查询(例如查询用户信息/获取活动配置等),这部分信息的变动并不是很频繁,如果每次都需要走 RPC 调用查询的话,就会多额外的网络请求和资源消耗。特别是在有突发流量的情况下,上游接口调用的暴增会向下传递给下游服务,用户信息等基础信息的查询量会因此而暴增。如果用户信息服务出现瓶颈,上游服务都会不同程度地受到影响,从而降低用户体验甚至导致事故。使用网络调用代替本地调用在查询这种相对稳定不变化的结果无疑是一种资源的浪费。 23 | 24 | 优化可以从这种额外的网络请求和资源消耗做起,使用本地内存缓存取代远程查询进行优化,这种缓存对服务的优化效果是十分显著的。 25 | 26 | ## 二 优化方式 27 | 28 | ### 2.1 在用户接入侧进行缓存 29 | 30 | 在实际业务中,有部分请求都是在获取配置等公用信息。这种对一致性容忍度比较高的接口结果可以在用户接入点侧进行缓存,起到类似于动态 CDN 的效果。缓存需要一个唯一 key 来对不同用户进行区分从而进行缓存,这种唯一 key 可以从多个接口参数值获取,根据一定算法得出。例如地区维度的接口可以将地区代码设置成唯一 key ,相同地区的请求获取相同的配置。这种做法能够得到 20%-80% 的缓存命中率,优化削峰填谷效果明显。 31 | 32 | 有一个额外的问题是,从接口参数获取唯一 key 的做法无法兼容到需要服务端 ABTest 的场景。 这种情况需要将缓存逻辑继续后置给业务服务处理,而不是在用户接入侧缓存。 33 | 34 | ### 2.2 缓存其他微服务接口的结果 35 | 36 | 可以在内存中缓存相关的接口结果。例如用户信息这种极少变化的接口结果就可以用 LRU 内存缓存下来,如果业务场景可以接受的话,缓存有效期时间可以设置 5 分钟甚至更长时间。而排行榜这种对有效性要求比较高的场景下,设置秒级的有效期更能符合业务需求。 37 | 38 | 还可以在这种缓存的逻辑下增加降级熔断逻辑,避免业务异常流量继续向下游传递。 39 | 40 | ## 三 实现细节 41 | 42 | ### 3.1 缓存雪崩、击穿的问题 43 | 44 | 本地内存缓存与下游微服务结果之间,跟数据库(如 MySQL )与分布式缓存工具(如 Redis )搭配使用一样,都会有缓存过期带来的雪崩、击穿问题。 45 | 46 | 雪崩问题可以在实现细节里增加一个额外的随机过期时间,将数据过期的时间尽可能地错开避免集中向下游服务请求导致雪崩。 47 | 48 | 而击穿问题则是因为热点数据的过期导致的,这种可以使用```singleFlight```合并查询等方法,将并发而来的多个同类型的请求合并成一个,只向下游发送一次请求来复用结果。 49 | 50 | ### 3.2 一致性问题 51 | 52 | 可以使用内存进行缓存的时候,只能是对一致性要求不高、数据变动少的场景。因为微服务架构下,多节点之间的缓存同步与刷新是一种事倍功半的工作,只能追求最终一致性。 53 | 54 | 应用场景简化了一致性的要求,所以只需要做到 ```淘汰缓存``` + ```先查询再异步更新缓存``` 的方法。 55 | -------------------------------------------------------------------------------- /wiki/privacy.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 隐私政策 4 | update: 2024-12-26 09:00 +0800 5 | description: 隐私政策 6 | not_show_copyright: true 7 | not_show_ad: true 8 | --- 9 | 10 | > 最后更新时间:2024 年 12 月 26 日 11 | 12 | > 生效时间:2024 年 12 月 26 日 13 | 14 | 欢迎您访问本站! 15 | 16 | 本站 (包括网站等产品提供的服务,以下简称“产品和服务”)是由 ypingcn (以下简称“我们”)开发并运营的。 确保用户的数据安全和隐私保护是我们的首要任务, 本隐私政策载明了您访问和使用我们的产品和服务时所收集的数据及其处理方式。 17 | 18 | 请您在继续使用我们的产品前务必认真仔细阅读并确认充分理解本隐私政策全部规则和要点, 一旦您选择使用,即视为您同意本隐私政策的全部内容,同意我们按其收集和使用您的相关信息。 如您在在阅读过程中,对本政策有任何疑问,可请通过```support#ypingcn.com```(请将#替换成@) 与我们取得联系。 如您不同意相关协议或其中的任何条款的,您应停止使用我们的产品和服务。 19 | 20 | 本隐私政策帮助您了解以下内容: 21 | 22 | ## 一、我们如何使用 Cookies 和其他追踪技术 23 | 24 | 为确保产品正常运转,我们会在您的计算机或移动设备上存储名为 Cookies 的小数据文件。 Cookies 通常包含标识符、产品名称以及一些号码和字符。 借助于 Cookies,我们能够存储您的访问情况等数据,并用以判断本站内容, 提升服务和产品质量及优化用户体验。 25 | 26 | 我们出于不同的目的使用各种 Cookies,包括:严格必要型 Cookies、性能 Cookies、营销 Cookies 和功能 Cookies。 某些 Cookies 可能由外部第三方提供,以向我们的产品提供其它功能。 我们不会将 Cookies 用于本政策所述目的之外的任何用途。您可根据自己的偏好管理或删除 Cookies。 您可以清除计算机上或手机中保存的所有 Cookies,大部分网络浏览器都设有阻止或禁用 Cookies 的功能, 您可对浏览器进行配置,或者借由第三方插件工具实现拦截。阻止或禁用 Cookies 功能后,可能影响您使用或不能充分使用我们的产品和服务。 27 | 28 | ## 二、我们如何统计访问记录 29 | 30 | 我们将记录用户发起的所有请求的时间、来源 IP、来源端口号、代理服务器转发 IP (X-Forwarded-For)、请求 HTTP 头 (包括请求方法、请求地址、请求协议版本)、回复代码、引荐页面 URL、用户代理名称 (User Agent)、回复字节数。此项访问记录的保存时间不小于 14 天。 31 | 32 | ## 三、第三方服务使用情况 33 | 34 | 为了不断改进和迭代我们的产品,持续地向用户提供高质量的服务,如上述功能所述,我们在使用本服务期间,使用了第三方服务来改善我们的产品或服务。这些服务包括包括: 35 | 36 | 51.la: [https://51.la/about/privacy/](https://51.la/about/privacy/) 37 | 38 | Cloudflare: [https://www.cloudflare.com/privacypolicy/](https://www.cloudflare.com/privacypolicy/) 39 | 40 | Google Adsense: [https://policies.google.com/privacy?hl=zh-CN](https://policies.google.com/privacy?hl=zh-CN) 41 | 42 | 浩客XM: [https://howxm.com/privacy](https://howxm.com/privacy) 43 | 44 | ## 四、变更 45 | 46 | 我们可能适时修订本隐私政策内容。 47 | 48 | 如该等变更会导致您在本隐私政策项下权利的实质减损,我们将在变更生效前,通过在页面显著位置提示。特定产品和服务的隐私保护指引有关个人信息的处理目的、处理方式和处理的个人信息种类发生变更的,会重新取得您的同意。 49 | -------------------------------------------------------------------------------- /notes/Vim/config.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Vim 配置与快捷键 4 | date: 2017-07-14 15:30 +0800 5 | update: 2022-03-11 20:00 +0800 6 | --- 7 | 8 | > Vim 配置(显示行号、取消显示行号、高亮搜索结果、语法高亮、自动缩进、制表符改为空格等) 9 | 10 | 11 | ## 配置 12 | 13 | 这几个都是对应效果的配置,编辑 ```~/.vimrc``` (或者检查下 ```/etc/vim/vimrc``` 或 ```/etc/vimrc``` )文件并保存后,后续打开的文件即可生效。更多进阶级配置可参见:https://github.com/yangyangwithgnu/use_vim_as_ide ,该处详细介绍了如何将 vim 配置成 IDE 使用(一般人可能用不到)。 14 | 15 | ```vim 16 | set nu 17 | set nonu 18 | set hlsearch 19 | syntax enable 20 | filetype indent on 21 | set expandtab 22 | set tabstop=4 23 | set shiftwidth=4 24 | ``` 25 | 26 | 参数对应效果解释 27 | 28 | - 显示行号 set nu 29 | - 取消显示行号 set nonu 30 | - 高亮搜索结果 set hlsearch 31 | - 语法高亮 syntax enable 32 | - 不同语言的自适应缩进 filetype indent on 33 | - 将制表符拓展为空格 set expandtab 34 | - 编辑时制表符所占的空格数 set tabstop=4 35 | - 格式化制表符所占的空格数 set shiftwidth=4 36 | 37 | ------ 38 | 39 | ## 操作快捷键 40 | 41 | 几个常用的操作快捷键,如果对基础的操作不熟悉,可以 https://vim-adventures.com/ 上加以练习,这个网站将 vim 操作融入游戏中,寓教于乐。 42 | 43 | - ```yy``` 复制一行 44 | - ```p``` 粘贴 45 | - ```x``` 剪切 46 | - ```xp``` 交换两个字符 47 | - ```ddp``` 交换相邻两行 48 | - ```w``` 下一个单词头(包含标点符号) ```W``` 下一个单词头(不包含标点符号) 49 | - ```e```下一个单词尾(包含标点符号) ```E``` 下一个单词尾(不包含标点符号) 50 | - ```u```撤销上一步 51 | - ```.```重复操作 52 | 53 | - ```Ctrl + F``` 向前滚一整屏 54 | - ```Ctrl + B``` 向后滚一整屏 55 | - ```H``` 屏幕顶端的行 56 | - ```M``` 屏幕中央的行 57 | - ```L``` 屏幕底端的行 58 | 59 | - ```/pattern```往前搜索 pattern 词 60 | - ```?pattern```往后搜索 pattern 词 61 | 62 | - ```nG``` 转到第n行 不带数字即为最后一行 63 | - ```n,ms/old/new/ge(c)``` n到m行的old全部替换成new(gec为替换前确认),不带行数即为当前行 64 | - ```r !command``` 将command的结果插入编辑器 65 | 66 | - ```vim -o3 a.txt b.txt``` 打开(3个水平)多窗口 67 | - ```:split ```水平多窗口 ```:vsplit``` 竖直多窗口 68 | - ```tabnew filename``` 新建分页并编辑文件 69 | - ```tabclose``` 关闭当前分页 70 | - ```tabonly``` 关闭其他分页 71 | - ```tabp```切换到上一个分页 72 | - ```tabn``` 切换到下一个分页 73 | -------------------------------------------------------------------------------- /less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | 3 | .transition-all() { 4 | -webkit-transition: all 0.5s; 5 | -moz-transition: all 0.5s; 6 | transition: all 0.5s; 7 | } 8 | 9 | .background-cover() { 10 | -webkit-background-size: cover; 11 | -moz-background-size: cover; 12 | background-size: cover; 13 | -o-background-size: cover; 14 | } 15 | 16 | .serif() { 17 | font-family: 'Lora', 'Times New Roman', serif; 18 | } 19 | 20 | .sans-serif () { 21 | /* Hux learn from 22 | * TypeIsBeautiful, 23 | * [This Post](http://zhuanlan.zhihu.com/ibuick/20186806) etc. 24 | */ 25 | font-family: 26 | // System Font // https://www.webkit.org/blog/3709/using-the-system-font-in-web-content/ 27 | -apple-system, // OSX ^10.11 & iOS ^9 San Francisco & 苹方 for Safari 28 | BlinkMacSystemFont, // OSX ^10.11 & iOS ^9 San Francisco & 苹方 for Blink 29 | 30 | // English First 31 | "Helvetica Neue", // OSX 32 | "Arial", // Win "Helvetica" 33 | //" Segoe UI", // Win ^8 34 | 35 | // Chinese Fallback 36 | "PingFang SC", // OSX ^10.11 & iOS ^9 苹方(华康信凭黑) 37 | "Hiragino Sans GB", // OSX ^10.6 冬青黑体 38 | "STHeiti", // OSX <10.6 & iOS <9 华文黑体 39 | "Microsoft YaHei", // Win 微软雅黑 40 | "Microsoft JhengHei", // Win 微软正黑 41 | "Source Han Sans SC", // SourceHan - begin 思源黑体 42 | "Noto Sans CJK SC", 43 | "Source Han Sans CN", 44 | "Noto Sans SC", 45 | "Source Han Sans TC", 46 | "Noto Sans CJK TC", // SourceHan - end 47 | "WenQuanYi Micro Hei", // Linux 文泉驿微米黑 48 | SimSun, // Win old 中易宋体 49 | sans-serif; // System Fallback 50 | 51 | line-height: 1.7; 52 | } 53 | -------------------------------------------------------------------------------- /_posts/2017-11-21-firefox-quantum-and-related-discussion.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Firefox Quantum 引发的思考" 4 | subtitle: "Firefox Quantum and related discussion" 5 | description: "Firefox Quantum 在 2017 年 11 月 14 日发布,最大的变化是自家的 Rust 编写 CSS 引擎,扩展仅支持 WebExtension 格式。明显感受到的打开网站的速度有所提高" 6 | date: 2017-11-21 +0800 7 | update: 2022-10-16 00:20 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 火狐 14 | - 讨论 15 | --- 16 | 17 | Firefox 57 (Firefox Quantum)版在2017年11月14日发布,这个版本最大的变化在于用了自家的 Rust 编写 CSS 引擎,扩展仅支持 WebExtension 格式。最近几天的使用下来,能明显感受到的变化在于速度,打开网站的速度有所提高。偶尔对于不经常访问的网站会在 HTTPS 握手部分卡住,占用较长的一段时间。至于拓展方面,影响倒不是很大,能有广告过滤(uBlock Origin)、切换 UA(User-Agent Switcher )、切换代理(SmartProxy)三类拓展就足够了,主题倒不是什么核心需求,不改也罢。 18 | 19 | 新版本出来的时候在一个群聊里发了张图片和链接,算是一种推广。一如既往的安静,反倒是一句“火狐给了你多少钱”有了以下片段的想法。 20 | 21 | 小学六年级开始接触电脑(现在看来这并不是个多早的时间了),两年后家里也有了自己的台式机,那时候用的浏览器还是搜狗浏览器,冲着各种网页加速的宣传用的,效果也算明显。其他浏览器也断断续续地用过一段时间,但终究不喜欢那些所谓体贴的功能,可能是我对于这些功能的需求没有那么强烈吧。个人对于浏览器有几个小要求,一是新建标签页或者启动页不要带新闻流或者推广(所以 UC 之类的是不用的,手机也是一样的要求),二是默认安装后的链接不要带有各类推广小尾巴(自从发现搜狗浏览器访问 hao123 之类的网站会跳转到自家的网站导航之后就再也不用了)。这样看来只有 Chrome 和 Firefox比较符合了(Firefox 国内版也被加了例如微信、二维码的功能,所以现在用 Firefox 还是习惯到 Mozilla 官网或者 FTP 上下载),最终现在用 Firefox 更多是因为同步功能。Firefox 和其他浏览器一样都带有同步功能,同步浏览器设置、拓展、书签等,Chrome 也有同步功能但是不能直接访问。 22 | 23 | 还有一点的是 Chrome 背后是做搜索起家的 Google ,一家擅长收集数据的公司和一家非盈利组织,在浏览器的选择上,我选择后者。现在如果为了网络上的便利,个人总是要失去点什么,但是可以避免无谓的损失。 24 | 25 | 同时 Firefox 是开源产品,对于开源产品总想多支持一下。个人开源我想更多为了获得其他人的认可,公司组织层面开源是对自家产品的信心。 26 | 27 | 对于 Mozilla 的宣传,至少在对 Firefox 浏览器的宣传上,我是不太同意的。Mozilla 的宣传总有点政治正确的味道。之前有段时间在下载页显示“最后一款独立的浏览器”,这句话我觉得对于追求实用性的用户来说并没有多大的吸引力。 28 | 29 | Firefox 现在还只是新版本的第一代,还有着很多各种各样的问题,祝愿能变得越来越好用,份额再多一点吧。 30 | 31 | > 一些断断续续的想法 -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | # Site settings 2 | title: ypingcn 3 | SEOTitle: ypingcn's blog | 相信万物逢时而美 4 | header-img: img/home-bg-z2XLF8.webp 5 | description: "这里是 @ypingcn 的个人博客,相信万物逢时而美。期待与你发现更大的世界。" 6 | keyword: "ypingcn, ypingcn's blog, @ypingcn 的博客, 后端开发, 微服务开发, 技术分享, 火狐资源, 火狐插件, 上网隐私保护,基金投资, 消费医疗科技中概股基金" 7 | url: "https://blog.ypingcn.com" # your host, for absolute URL 8 | baseurl: "" # for example, '/blog' if your blog hosted on 'host/blog' 9 | staticurl: "https://ypingcn.com" # static resource url 10 | 11 | # SNS settings 12 | RSS: true 13 | #weibo_username: 14 | #zhihu_username: 15 | #github_username: 16 | #twitter_username: 17 | #facebook_username: 18 | #linkedin_username: 19 | 20 | # Build settings 21 | # from 2016, 'pygments' is unsupported on GitHub Pages. Use 'rouge' for highlighting instead. 22 | highlighter: rouge 23 | permalink: pretty 24 | paginate: 10 25 | exclude: ["less","node_modules","Gruntfile.js","package.json","README.md","README.zh.md"] 26 | anchorjs: true # if you want to customize anchor. check out line:181 of `post.html` 27 | 28 | # Gems 29 | # from PR#40, to support local preview for Jekyll 3.0 30 | gems: [jekyll-paginate] 31 | plugins: [jekyll-paginate] 32 | 33 | # Markdown settings 34 | # replace redcarpet to kramdown, 35 | # although redcarpet can auto highlight code, the lack of header-id make the catalog impossible, so I switch to kramdown 36 | # document: http://jekyllrb.com/docs/configuration/#kramdown 37 | markdown: kramdown 38 | kramdown: 39 | input: GFM # use Github Flavored Markdown !important 40 | 41 | # Sidebar settings 42 | sidebar: true # whether or not using Sidebar. 43 | sidebar-about-description: "万物逢时而美" 44 | sidebar-avatar: /img/my/ypingcn.png # use absolute URL, seeing it's used in both `/` and `/about/` 45 | 46 | # Progressive Web Apps 47 | chrome-tab-theme-color: "#000000" 48 | service-worker: false 49 | -------------------------------------------------------------------------------- /notes/index-generate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | 4 | import os,re 5 | from datetime import datetime 6 | 7 | print("--- --- begin --- ---") 8 | 9 | header = [ 10 | "---", 11 | "layout: page", 12 | "title: 笔记", 13 | "update: "+datetime.now().strftime("%y-%m-%d 12:00")+" +0800", 14 | "not_show_copyright: true", 15 | "not_show_ad: true", 16 | "---", 17 | "", 18 | "个人整理自用的技术向笔记文章,比较零碎所以不用博文的形式更新", 19 | "" 20 | ] 21 | 22 | dir = [x for x in os.listdir(".") if os.path.isdir(x)] 23 | index = open("index.md", "w") 24 | 25 | for x in header: 26 | index.write(x + "\n") 27 | 28 | for x in sorted(dir): 29 | index.write("## " + x + "\n\n") 30 | os.chdir(x) 31 | file = os.listdir(".") 32 | for filename in sorted(file): 33 | if not filename.endswith(".md"): 34 | continue 35 | update = re.compile("update: (.*)") 36 | title = re.compile("title: (.*)") 37 | update_str = "" 38 | title_str = "" 39 | for line in open(filename, "r"): 40 | update_result = update.findall(line) 41 | title_result = title.findall(line) 42 | if not title_result and not update_result: 43 | continue 44 | if title_result: 45 | title_str = title_result[0] 46 | if update_result: 47 | update_str = update_result[0] 48 | 49 | if update_str != "" and title_str != "": 50 | print(update_str, " ==> ", title_str) 51 | index.write( 52 | '《' 57 | + title_str 58 | + "》 (最近更新:" 59 | + update_str 60 | + ")\n\n" 61 | ) 62 | os.chdir("..") 63 | 64 | print("--- --- done --- ---") 65 | -------------------------------------------------------------------------------- /special/firefox/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Firefox 火狐浏览器专题资源汇总 4 | date: 2022-03-30 20:43 +0800 5 | update: 2025-08-17 15:00 +0800 6 | description: 火狐浏览器是一款免费的开源互联网浏览器,拥有丰富的扩展功能。与其他浏览器相比,它更注重隐私保护和用户体验。并且拥有多个二次开发的版本极大丰富了使用体验。 7 | --- 8 | 9 | Firefox 火狐浏览器是一款免费的开源互联网浏览器,拥有丰富的扩展功能。与其他浏览器相比,它更注重隐私保护和用户体验。 10 | 11 | 1. 火狐浏览器支持多种操作系统,并提供了大量可自定义的选项以满足个人需求。您可以根据自己的偏好调整字体、主题、标签页布局等。 12 | 13 | 2. 火狐浏览器具有出色的网页加载速度和性能优化,在访问复杂的网站时也能保持良好的稳定性和响应速度。 14 | 15 | 3. 火狐浏览器还内置了强大的隐私保护功能,例如跟踪保护、隐私浏览模式等,可以帮助您在网络上保护个人信息安全。 16 | 17 | 4. 火狐浏览器还提供了丰富的扩展程序,包括广告拦截器、密码管理器、夜间模式等,可以帮助您更好地管理和定制您的浏览体验。 18 | 19 | 总之,火狐浏览器是一款专注于用户隐私与体验的高性能浏览器,同时提供了丰富的功能和扩展程序。如果您在寻找一个快速、稳定、安全又可定制的浏览器,那么火狐浏览器是一个不错的选择。 20 | 21 | 下面是汇总整理 Firefox 火狐浏览器相关资源 ──── 22 | 23 | - Floorp/ Librewolf / Waterfox / Zen 浏览器都是基于 Firefox 火狐浏览器二次开发定制的版本,各具特色。 24 | 25 | # @Firefox 火狐浏览器插件推荐 26 | 27 | # @Firefox 火狐浏览器设置安全 DNS (DoH) ~ 28 | 29 | # @Firefox 火狐浏览器【国际版】与【谋智中国版】的区别 30 | 31 | # @Floorp 浏览器 ~ 32 | 33 | # @Librewolf 浏览器 ~ 34 | 35 | # @Waterfox 浏览器 ~ 36 | 37 | # @Zen 浏览器 ~ 38 | 39 | # @Mercury 浏览器 ~ 40 | 41 | # @Firefox 火狐浏览器资源汇总 42 | 43 | # @Firefox 火狐浏览器主题美化 ~ 44 | 45 | # @Firefox Trains,一个查看 Firefox 火狐浏览器不同渠道最新版本的网站 ~ 46 | 47 | # @Firefox 火狐浏览器版本差异 48 | 49 | # @Firefox 火狐浏览器相关网站汇总 ~ -------------------------------------------------------------------------------- /special/song/iu-drama.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - Drama @IU 4 | date: 2022-06-03 19:34 +0800 5 | update: 2022-07-07 10:30 +0800 6 | description: Drama @IU - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | Drama @IU [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | na do han ddae nen k i ye so-ner cab go 17 | 나도 한때는 그이의 손을 잡고 18 | 我也曾紧握他的手 19 | 20 | nae ga on se sang zu in gong i twen ded 21 | 내가 온 세상 주인공이 된 듯 22 | 仿佛我就是全世界的主角 23 | 24 | ggod song i ye ggon ni-pa na ha na gga ji 25 | 꽃송이의 꽃잎 하나하나까지 26 | 连花朵的每一瓣都 27 | 28 | mo du nar wi hae pi eo nad ji 29 | 모두 날 위해 피어났지 30 | 是为我而绽放的 31 | 32 | or lim pig dae lo ddug seom you weon ji 33 | 올림픽대로 뚝섬 유원지 34 | 奥林匹克大路 纛岛 游乐园 35 | 36 | seo cun kor mog gor mong nye bben xig dang 37 | 서촌 골목골목 예쁜 식당 38 | 西村 大街小巷 漂亮的饭店 39 | 40 | na ler hwi ceong geo li ge man den 41 | 나를 휘청거리게 만든 42 | 让我摇摇晃晃 43 | 44 | cu og ga-ten tae sa der 45 | 주옥같은 대사들 46 | 珠玉般的台词 47 | 48 | ta xi nu gun ga sa lang har su i-sser gga 49 | 다시 누군가 사랑할 수 있을까 50 | 还能重新爱上某个人吗 51 | 52 | ye bbu da nen mar d-ler su i-sser gga 53 | 예쁘다는 말 들을 수 있을까 54 | 还能再听到动人的话语吗 55 | 56 | ha lu ta-na lu man ki hwe ga on da myeon 57 | 하루 단 하루만 기회가 온다면 58 | 只要有一天 有机会的话 59 | 60 | cu-g-li-mer ta hae pin na li 61 | 죽을힘을 다해 빛나리 62 | 我会拼尽全力 绽放光芒 63 | 64 | eon ze bu teon ga keb gyeo-ka ge 65 | 언제부턴가 급격하게 66 | 不知从何时起 67 | 68 | tan zo lo pa ggwi deon pae gyeong eu-mag 69 | 단조로 바뀌던 배경음악 70 | 背景音乐变换得如此单调 71 | 72 | co myeong i ggeo jin se t zang e 73 | 조명이 꺼진 세트장에 74 | 在熄了灯的摄影棚内 75 | 76 | hon za nam gyeo jin na nen 77 | 혼자 남겨진 나는 78 | 独自留下的我 79 | 80 | ta-nyeo-ger ma-ten k nyang pyeong beo-man yeo za 81 | 단역을 맡은 그냥 평범한 여자 82 | 只是一个扮演配角的普通女子 83 | 84 | ggod do ha ner do han gang do keo jin mar 85 | 꽃도 하늘도 한강도 거짓말 86 | 花啊 天空啊 汉江啊都是谎言 87 | 88 | na e t la ma nen ddo i lyeo ke ggen na 89 | 나의 드라마는 또 이렇게 끝나 90 | 我的剧又就此结束 91 | 92 | na wan nen ji zo ca mo l ge 93 | 나왔는지조차 모르게 94 | 都不知道是否出场了 95 | 96 | ggen nan nen ji zo ca mo l ge 97 | 끝났는지조차 모르게 98 | 也不知是否剧终了 99 | ``` -------------------------------------------------------------------------------- /notes/Cpp/gdb.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: GDB 调试 4 | update: 2017-09-25 19:18 +0800 5 | --- 6 | 7 | 要先加``` -g ```生成 可执行文件,再``` gdb a.out ``` 8 | 9 | | 命令 | 描述 | 10 | | :------------------------ | :-------------------------------- | 11 | | start | 开始,在main()第一行语句等待 | 12 | | next (n) | 下一语句 | 13 | | step (s) | 下一语句,若是函数则进入函数 | 14 | | print (p) | 打印表达式的值,或者修改(set var) | 15 | | backtrace(bt) | 查看各级函数调用 | 16 | | list (l) | 列出源代码 | 17 | | list [num] | 从num行开始列出源代码,默认显示10行 | 18 | | list [function-name] | 从 function-name 开始列出源代码 | 19 | | quit (q) | 退出 | 20 | | info (i) locals | 查看局部变量的值 | 21 | | finish | 运行到当前函数返回 | 22 | | display | 显示某个变量的值 | 23 | | undisplay [num] | 取消显示 | 24 | | break (b) [num] | 设置断点 | 25 | | break [function-name] | 在函数开头设置断点 | 26 | | break ... if ... | 条件断点 | 27 | | continue (c) | 连续运行程序 | 28 | | delete breakpoints [num] | 删除断点 | 29 | | disable breakpoints [num] | 禁用断点 | 30 | | enable [num] | 启用断点 | 31 | | info(i) breakpoints | 显示断点信息 | 32 | | run (r) | 重新开始运行 | 33 | | watch | 设置观察点(显示改变前后的值) | 34 | | info (i) watchpoints | 显示观察点信息 | 35 | | x | 从某个位置打印信息(x/7b b表示每个字节一组,7表示打印7组) | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /notes/Git/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Git 基础命令 与 Git 飞行规则 4 | date: 2017-07-16 15:00 +0800 5 | update: 2021-10-30 17:06 +0800 6 | --- 7 | 8 | 9 | ## Git 基础命令 10 | 11 | 参考资料 12 | 13 | Git - Book #英文版链接 #中文版链接 14 | 15 | ### 初始化 16 | 17 | ``` 18 | git init 19 | git init [proj-name] 20 | git clone [url] 21 | ``` 22 | 23 | ### 配置 24 | 25 | ``` 26 | git config --list 27 | git config -e [--global] 28 | git config [--global] user.name "[name]" 29 | git config [--global] user.email "[email address]" 30 | ``` 31 | 32 | ### 增删文件 33 | 34 | ``` 35 | git add [file1][file2] 36 | git add [dir] 37 | git add . //添加当前目录的所有文件 38 | git rm [file1] //删除文件并记录此次删除 39 | git rm --cache [file] //停止追踪指定文件,保留文件在工作区 40 | git mv [name1][name2] //改名,记录此次改名 41 | ``` 42 | 43 | ### 提交 44 | 45 | ``` 46 | git commit -m "message" 47 | git commit [file1][file2] -m "message" 48 | git commit -a 49 | git commit -v //提交时显示所有diff信息 50 | git commit --amend [file1][file2] //重写上一次的更新 51 | git push origin local_branch:remote_branch 52 | ``` 53 | 54 | ### 分支 55 | 56 | ``` 57 | git branch //本地 58 | git branch -r //远程 59 | git branch -a //本地和远程 60 | git branch [name] // 新建分支 61 | git checkout -b [name] //新建分支并切换 62 | git checkout [name] //切换分支,更新工作区 63 | git branch [branch][commit] //新建分支并指向指定分支 64 | git branch --track [branch][remo-branch] //新建分支并于远程分支建立关系 65 | git branch --set-upstream [branch][remo-branch] //与远程分支建立追踪关系 66 | git merge [branch] //合并分支到当前分支 67 | git cherry-pick [commit] //选择一个commit合并进当前分支 68 | git branch -d [branch] //删除本地分支 69 | git push origin --delete [branch] //删除远程分支 70 | ``` 71 | 72 | ## 远程分支 73 | 74 | ``` 75 | git remote set-url origin // 修改origin 76 | git remote add origin // 空仓库时设置 origin,配合使用更佳 git push -u origin master 默认选择origin 77 | ``` 78 | 79 | ## Git 飞行规则 80 | 81 | 这里有常见问题的记录汇总,以及对应的处理方法。 82 | 83 | https://github.com/k88hudson/git-flight-rules/blob/master/README_zh-CN.md 84 | -------------------------------------------------------------------------------- /notes/Linux/sed.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Linux 命令 - sed 4 | update: 2018-03-23 15:00 +0800 5 | --- 6 | 7 | sed 可以对文件做些简单的修改。每次将一行文件存储在一个叫模式空间的临时缓冲区中,处理完后输出到屏幕,默认不修改文件内容除非重定向。 8 | 9 | ## 基本 10 | 11 | ```bash 12 | sed [options] 'command' file(s) 13 | sed [options] -f scriptfile file(s) 14 | ``` 15 | 16 | file(s) 表示可以接一个或者多个文件 17 | 18 | ## 参数 19 | 20 | | 参数 | 含义 | 21 | | ------------------- | ---------------------------- | 22 | | -e --expression= | 指定处理的脚本内容,可以使用多次,在同一行内执行多条命令 | 23 | | -n --quiet --silent | 只显示处理完后的结果,没有变化的内容不会输出 | 24 | | -i | 直接编辑文件,所有改动存入文件,不输出到屏幕 | 25 | | -f | 导入处理的脚本内容 | 26 | 27 | ## 命令 28 | 29 | 分号分隔开不同的命令,命令前可以限定范围 30 | 31 | ```1d``` 删除第一行 32 | 33 | ```1,$d``` 删除第一行到最后一行 34 | 35 | ```1~2d``` 从第一行开始,每两行删一行 36 | 37 | ``` $d ```删除最后一行 38 | 39 | | 命令 | 含义 | 40 | | ---------- | ---------------------------------------- | 41 | | a | 在当前行后插入文本 | 42 | | i | 在当前行前插入文本 | 43 | | c | 把选定的行替换成新的文本 | 44 | | d | 删除 | 45 | | s | 替换指定字符 | 46 | | p | 打印内容 | 47 | | w filename | 写出到文件(写当前行内容)``` sed -n '/test/w file' example ``` 当前行有 test 就写入。 | 48 | | r filename | 读入文件(读入所有文件)``` sed '/test/r file' filename ```当前行有test就读入文件内容。 | 49 | | q | 退出(这个就没必要限定范围了吧) | 50 | 51 | ## 搜索替换 52 | 53 | grep 也能搜索,但是不能替换。两者都能用正则搜索,大同小异。记得转义符号。 54 | 55 | | 标记 | 含义 | 56 | | ---------- | ---------------------------------------- | 57 | | g | 当前行所有,没有加则只会处理遇到的第一个 | 58 | | p | 打印 | 59 | | & | 已经匹配到的内容 | 60 | | ```\[n]``` | 代表匹配的子串,例如```\1``` , ```\2```,就不用重复写正则表达式。原先的正则表达式部分要加圆括号。 | 61 | 62 | -------------------------------------------------------------------------------- /less/side-catalog.less: -------------------------------------------------------------------------------- 1 | // Directory Section 2 | 3 | .catalog-container{ 4 | padding: 0px; 5 | } 6 | 7 | .side-catalog { 8 | &.fixed{ 9 | position: fixed; 10 | top: -21px; 11 | } 12 | &.fold{ 13 | .catalog-toggle::before{ 14 | content: "+"; 15 | } 16 | .catalog-body{ 17 | display: none; 18 | } 19 | } 20 | .catalog-toggle::before{ 21 | content: "−"; 22 | position: relative; 23 | margin-right: 5px; 24 | bottom: 1px; 25 | } 26 | display: block; 27 | overflow: auto; 28 | height: 100%; 29 | padding-bottom: 40px; 30 | width: 195px; 31 | .catalog-body{ 32 | position: relative; 33 | list-style: none; 34 | height: auto; 35 | overflow: hidden; 36 | padding-left: 0px; 37 | padding-right: 5px; 38 | text-indent: 0; 39 | li{ 40 | position: relative; 41 | list-style: none; 42 | a{ 43 | padding-left: 10px; 44 | max-width: 180px; 45 | display: inline-block; 46 | vertical-align: middle; 47 | height: 30px; 48 | line-height: 30px; 49 | overflow: hidden; 50 | text-decoration: none; 51 | white-space: nowrap; 52 | text-overflow: ellipsis; 53 | } 54 | } 55 | .h1_nav,.h2_nav,.h3_nav{ 56 | margin-left: 0; 57 | font-size: 13px; 58 | font-weight: bold; 59 | } 60 | .h4_nav,.h5_nav,.h6_nav{ 61 | margin-left: 10px; 62 | font-size: 12px; 63 | a{ 64 | max-width: 170px; 65 | } 66 | } 67 | .active{ 68 | a{ 69 | color: #0085a1!important; 70 | } 71 | border-radius: 4px; 72 | background-color: #F5F5F5; 73 | } 74 | } 75 | } 76 | 77 | @media (max-width: 1200px){ 78 | .side-catalog{ 79 | display: none; 80 | } 81 | } -------------------------------------------------------------------------------- /special/firefox/floorp.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Floorp 浏览器资源汇总(2025年) 4 | description: 汇总提供 Floorp 浏览器下载等资源信息。专注于提供最高效,安全和使用简便的浏览器解决方案,满足您在线活动的所有需求。 5 | date: 2022-10-16 00:20 +0800 6 | update: 2024-12-26 09:00 +0800 7 | --- 8 | 9 | **快速下载**:下载 最新 Floorp 浏览器 Windows 版本 10 | 11 | --- 12 | 13 | Floorp 浏览器是国外学生社区基于 Firefox 火狐浏览器开发的隐私友好型浏览器,旨在为用户提供保护隐私的前提下增强浏览器使用体验。且包含不少特色功能例如顺手的侧边栏、更改标签栏样式等。 14 | 15 | 其隐私保护功能目前有 —— 16 | 17 | 1. 默认启用“严格”增强型跟踪保护 18 | 2. 支持开启抵制指纹和 IP 地址泄漏(指纹保护功能默认关闭、自动批准 HTML5 图像数据的访问确认提示默认开启、WebGL 和 WebRTC 功能也支持一键开启或关闭) 19 | 3. 增加了 uBlock Origin、Privacy Badger、DuckDuckGo Privacy Essentials、Canvas Blocker 等多个插件的简介和安装跳转入口。默认不安装。 20 | 21 | Floorp 浏览器 22 | 23 |
--- Floorp 浏览器 ---
24 | 25 | 特色功能和改动包括 —— 26 | 27 | 1. 默认自带 Gesturefy 手势操作插件和翻译插件。 28 | 2. 支持多级标签、双击关闭标签等标签操作。 29 | 3. 支持设置侧边工具栏,可自定义上下左右等位置。 30 | 4. 支持一键切换 User Agent 到使用 Firefox User Agent (默认)、模拟 Chrome(Windows)、模拟 Chrome(macOS)、模拟 Chrome(Linux)、模拟 移动端 等多个选择 31 | 32 | 官方特地介绍了相关的隐私改动 33 | 34 | 1. 与 WebRTC 相比,Floorp 尽可能地隐藏了您的本地 IP。 Floorp 将尽力保护其用户。 35 | 2. 某些 API 因指纹对策而被阻止。 36 | 3. 从 Google 到 Mozilla 的定位服务 37 | 4. 重写WebGL发送的设备信息,使发送的内容和用户的设备信息不一样,这样就不会发送准确的信息。 (有些是为了兼容性而发送的) 38 | 5. 在与 http 通信时,Floorp 从不删除“http”符号。 39 | 6. 在 Floorp 上,容器选项卡。 能得到的。 40 | 7. 阻止其他不必要的 API。 并增加了保护。 41 | 8. 启用内容安全策略 (CSP) 42 | 9. 安装附加组件时启用黑名单查找 43 | 10. 删除了似乎是 Firefox 调查的内容。 44 | 11. 禁止 Firefox 向 Mozilla 发送信息 45 | 12. 默认启用容器选项卡 46 | 13. 更好地兼容 SVG avif jxl 图像文件或默认打开它们 47 | 14. 当启用 WebGL 时,Floorp 提供最好的保护。 48 | 49 | 支持 Windows、MacOS、Linux 等多个常用平台。Linux 平台使用 flatpak 技术安装,官网仅在 Ubuntu 和 Fedora 平台测试可用。经测试 Linuxmint 亦可流畅使用 Floorp 浏览器。 50 | 51 | 访问官网获取更多信息 —— 跳转官网 52 | -------------------------------------------------------------------------------- /_posts/2023-01-01-annual-summary-2022.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "2022 年终总结" 4 | subtitle: "Annual summary for 2022" 5 | description: "2022 年终总结" 6 | date: 2023-01-01 +0800 7 | update: 2023-01-01 21:30 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 总结 14 | --- 15 | 16 | 一言难尽的 2022 年已经完全过去了,这一年对于我而言是相对不顺利的一年,轮流来临的毕业季、人际关系改善有限等都是比较煎熬的事情。无论如何这些事都短暂地结束了,趁有空记录一下这段时间内的变化和收获吧。 17 | 18 | 2022年网易云年度总结 19 | 20 |
图片出自:2022年网易云年度总结
21 | 22 | ## 博客篇 23 | 24 | 博客从 2016 年开始到现在也已经有 6 年了。博客建设上而言,去年单独给博客配置了独立的域名,不再使用其他服务下的二级域名,并做了一点优化,所以目前博客的访问量绝大部分还是来自搜索引擎。 25 | 26 | 内容建设上来说,2022 年里博客内容更新了 7 篇,比 2021 年的 2 篇更新数量有所提高(之前的更新几乎都是以年为单位的)。除博客内容以外,还更新了几个浏览器资源相关的页面,这部分页面用特定的关键词在搜索引擎搜已经能排前 10 了,也算是意外的收获。 27 | 28 | 从总结和提高影响力的角度考虑,也尝试写了技术类的文章,后视镜看这几篇技术博客内容的质量还是差强人意的,没有表达出足够的深度,后续还是要针对这块继续改善下。 29 | 30 | 最后去年也做了一个静态的个人书签的页面,解决了我个人使用不同浏览器的时候快速访问网站的需要(不算是正式的 side project 吧)。 31 | 32 | ## 工作篇 33 | 34 | 去年年行业重锤,我个人虽然也没被刀但也经历过几次大规模毕业季,同事的变动还是比较大的。再加上下半年时不时一次的居家办公,工作上我的心态更多是想跟同事关系上的相处、个人能力和平台资源的关系、工作深度和广度这几点上做改善,这些事多少有了些阶段性的收获,也算是一个积极的信号。 35 | 36 | ## 生活篇 37 | 38 | 生活篇就是除了工作以外的内容。去年加了一个网友群,跟她们的相处让我的性格变得外向了,面对陌生人时也更自然了一点(就这件事我就想说快乐修勾是真的非常讨喜,非常感谢他们)。 39 | 40 | 去年也对```wlb```这件事上做了一点其他的尝试,成为了一个小透明的 UP 主(暂时还是「单机版」,视频的互动和观看都很少)。阅读的目标最后并没有实现。side project 还没有任何眉目实现。 41 | 42 | 认识新朋友这点的进度有限,不过也因为这目标接触了很多人,对很多事情都有了新的理解。昨天偶然因为要办事跟一个同龄的做民宿的陌生人聊了一会,得知对方有去找工作的想法但是很迷茫(这也是我最近的状态),聊了很多民宿相关的事情,还提到了「人与人之间的关系是一种基于交换的契约关系」这点,我还挺赞同契约关系这句的。现在回想起来,我可能还挺享受跟陌生人聊天的,争取今年能有从陌生人/网友到线下朋友的进步出现吧! 43 | 44 | ## 投资篇 45 | 46 | 2022年对于投资而言可以说是一件魔幻的事情(这个词套用到生活上都是一样适用的)。互联网行业公司的爆锤、持续一整年的加息、恒生指数在 10 月份底点位甚至跌到 25 年前的位置、年末短债基金和理财的大幅回撤都对我实现“画线”而言增加了不少的变数。 47 | 48 | 最后现在看,基本实现了我年初「提高持仓」+「合理配置」的基本目标,亏损也在可以接受的范围内。过去一年偏股混合型指数下跌``` 21.03 ```%,但个人的组合资金加权收益率是``` -5.86 ```% ,时间加权是``` -11.57```%, 都跑赢了指数。接下来的一年我打算减少对这块的时间投入,考虑用合适的投顾组合减少开黑车。持有的金额也达到了我的预期所以今年不再使用存量资金投入。不预测只应对,悲观预期和乐观收益并不是一件矛盾的事情,所以希望今年能有所收获。 49 | 50 | 万得启动页配图 51 | 52 |
图片出自:2022年万得迎新年启动页配图
53 | 54 | ## 最后 55 | 56 | 希望今年多点平安顺利吧,就不奢望太多了。 -------------------------------------------------------------------------------- /special/firefox/trains.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 何为 Firefox Trains? 4 | description: Firefox Trains 一个可以查询到 Firefox 火狐浏览器不同渠道的最新版本的页面。 5 | date: 2022-06-03 23:50 +0800 6 | update: 2025-11-13 18:00 +0800 7 | --- 8 | 9 | 什么是 Firefox Trains?Firefox Trains 一个可以查询到 Firefox 火狐浏览器不同渠道的最新版本的页面。 10 | 11 | Firefox Trains 12 | 13 | 如图所示,截止 2025 年 11 月 13 日,不同渠道最新版本如下(不同渠道的设计和区别详见 《Firefox 火狐浏览器各版本区别》) 14 | 15 | ESR 长期支持版:```140``` 16 | 17 | Release 正式版:```145``` 18 | 19 | Beta 测试版:```146``` 20 | 21 | Nightly 每夜开发版:```147``` 22 | 23 | ### 一、不同渠道的介绍 24 | 25 | 按主页所示,Firefox Trains 可以查询当前四个不同渠道的发布信息,它们分别是: 26 | 27 | ESR 长期支持版 28 | 29 | Release 正式版 30 | 31 | Beta 测试版 32 | 33 | Nightly 每夜开发版 34 | 35 | 点击访问对应版本的链接,可以了解到不同版本当前最新的开发测试进度(Milestones)和灰度发布的比例,还有很多其他信息可供各位探索! 36 | 37 | ### 二、不同版本的发布情况和发布日志 38 | 39 | Firefox Trains 提供了一个页面查询版本号对应的发布日期、对应的问题修复数和发布日志,如 113 版本如下 40 | 41 | https://whattrainisitnow.com/release/?version=113 42 | 43 | 如果对其他版本有兴趣了解查询的话,可以把地址栏中```113```的数字换成其他任意感兴趣的版本,即可快捷查询~ 44 | 45 | ### 三、火狐浏览器发布计划(Firefox Release Calendar) 46 | 47 | Firefox Release Calendar 是 Firefox Trains 中的一个展示后续版本发布计划的页面。 48 | 49 | Firefox Release Calendar 50 | 51 | ```Version```是对应的大版本,每一个Q(Quarter,意为季度)都会有3-4个大版本的发布。 52 | 53 | ```Matching ESR```则是对应的ESR版本号,因为长期支持版的更新周期比较长,所以ESR的大版本号更新比较慢。 54 | 55 | ```Nightly starts```则是从该项对应的日期开始开发新版本,每天的改动都会出现在 Nightly 每夜开发版中,感兴趣可自行下载尝试。 56 | 57 | ```Soft code freeze```意味着该版本的功能开发已经基本完成不会再添加新功能。 58 | 59 | ```Beta starts```则是对应的测试版更新时间。 60 | 61 | ```Release day```对应着该版本正式发布稳定版的时间。 62 | 63 | 64 | -------------------------------------------------------------------------------- /_posts/2017-09-20-a-woman-like-me.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "续写 《像我这样的一个女子》" 4 | subtitle: "A woman like me" 5 | description: "选修课作业,续写 西西的作品《像我这样的一个女子》" 6 | date: 2017-09-20 +0800 7 | update: 2022-01-08 17:55 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 文学 14 | --- 15 | 16 | > 这是之前选修课上要求续写的内容,今天在自己电脑上找到当初的文件,就发出来了。个人觉得并不是写得太好,只是在对原文只是浅显理解的基础上续写的,而且结尾收得有点快。 17 | 18 | > 2021.10.31 原发于简书,博客迁移后简书链接已经删除失效。本博客为最后一份记录 19 | 20 | 夏继续很开心地跟我聊着天,而我的心思都在眼前的那束花上,全然没留意他在说些什么。 21 | 22 | “哎,你喜欢吃甜品吗?”他问。“还行,不讨厌也说不上喜欢。”我说。 23 | 24 | 我并没有留意到话题什么时候转到了甜品上,但耳朵分明听到他想邀请我一起前往元朗的甜品店,去试试佳记甜品的杨枝甘露。我不清楚他在拜访完我那些沉睡了的朋友后是否还想去,现在满脑子里都是他夺门而出失魂落魄的样子。现在看他那么开心,又不忍心拒绝他,同意他的邀请呢,又担心他到时候没有食欲品尝美食,空带一个躯体过去有什么乐趣可言呢。要去,还是我自己去吧。唉唉,像我这样的一个女子,其实是不宜和任何人恋爱的。 25 | 26 | “你现在上班迟到了吗,要不我们现在过去吧。” 27 | 28 | 他终究还是回到了这个点上,一个我极力想要绕开的话题。缄默不语是我这种态度最好的概括了吧。本想着跟他在这咖啡室熬过这个星期日上午,然后用点什么借口拒绝,或者是拖延他的请求的,怡芬姑母那边,到时候再解释就是了。但是夏已经站起身,他的手已经拉起了我那苍白的手,无法挣脱,就像当时夏问我“你喜欢我吗”的问题那样,身不由己,我已经站起身来了。 29 | 30 | 一旦出了这个咖啡室的门,最多三百步路的光景,我在他心目中的印象就要彻底改变了,甚至他有可能在我的生活中彻底消失。我将忘记世上有过一个叫夏的男子,而他也会忘记曾经认识过一个女子,一个替人化妆的美容师。出了门口他依旧牵着我的手,那力度仍然无法挣脱。夏的肩的高度,恰好与我的头同高,让我萌发了想把头靠在他肩上的想法。这想法越来越强烈,以至于我最后还是将自己的头靠在了他肩上。有可能离开,不如现在最后再珍惜一下,让以后有个念想吧。 31 | 32 | 最后两百步。从出门之后他就在问我工作上的事情,我总是心不在焉地敷衍。例如能不能去你工作的地方参观那种问题,他还是在不厌其烦地再三向我确认。公路边的各色车辆呼啸而过,丝毫没有减慢速度的意思。前面一辆双层公交因为前面一辆小轿车挡住了去路,竟然按响了喇叭,就像是夏天午休的时候有人敲门,打扰的那份宁静舒适那样讨人烦。 33 | 34 | 最后一百步。他不在说到我工作上的事情。身边几个时尚青年,肩上扛着双喇叭的收录机,传来几首当红的歌曲。俨然夏的心思被那些时尚事物吸引住了。我反而没想到的是,他问起我平日里经常穿着素白的衣服,是否想尝试这代表潮流前线的衣服。 35 | 36 | “你穿起来一定很好看。”他说。“是吧。”我说。 37 | 38 | 最后五十步。我那些沉睡了的朋友啊,我将要与你们为伴了,夏失声大叫,夺门而出才是我想象中的事情。他从未起过誓,从未说过无论如何都不会离弃我,白头偕老,至死不渝。从未说过这样情话的实在人,就随他去吧。 39 | 40 | 已经来到了门口,临近小道的门虚掩着。除了我们两个,没有任何人在门外。我的心跳动得愈发厉害,但此时心里却有点“狭路相逢勇者胜”的想法,毫不犹豫地穿过一道道的门,走过一条又一条的走廊,径直来到那个房间里,那个平日里工作的地方。光线昏暗,寒气透骨。走过来的时候我并没有留意夏的表情,就直接拽着他的手来到了这个地方,会见我那些沉睡了的朋友。此时此刻,关注点该改回夏了,我想看看他是怎么样的表情,看到此情此景会有怎么样的感受。或许是因为光线问题,他脸上表情看起来是那么平静。难道这也是害怕的前兆吗?现在我应该先跟他说清楚的,说完他害怕的话,就让他走吧。 41 | 42 | 我把隔开的窗帘拉开,那些沉睡的朋友们就跟夏相见了。很明显,他是很惊讶的,嘴巴张得那么大。在他这目瞪口呆的期间,我把一切解释给他听。很奇怪,我越讲,他的嘴却反倒越张越小,仿佛我的话有安定人的神奇作用。一颗石子投入湖中,阵阵涟漪,渐渐泛开,没有丝毫声响。我解释完后,他却给我讲起他大学期间参观隔壁学校人解楼的事情。泡在福尔马林的人体,庄严盛放在一个个玻璃器皿中的器官,都在他心中留下了深刻的印象,在里面工作的师兄师姐都是很尊敬这些被称为“大体老师”的,连说话声音都很低。当得知我是给那些沉睡的朋友化妆的时候,他当然能够理解我,同时也明白了为什么我平日里喜欢些素白的衣服,说话总是轻声细语。 43 | 他拉我的手,离开房间并掩上房间门,紧紧地抱住了我。能互相理解,不隐瞒,才能有真的刚强、坚韧的爱吧。 -------------------------------------------------------------------------------- /sitemap.xml: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | 5 | 6 | {{ site.url }} 7 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 8 | daily 9 | 1.00 10 | 11 | 12 | {{ site.url }}/tags/ 13 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 14 | daily 15 | 1.00 16 | 17 | 18 | {{ site.url }}/notes/ 19 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 20 | daily 21 | 1.00 22 | 23 | 24 | {{ site.url }}/wiki/ 25 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 26 | daily 27 | 0.60 28 | 29 | 30 | {{ site.url }}/wiki/privacy/ 31 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 32 | daily 33 | 0.60 34 | 35 | 36 | {{ site.url }}/wiki/lctt/ 37 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 38 | daily 39 | 0.60 40 | 41 | 42 | {{ site.url }}/wiki/copywriting-guidelines/ 43 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 44 | daily 45 | 0.60 46 | 47 | 48 | {{ site.url }}/wiki/about/ 49 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 50 | daily 51 | 0.60 52 | 53 | 54 | {{ site.url }}/wiki/affiliate/ 55 | {{ "now" | date: "%Y-%m-%dT%H:%M:%S+08:00" }} 56 | daily 57 | 0.60 58 | 59 | {% for post in site.posts %} 60 | 61 | 62 | {{ site.url }}{{ post.url | remove: 'index.html' }} 63 | 64 | {% if post.update %}{{ post.update | date: "%Y-%m-%dT%H:%M:%S+08:00" }}{% else %}{{ post.date | date: "%Y-%m-%dT%H:%M:%S+08:00" }}{% endif %} 65 | daily 66 | 1.00 67 | {% endfor %} 68 | 69 | -------------------------------------------------------------------------------- /notes/Linux/find.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Linux 命令 - find 4 | update: 2018-02-01 15:41 +0800 5 | --- 6 | 7 | ## 基本 8 | 9 | find 【搜索位置】 【参数】 10 | 11 | ```bash 12 | find /home -name abc[cd] 13 | find /home -iname abc 不区分大小写 14 | find /home -user root 按所有者搜索 15 | find /home -nouser 查找没所有者的文件 16 | ``` 17 | * 匹配任意内容 18 | ? 匹配任意一个字符 19 | [] 匹配任意一个中括号内的字符 20 | 如果提示 ``` 路径必须在表达式之前 ```,那就要将表达式用引号包含起来,例如 ``` find /home -name "*.h" ``` 21 | 22 | ```bash 23 | find /home -mtime -10 -size -300k 24 | ``` 25 | -10 以当天为标志往前10天 到 当天 26 | 10 以当天为标准往前10天 的 当天 27 | +10 以当天为标准往前10天 的 之前 28 | 29 | -atime [access time] 访问 30 | -ctime [change time] 改变文件属性 31 | -mtime [modify time] 修改文件内容 32 | 33 | ``` find ./ -perm 775 ``` 34 | 35 | -perm 按照文件权限找 36 | 37 | -follow 倘若find命令遇到符号链接文件,就跟踪至链接所指向的文件。 38 | 39 | -size 按文件大小查找 40 | -1k 小于 41 | 1k 等于 42 | +1k 大于 43 | k小写 M大写 44 | 45 | -inum 查找特定inode节点的文件 46 | 47 | -type 按文件类型找 48 | 49 | | 参数 | 类型 | 50 | | ---- | ------ | 51 | | b | 块设备文件 | 52 | | d | 目录 | 53 | | c | 字符设备文件 | 54 | | p | 管道 | 55 | | l | 符号链接 | 56 | | f | 一般文件 | 57 | 58 | 可以联合起来几个条件例如 59 | find /etc -size +100k -a -size -200k -exec ls -lh {} \; 60 | -a and 61 | -o or 62 | -exec ls -lh {} \; 之后同时执行 ls -lh , -exec 和 {} \; 配对出现 63 | 64 | ## 结合 wc 统计行数 65 | 66 | > wc 【参数】【文件】 67 | 68 | -c 统计字节数。 69 | 70 | -l 统计行数。 71 | 72 | -m 统计字符数。这个标志不能与 -c 标志一起使用。 73 | 74 | > 统计符合条件的文件数 75 | 76 | ```find ./ -name "*.h" | wc -l``` 77 | 直接输出答案 78 | 79 | > 统计符合条件的文件的行数 1 80 | 81 | ```find ./ -name "*.h" -exec wc -l {} \;``` 82 | 83 | 显示文件名和行数,结果示例 84 | 85 | ```bash 86 | 101 ./a.h 87 | 80 ./b.h 88 | 20 ./c.h 89 | 118 ./d.h 90 | 91 ./e.h 91 | ``` 92 | 93 | > 统计符合条件的文件的行数 2 94 | 95 | ``` find ./ -name "*.h" -print0 | xargs -0 wc -l``` 96 | 97 | 效果同上,-print0 是用"\0" 分割结果,xargs -0 是把结果分开。find 默认用 -print 输出,会换行。 98 | 99 | 可以看二进制显示的结果 100 | 101 | ```bash 102 | yping@deepin:~/test$ find ./ -name "*.h" -print | xxd -b 103 | 00000000: 00101110 00101111 01100001 00101110 01101000 00001010 ./a.h. 104 | yping@deepin:~/test$ find ./ -name "*.h" -print0 | xxd -b 105 | 00000000: 00101110 00101111 01100001 00101110 01101000 00000000 ./a.h. 106 | ``` 107 | 108 | ## 查找当前目录以.c结尾的文件,且文件中包含"hello world"的文件的路径 109 | 110 | ```bash 111 | find . -name "*.c" -exec grep "hello world" {} -L \; 112 | ``` -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | // Project configuration. 4 | grunt.initConfig({ 5 | pkg: grunt.file.readJSON('package.json'), 6 | uglify: { 7 | main: { 8 | src: 'js/<%= pkg.name %>.js', 9 | dest: 'js/<%= pkg.name %>.min.js' 10 | } 11 | }, 12 | less: { 13 | expanded: { 14 | options: { 15 | paths: ["css"] 16 | }, 17 | files: { 18 | "css/<%= pkg.name %>.css": "less/<%= pkg.name %>.less" 19 | } 20 | }, 21 | minified: { 22 | options: { 23 | paths: ["css"], 24 | cleancss: true 25 | }, 26 | files: { 27 | "css/<%= pkg.name %>.min.css": "less/<%= pkg.name %>.less" 28 | } 29 | } 30 | }, 31 | banner: '/*!\n' + 32 | ' * <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n' + 33 | ' * Copyright <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' + 34 | ' */\n', 35 | usebanner: { 36 | dist: { 37 | options: { 38 | position: 'top', 39 | banner: '<%= banner %>' 40 | }, 41 | files: { 42 | src: ['css/<%= pkg.name %>.css', 'css/<%= pkg.name %>.min.css', 'js/<%= pkg.name %>.min.js'] 43 | } 44 | } 45 | }, 46 | watch: { 47 | scripts: { 48 | files: ['js/<%= pkg.name %>.js'], 49 | tasks: ['uglify'], 50 | options: { 51 | spawn: false, 52 | }, 53 | }, 54 | less: { 55 | files: ['less/*.less'], 56 | tasks: ['less'], 57 | options: { 58 | spawn: false, 59 | } 60 | }, 61 | }, 62 | }); 63 | 64 | // Load the plugins. 65 | grunt.loadNpmTasks('grunt-contrib-uglify'); 66 | grunt.loadNpmTasks('grunt-contrib-less'); 67 | grunt.loadNpmTasks('grunt-banner'); 68 | grunt.loadNpmTasks('grunt-contrib-watch'); 69 | 70 | // Default task(s). 71 | grunt.registerTask('default', ['uglify', 'less', 'usebanner']); 72 | 73 | }; 74 | -------------------------------------------------------------------------------- /wiki/lctt.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: LCTT 翻译记录 4 | description: 本页面记录了2016年11月到2018年10月间在 Linux.Cn Translation Team (LCTT)翻译的文章,并在此向校对者致以真诚的谢意。 5 | update: 2025-11-28 12:00 +0800 6 | not_show_copyright: true 7 | --- 8 | 9 | > LCTT 是 Linux.Cn Translation Team 的简称,负责从国外优秀媒体翻译 Linux 相关的技术、资讯、杂文等内容。 10 | 11 | 本页面旨在记录个人在 LCTT 中已经翻译过的文章,并向校对者致以真诚的谢意。 12 | 13 | ———————— 14 | 15 | 2024-02-01: 从即日起,“Linux 中国” 这个社区,包括它的主网( https://linux.cn/ )、公众号、视频号,以及下属的《硬核观察》栏目,将无限期停止更新和运营。 16 | 17 | 2025-03-20: Linux.cn域名被注册商设置为clientHold(永久冻结)状态,这意味着该域名在DNS系统中被禁止解析、访问、使用、变更和交易,导致网站完全无法使用。 18 | 19 | ———————— 20 | 21 |

《现在 Linux 运行在 99.6% 的 TOP500 超级计算机上》

22 |

《把SQL Server 迁移到Linux?不如换成MySQL》

23 |

《如何在Ubuntu 16.10 的Unity 8 上运行老式Xorg 程序》

24 |

《三款极棒的专注于云端的Linux 发行版》

25 |

《Linux 系统管理员2017 年的10 个新决心》

26 |

《如何向 Mozilla 开源社区做贡献》

27 |

《sudo 入门指南 》

28 |

《在 Linux 上用火狐浏览器保护你的隐私》

29 |

《如何挑选你的第一门编程语言》

30 |

《Hugo 对比 Jekyll :两大领先的静态页面生成器之间的比较 》

31 |

《五个值得现在安装的火狐插件》

32 |

《在 Linux 中使用 top 命令的建议 》

33 |

《如何在 Linux 上使用 tcpdump 命令捕获和分析数据包 》

34 |

《万维网的创建者正在创建一个新的去中心化网络 》

35 |

《使用开源同步工具 Syncthing 控制你的数据 》

36 | 37 | ———————— 38 | 39 | 内容可能有时间延迟,欢迎访问以下链接获取最新信息 40 | 41 |

ypingcn - Linux 中国翻译组(LCTT)- Linux.中国 - 开源社区

42 | -------------------------------------------------------------------------------- /js/jquery.tagcloud.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | 3 | $.fn.tagcloud = function(options) { 4 | var opts = $.extend({}, $.fn.tagcloud.defaults, options); 5 | tagWeights = this.map(function(){ 6 | return $(this).attr("rel"); 7 | }); 8 | tagWeights = jQuery.makeArray(tagWeights).sort(compareWeights); 9 | lowest = tagWeights[0]; 10 | highest = tagWeights.pop(); 11 | range = highest - lowest; 12 | if(range === 0) {range = 1;} 13 | // Sizes 14 | if (opts.size) { 15 | fontIncr = (opts.size.end - opts.size.start)/range; 16 | } 17 | // Colors 18 | if (opts.color) { 19 | colorIncr = colorIncrement (opts.color, range); 20 | } 21 | return this.each(function() { 22 | weighting = $(this).attr("rel") - lowest; 23 | if (opts.size) { 24 | $(this).css({"font-size": opts.size.start + (weighting * fontIncr) + opts.size.unit}); 25 | } 26 | if (opts.color) { 27 | // change color to background-color 28 | $(this).css({"backgroundColor": tagColor(opts.color, colorIncr, weighting)}); 29 | } 30 | }); 31 | }; 32 | 33 | $.fn.tagcloud.defaults = { 34 | size: {start: 14, end: 18, unit: "pt"} 35 | }; 36 | 37 | // Converts hex to an RGB array 38 | function toRGB (code) { 39 | if (code.length == 4) { 40 | code = jQuery.map(/\w+/.exec(code), function(el) {return el + el; }).join(""); 41 | } 42 | hex = /(\w{2})(\w{2})(\w{2})/.exec(code); 43 | return [parseInt(hex[1], 16), parseInt(hex[2], 16), parseInt(hex[3], 16)]; 44 | } 45 | 46 | // Converts an RGB array to hex 47 | function toHex (ary) { 48 | return "#" + jQuery.map(ary, function(i) { 49 | hex = i.toString(16); 50 | hex = (hex.length == 1) ? "0" + hex : hex; 51 | return hex; 52 | }).join(""); 53 | } 54 | 55 | function colorIncrement (color, range) { 56 | return jQuery.map(toRGB(color.end), function(n, i) { 57 | return (n - toRGB(color.start)[i])/range; 58 | }); 59 | } 60 | 61 | function tagColor (color, increment, weighting) { 62 | rgb = jQuery.map(toRGB(color.start), function(n, i) { 63 | ref = Math.round(n + (increment[i] * weighting)); 64 | if (ref > 255) { 65 | ref = 255; 66 | } else { 67 | if (ref < 0) { 68 | ref = 0; 69 | } 70 | } 71 | return ref; 72 | }); 73 | return toHex(rgb); 74 | } 75 | 76 | function compareWeights(a, b) 77 | { 78 | return a - b; 79 | } 80 | 81 | })(jQuery); 82 | -------------------------------------------------------------------------------- /special/song/janabi-a-thought-on-an-autumn-night.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - 秋夜思绪 @Jannabi 4 | date: 2022-06-03 19:34 +0800 5 | update: 2022-07-07 10:30 +0800 6 | description: 秋夜思绪 @Jannabi - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | 秋夜思绪 (A thought on an autumn night 가을밤에 든 생각) @Jannabi [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | meo na meon byeol bit ceo pyoe le seo do 17 | 머나먼 별빛 저 별에서도 18 | 纵使在那颗星 所散发的渺远星光 19 | 20 | no lael pu leu neun sa lang sal get ji 21 | 노랠 부르는 사랑 살겠지 22 | 歌唱着的爱情 也会鲜活永存的吧 23 | 24 | pa mi myeo no son do son keu li wun geot deul mo a seo 25 | 밤이면 오손도손 그리운 것들 모아서 26 | 每每夜幕低垂 思念的种种便其乐融融地相聚 (注: 오손도손 即和睦地欢聚一堂, 此处将想念的思绪拟人) 27 | 28 | no lael qi eo pu leu get ji 29 | 노랠 지어 부르겠지 30 | 会融作歌谣 放声歌唱的吧 31 | 32 | sae ga man pa ma neu leul su no eun byeol bin ma zeo 33 | 새까만 밤하늘을 수놓은 별빛마저 34 | 就连缀于那漆黑夜空的星光 35 | 36 | pu leo o neun pa lam da la ka go 37 | 불어오는 바람 따라가고 38 | 也追随吹拂的风而去 39 | 40 | po go peun geu dae saeng gak qi teo jyeo ka neun 41 | 보고픈 그대 생각 짙어져 가는 42 | 想念的你啊 在思念之情愈发浓厚的 43 | 44 | xi wo le a leum da wun ni ba me 45 | 시월의 아름다운 이 밤에 46 | 这十月美好的今夜 47 | 48 | ------ 49 | 50 | pu leu da po myeon eo ze ga ol ga 51 | 부르다 보면 어제가 올까 52 | 倘若试着呼唤 昨日便会到来吗 53 | 54 | keu lip deon na li cam ma nan neun de 55 | 그립던 날이 참 많았는데 56 | 曾怀念的时光 真是数不胜数 57 | 58 | ceo meol li pan za gi da a lyeo ni meo leo jyeo ka neun 59 | 저 멀리 반짝이다 아련히 멀어져 가는 60 | 在远方闪闪发光 不断模糊远去的你 61 | 62 | neo neun ca geun byeol ka ta 63 | 너는 작은 별 같아 64 | 就仿若一颗小小星辰 65 | 66 | Farewell Farewell 67 | 68 | meo leo jyeo ka neun 69 | 멀어져 가는 70 | 愈发渐行渐远的 71 | 72 | Farewell ooh- 73 | 74 | ------ 75 | 76 | sae ga man pa ma neu leul su no eun pyeol bi ma zeo 77 | 새까만 밤하늘을 수놓은 별빛마저 78 | 就连缀于那漆黑夜空的星光 79 | 80 | pu leo o neun pa lam da la ka go 81 | 불어오는 바람 따라 가고 82 | 也追随吹拂的风而去 83 | 84 | po go peun geu dae saeng gak qi teo jyeo ka neun 85 | 보고픈 그대 생각 짙어져 가는 86 | 想念的你啊 在思念之情愈发浓厚的 87 | 88 | xi wo le a leum da wun ni ba me 89 | 시월의 아름다운 이 밤에 90 | 这十月美好的此夜 91 | 92 | su ma neun pa lam pu leo on dae do 93 | 수많은 바람 불어온대도 94 | 就算无尽狂风席卷而来 95 | 96 | nal lyeo po nae ji na neul lae 97 | 날려 보내진 않을래 98 | 我也不会放手 任你飞去 99 | 100 | yi qyeo jil ga tu lyeo wo kyeo teul maem do neun 101 | 잊혀질까 두려워 곁을 맴도는 102 | 生怕被就此遗忘 仍在身边徘徊的 103 | 104 | xi wo le a leum da wun ni ba meul ki eo kae cu se yo 105 | 시월의 아름다운 이 밤을 기억해 주세요 106 | 这十月的美好之夜 就请你铭记于心 107 | 108 | Farewell Farewell 109 | ``` -------------------------------------------------------------------------------- /_posts/2016-04-04-how-to-use-jekyll-to-build-a-blog.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "用 Jekyll 在 Github 上搭建一个简易博客" 4 | subtitle: "Build a simple blog using Jekyll and Github" 5 | description: "如果你只是想简单的在 Github 上搭建一个简易的博客,生成静态网页的话,Jekyll 将是一个不错的选择。" 6 | date: 2016-04-04 +0800 7 | update: 2022-06-27 10:11 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 技术 14 | --- 15 | 16 | 如果你只是想简单的在 Github 上搭建一个简易的博客,生成静态网页的话,Jekyll 将是一个不错的选择。 17 | 18 | ### 安装Jekyll 19 | 20 | ```shell 21 | sudo apt-get update 22 | ``` 23 | 24 | 更新软件包列表。在这一步可以试着把更新源切换到 ubuntu 的官方主服务器,毕竟国内的更新源有延时(不知道这句说的对不对,不对还希望能指出错误)。 25 | 26 | ``` 27 | sudo apt-get install ruby 28 | ``` 29 | 30 | Jekyll 的依赖之一就是 ruby。 31 | 32 | ``` 33 | sudo apt-get install gem 34 | ``` 35 | 36 | 官网上的命令是 gem install jekyll ,先安装 gem。 37 | 38 | ``` 39 | gem sources -l 40 | gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/ 41 | gem sources -u 42 | ``` 43 | 44 | 以上几步是更改 gem 的源,使得速度更快。 45 | 46 | ``` 47 | sudo gem install jekyll 48 | ``` 49 | 50 | 最后一步,安装成功的话会有下面的提示。 51 | 52 | ``` 53 | Successfully installed jekyll-3.1.2 54 | Parsing documentation for jekyll-3.1.2 55 | Done installing documentation for jekyll after 1 seconds 56 | 1 gem installed 57 | ``` 58 | 59 | 遇到类似的报错就是缺少相关头文件,需要再安装一个相关的依赖``` ruby2.*-dev ```。 60 | 61 | ``` 62 | Building native extensions. This could take a while... 63 | ERROR: Error installing jekyll: 64 | ERROR: Failed to build gem native extension. 65 | 66 | current directory: /var/lib/gems/2.7.0/gems/http_parser.rb-0.8.0/ext/ruby_http_parser 67 | /usr/bin/ruby2.7 -I /usr/lib/ruby/2.7.0 -r ./siteconf20220627-4252-dpxce9.rb extconf.rb 68 | mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h 69 | 70 | You might have to install separate package for the ruby development 71 | environment, ruby-dev or ruby-devel for example. 72 | 73 | extconf failed, exit code 1 74 | 75 | Gem files will remain installed in /var/lib/gems/2.7.0/gems/http_parser.rb-0.8.0 for inspection. 76 | Results logged to /var/lib/gems/2.7.0/extensions/x86_64-linux/2.7.0/http_parser.rb-0.8.0/gem_make.out 77 | ``` 78 | 79 | 最后一步安装的版本号要根据系统返回的已经安装 ruby 的版本号来确定,例如返回 2.1 就要安装 ```ruby2.1-dev```,版本号是2.7 就要安装 ```ruby2.7-dev``` 80 | 81 | ``` 82 | ruby -v 83 | ruby 2.1.5p273 (2014-11-13) [x86_64-linux-gnu] 84 | sudo apt-get install ruby2.1-dev 85 | 86 | ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu] 87 | sudo apt-get install ruby2.7-dev 88 | ``` 89 | 90 | 91 | 92 | 93 | > 参考 94 | 95 | [Jekyll • 简单的博客、静态网站工具](http://jekyll.com.cn) 96 | -------------------------------------------------------------------------------- /notes/C/apue3-file-IO.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 第三章 文件IO 4 | date: 2017-09-25 20:18 +0800 5 | update: 2021-11-19 23:29 +0800 6 | --- 7 | 8 | 简单记录一下 9 | ```cpp 10 | #include 11 | 12 | int open(const char *__file, int __oflag, ...) 13 | int openat(int __fd, const char *__file, int __oflag, ...) 14 | ``` 15 | 16 | openat 返回最小的未用的文件描述符。openat 的第一个参数可以用 open 返回值,例如 17 | 18 | ```cpp 19 | cout << openat(open("/home/",O_DIRECTORY),"a.txt",O_RDONLY) << endl; 20 | ``` 21 | 22 | 有以下参数可以在 __oflag 上使用 23 | 24 | O_RDONLY 只读 25 | 26 | O_WRONLY 只写 27 | 28 | O_RDWR 可读可写 29 | 30 | O_DIRECTORY 非目录返回错误 31 | 32 | // P50 33 | 34 | ```cpp 35 | #include 36 | 37 | int creat(const char *__file, mode_t __mode) 38 | ``` 39 | 40 | S_IRUSR S_IWUSR S_IXUSR 用户读\写\执行 41 | 42 | S_IRGRP S_IWGRP S_IXGRP 组 43 | 44 | S_IROTH S_IWOTH S_IXOTH 其他 45 | 46 | 按位与 作为参数 47 | 48 | 返回为只写打开的文件描述符 49 | 50 | 51 | ```cpp 52 | #include 53 | 54 | int close(int __fd) 55 | ``` 56 | 成功0错误-1 57 | 58 | ```cpp 59 | #include 60 | 61 | __off_t lseek(int __fd, __off_t __offset, int __whence) 62 | ``` 63 | 返回新的成功偏移量,错误-1 64 | 65 | 有以下选项给 - __whence 66 | 67 | SEEK_SET SEEK_CUR SEEK_END,分别对应 开始位置 当前位置 结束位置 68 | ```lseek(int __fd, 0, SEEK_END)``` 返回值等同文件大小 69 | 70 | ```cpp 71 | #include 72 | 73 | ssize_t read(int __fd, void *__buf, size_t __nbytes) 74 | ``` 75 | 返回读到的字节数 文件末则为0 错误-1 76 | 77 | ```cpp 78 | #include 79 | 80 | ssize_t write(int __fd, const void *__buf, size_t __n) 81 | ``` 82 | 返回已写的字节数 错误为 -1 83 | 84 | ```cpp 85 | #include 86 | 87 | ssize_t pread(int __fd, void *__buf, size_t __nbytes, __off_t __offset) 88 | ssize_t pwrite(int __fd, const void *__buf, size_t __n, __off_t __offset) 89 | ``` 90 | 相当于先lseek 再read/write ,但不更新当前文件偏移量 91 | 92 | ```cpp 93 | #include 94 | 95 | int dup(int __fd) 96 | int dup2(int __fd, int __fd2) 97 | ``` 98 | 返回新文件描述符,第二个可以指定(若fd2已打开则关闭) 99 | 100 | ```cpp 101 | #include 102 | 103 | void sync() 104 | int fsync(int __fd) 105 | int fdatasync(int __fildes) 106 | ``` 107 | 108 | sync 将修改过的块排入队列并马上返回。 109 | 110 | fsync 特定文件操作,更新数据+属性,磁盘写完成后才返回。0 正常 -1 错误。 111 | 112 | fdatasync 类似 fsync ,但只更新数据。 113 | 114 | ```cpp 115 | #include 116 | 117 | int fcntl(int __fd, int __cmd, ...) 118 | ``` 119 | cmd 有 120 | 121 | 复制已有描述符 F_DUPFD 122 | 123 | 获取、设置文件描述符 F_GETFD F_SETFD 124 | 125 | 获取、设置文件状态标志 F_GETFL F_SETFL(先&F_ACCMODE再与 O_RDONLY 等比较) 126 | 127 | //等P65 128 | 129 | ```cpp 130 | #include 131 | 132 | ioctl(int __fd, unsigned long __request, ...) 133 | ``` 134 | //后续 135 | -------------------------------------------------------------------------------- /tags.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: 博客归档 3 | subtitle: 「这些年我都在思考什么」 4 | layout: default 5 | excerpt: tags 6 | not_show_copyright: true 7 | not_show_ad: true 8 | --- 9 | 10 | 11 |
12 |
13 |
14 |
15 |
16 |

{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}

17 | {{ page.subtitle }} 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 |
26 |
27 |
28 | 29 |
30 | {% for tag in site.tags %} 31 | {{ tag[0] }} 32 | {% endfor %} 33 |
34 | 35 | 40 | 41 | 42 | {% for tag in site.tags %} 43 |
44 | 45 | {{ tag[0] }} 46 | 47 | {% for post in tag[1] %} 48 | 52 |
53 | 54 |

55 | {{ post.title }} 56 |

57 | {% if post.subtitle %} 58 |

59 | {{ post.subtitle }} 60 |

61 | {% endif %} 62 |
63 | 64 |
65 |
66 | {% endfor %} 67 |
68 | {% endfor %} 69 | 70 |
71 |
72 |
73 | -------------------------------------------------------------------------------- /special/song/d.ear-december-24th.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - December 24th(12월24일) @d.ear 4 | date: 2023-03-21 22:00 +0800 5 | update: 2023-03-21 22:00 +0800 6 | description: d.ear December 24th(12월24일) - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | December 24th(12월24일) [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | Everytime I close my eyes 17 | 每次我闭起双眼 18 | 19 | 그날이 생각날 때면 20 | geu nar i saeng gak nar ttae myeon 21 | 每次回想起那天 22 | 23 | Everytime I close my eyes 24 | 每次我闭起双眼 25 | 26 | 다시 또 설레이곤해 27 | da si tto seol le i gon hae 28 | 就会再次悸动 29 | 30 | 언제나 내 맘속에 그날의 그 순간들은 31 | eon je na nae mam sog-e geu nar ui geu sun gan deur eun 32 | 不管什么时候那天的那个瞬间 33 | 34 | 여전히 내 맘속에 고스란히 기억될 35 | yeo jeon hi nae mam sog-e go seu ran hi gi eok doel 36 | 依然留在我的心中 37 | 38 | The best scene of my life more than anything 39 | 比生命中任何场景都要记忆犹新 40 | 41 | The day before last christmas and gently flowing melodies 42 | 去年圣诞节的前一天,缓缓流淌的旋律 43 | 44 | In the soft light of candles is where I sang my song for you 45 | 在蜡烛柔和的光里就是我给你唱歌的地方 46 | 47 | And in your eyes, in your face, in the way you hold my hand 48 | 你的眼睛里,你的脸上,你牵起的我的手 49 | 50 | The memories of you with me I'll never forget 51 | 从不曾忘记的彼此间的回忆 52 | 53 | Everytime I close my eyes 54 | 每次我闭起双眼 55 | 56 | 밤새 고민하고 썼던 그 편지를 읽어가며 57 | bam sae go min ha go sseot deon geu pyeon ji reur ilg eo ga myeo 58 | 读着苦恼了整晚写出来的信 59 | 60 | 너무나 떨렸던 그 순간들 까지도 61 | neo mu na tteol lyeot deon geu sun gan deur kka ji do 62 | 就连过于心动的那个瞬间 63 | 64 | 언제나 내 맘속에 그날의 그 순간들은 65 | eon je na nae mam sog-e geu nar ui geu sun gan deur eun 66 | 不管什么时候那天的那个瞬间 67 | 68 | 여전히 내 맘속에 고스란히 기억될 69 | yeo jeon hi nae mam sog-e go seu ran hi gi eok doel 70 | 依然留在我的心中 71 | 72 | The best scene of my life more than anything 73 | 比生命中任何场景都要记忆犹新 74 | 75 | The day before last christmas and gently flowing melodies 76 | 去年圣诞节的前一天,缓缓流淌的旋律 77 | 78 | In the soft light of candles is where I sang my song for you 79 | 在蜡烛柔和的光里就是我给你唱歌的地方 80 | 81 | And in your eyes, in your face, in the way you hold my hand 82 | 你的眼睛里,你的脸上,你牵起的我的手 83 | 84 | The memories of you with me I'll never forget 85 | 从不曾忘记的彼此间的回忆 86 | 87 | Everytime I close my eyes 88 | 每次我闭起双眼 89 | 90 | The day before last christmas and gently flowing melodies 91 | 去年圣诞节的前一天,缓缓流淌的旋律 92 | 93 | In the soft light of candles is where I sang my song for you 94 | 在蜡烛柔和的光里就是我给你唱歌的地方 95 | 96 | And in your eyes, in your face, in the way you hold my hand 97 | 你的眼睛里,你的脸上,你牵起的我的手 98 | 99 | The memories of you with me I'll never forget 100 | 从不曾忘记的彼此间的回忆 101 | 102 | Everytime I close my eyes 103 | 每次我闭起双眼 104 | ``` -------------------------------------------------------------------------------- /_posts/2020-10-23-investment-service.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "投顾服务初观察" 4 | subtitle: "Investment Service" 5 | description: "2019年三家基金销售平台(支付宝、理财通、且慢)获得投顾试点牌照后的产品变化" 6 | date: 2020-10-23 +0800 7 | update: 2020-10-23 12:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 投资 14 | --- 15 | 16 | > 一份来自非从业人员的不成熟观察记录 17 | 18 | 自从去年三家基金销售平台(蚂蚁、腾安、盈米)获得基金投顾试点牌照之后,我一直都很期待各家是会打出什么大招。但以现有情况看,都还是处于摸索的阶段,而且产品形式的差异不大。 19 | 20 | 目前而言,各家都是用基金组合(FOF)的方式+三笔钱(活钱管理、稳健理财、长期投资)的理念向用户推广这项服务。 21 | 22 | ### 支付宝 23 | 24 | 在支付宝上对应的是“帮你投”,是与先锋领航联合推出的一项服务。进入后点击“同意”,即可查看不同的策略,按年化资产管理总额的0.5%收取投顾费用,申购费用不可减免。 25 | 26 | 印象中支付宝最近一年动作连连,跟其他平台类似的功能有【精选组合】、【目标投】、【投资顺风车】等,还有自家特色的【金选好基】、【收益挑战】、板块,还会有【直播】的功能。理财页也有智能机器人提供【理财体检】、【资产诊断】等相对比较弱的咨询功能。 27 | 28 | 投资者教育是用话题、攻略等形式,单只基金设有讨论区。 29 | 30 | | 收益预期 | 风险等级 | 策略名称 | 产品组成 | 31 | | :-----: | :-----: | :-----: | :-----: | 32 | | 2.5% | 低风险 | 安睡增值 | 100%固收 | 33 | | 3% | 中低风险 | 稳步增利 | 4%股票 96%固收 | 34 | | 4% | 中低风险 | 安逸求盈 | 9%股票 91%固收 | 35 | | 5% | 中低风险 | 安稳汇报 | 20%股票 80%固收 | 36 | | 6% | 中低风险 | 步步为营 | 35%股票 65%固收 | 37 | | 7% | 中风险 | 稳中求胜 | 50%股票 50%固收 | 38 | | 8% | 中风险 | 攻守兼备 | 60%股票 40%固收 | 39 | | 9% | 中风险 | 动态进取 | 70%股票 30%固收 | 40 | | 10% | 中高风险 | 锐意进取 | 80%股票 20%固收 | 41 | | 11% | 中高风险 | 全面进取 | 90%股票 10%固收 | 42 | 43 | ### 腾讯理财通 44 | 45 | 理财通里的叫“一起投”,点开最上面就有一个功能简介的视频,四笔钱和养老理财(养老 FOF)。一个有趣的细节的是,入口展示的顺序【要花的钱】【求稳的钱】【生钱的钱】,但是往下的具体产品顺序却是【求稳的钱】【生钱的钱】【要花的钱】。具体组合是用基金公司提供的策略,暂时没看到自研的组合。投顾的费用分别是0.2%(要花的钱)0.5%(求稳的钱)0.75%(生钱的钱)0.5%(养老理财),但没有单独收取申购费用。 46 | 47 | 养老 FOF 在理财通有一个专门的入口,是本文提到三个平台中唯一有展示入口的平台。 48 | 49 | 投资者教育是用话题、攻略、功能提示等形式,单只基金没有讨论区,基金组合有讨论区。 50 | 51 | | 风险等级 | 类型 | 策略名称 | 产品组成 | 52 | | :-----: | :-----: | :-----: | :-----: | 53 | | 中低风险 | 要花的钱 | 一起投嘉实货币添益策略 | 目前是42.99%债券型+57.01%货币型 | 54 | | 中风险 | 求稳的钱 | 一起投南方稳添利策略 | 目前是53.89%混合型+43.11%债券型+3%货币型 | 55 | | 中高风险 | 生钱的钱 | 一起投中欧超级股票全明星策略 | 目前是75.27%混合型+22.98%债券型+1.75%货币型 | 56 | 57 | ### 且慢 58 | 59 | 且慢是这三个平台中唯一没有排行榜的平台,也没有单独推销某个基金。购买单只基金的入口十分隐秘,也没有单独设置讨论区。投顾费用包含在基金申购费中,不单独收取。年缴纳费用不超过500元,超过退还。 60 | 61 | 投资者教育主要是首页的【硬核数据】+【问答】等形式的文章进行 62 | 63 | | 类型 | 策略名称 | 产品组成 | 64 | | :-----: | :-----: | :-----: | 65 | | 活钱管理 | 货币三佳 | 100%货币基金 | 66 | | 稳健理财 | 南方梦想佳 | 目前10%债券型+90%货币型 | 67 | | 稳健理财 | 我要稳稳的幸福 | 目前54.55%债券型+45.45%混合型 | 68 | | 长期投资 | 春华秋实 | 目前4.99%股票型+54.35%混合型+33.21%债券型+7.45%货币型 | 69 | 70 | ### 最后 71 | 72 | 我个人比较在意在买入前展示具体的基金、投顾的收费模式以及后续的投资教育。感觉目前位置,投资教育还是比较弱的一项。 73 | 74 | | 平台 | 风险划分类型 | 目标收益率 | 资产大类分布比例 | 买前展示具体买入的基金 | 投资者教育 | 投顾费用 | 75 | | :-----: | :-----: | :-----: | :-----: | :-----: | 76 | | 支付宝 | 有| 有 | 有 | 无 | 有,但缺乏系统化 | 独立收费,不减免单只基金申购费用 | 77 | | 腾讯理财通 | 有 | 无 | 有 | 有 | 有,但缺乏系统化 | 独立收费,减免基金申购费用 | 78 | | 且慢 | 有 | 无 | 有 | 有 | 有,但缺乏系统化 | 不独立收费,以基金申购费用抵扣 | 79 | 80 | -------------------------------------------------------------------------------- /special/firefox/theme.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Firefox 火狐浏览器主题美化(2025年) 4 | description: 寻找如何美化你的 Firefox 火狐浏览器吗?Firefox 火狐浏览器支持主题设置,本文提供几个 Firefox 火狐浏览器主题,让你的浏览体验更加舒适和个性化。浏览火狐美观实用主题并选择你喜欢的设计。简单几次点击即可美化浏览器,满足自己的审美需求。 5 | date: 2022-03-30 20:40 +0800 6 | update: 2024-12-26 09:00 +0800 7 | --- 8 | 9 | Firefox 火狐浏览器支持设置主题,简单的几次点击即可美化浏览器,满足自己的审美需求。更有多种开箱即用的预设主题,2023 年 1 月 17 日前还有多个```Independent Voices```的 colorways 主题可供选择。更新到Firefox 106 及以上版本,访问 Firefox View 页面(标签栏最左侧的标签)即可选择。 10 | 11 | 浏览器访问 ```about:addons``` 切换到主题页即可更改,下方还有当前主题推荐支持一键更换。 12 | 13 | > Firefox 火狐浏览器官网国际版资源,浏览器 APK 下载等资源等详见 《Firefox 火狐浏览器资源汇总》 14 | 15 | ## 一、AMO 一键安装 16 | 17 | 「Firefox 火狐浏览器插件官网 AMO 」 中同样有许多设计好的主题,一键点击即可使用。 18 | 19 | 20 | ### 1.1 Shades of Firefox 21 | 22 | 一款简洁而不失优雅的主题,白底加居右橙色火狐 logo ,适合喜欢默认白色主题但又想有点小变化的人使用。 23 | 24 | Shades of Firefox 下载 25 | 26 | ### 1.2 Dark space 27 | 28 | 当前排名最高的一个主题,深空加上星星点缀,更显宁静。适合想要使用纯黑主题的人使用。 29 | 30 | Nicothin Space 下载 31 | 32 | ## 二、Firefox Color 定制 33 | 34 | 火狐官方出品的主题定制方法,访问 Firefox Color 后按提示安装 Firefox Color 插件。 35 | 36 | 完成安装后会再次跳转会 Firefox Color 官网,便可支持自定义包含工具栏颜色、背景颜色、搜索框颜色、新建标签页文本颜色在内等多种字体和颜色,还支持上传背景图片提供更多可定制性。如果有颜色选择上的困难,网页甚至提供了多套预制颜色提供一键替换。 37 | 38 | 唯一不好的是,页面不支持中文,需要有一定英语阅读能力,耐心阅读使用。 39 | 40 | 41 | ## 三、使用 VivaldiFox 插件 42 | 43 | 一个可以让你的主题颜色跟随网页主题色更改的插件,跟使用 Vivaldi 浏览器一样的体验,动态实现主题美化。 44 | 45 | VivaldiFox 插件下载地址 46 | 47 | --- 48 | 49 | **更多阅读** 50 | 51 | 73 | -------------------------------------------------------------------------------- /_posts/2022-07-28-user-permission-service.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "用户权限服务的设计" 4 | subtitle: "User permission service implement for microservices" 5 | description: "简化黑名单、白名单逻辑的用户权限服务的设计" 6 | date: 2022-07-28 +0800 7 | update: 2022-10-08 18:30 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 技术 14 | - 后端 15 | - 微服务 16 | --- 17 | 18 | 背景:在实际业务场景中,或多或少都有定制特殊名单的逻辑,这些名单可以用来作为活动的特邀用户,亦或者是禁止特定条件的访问权限。这些名单简单划分可以分为白名单和黑名单,按实际约束条件则是用户白名单、地区白名单等。这些名单可以是手动由特定人员添加,或者是由任务分析后生成的结果。下面以 Tars 服务来实现上述目标,简化权限判断的业务逻辑。 19 | 20 | 最后的实现如下,主要逻辑是从不同的数据源加载数据,根据配置中指定的逻辑进行组合,最后提供接口给外部系统调用。 21 | 22 | 该微服务可以简单设计为名单权限的判断,再在其上增加一个服务来满足实际应用中更为复杂的逻辑需要。 23 | 24 | ### 对外接口设计 25 | 26 | FunctionID 是用来区分不同的应用场景。 27 | 其他字段可以根据需要拓展。 28 | 29 | ```protobuffer 30 | struct AuthResult 31 | { 32 | 0 optional int iCode; // 判断的结果 33 | 1 optional string sMessage; // 错误信息(或者其他需要用作提示的信息) 34 | 2 optional int iPermission; // 是否有权限(已经判断了黑名单、白名单的逻辑) 35 | 3 optional int iExpireTimestampSec; // 过期时间(秒级),非 0 则为到对应时间后权限可能发生改变。 36 | }; 37 | struct AuthReq 38 | { 39 | 0 optional User tUser; // 用户信息 40 | 1 optional vector vFunctionIDs; 41 | }; 42 | struct AuthRsp 43 | { 44 | 0 optional int iCode; // 返回值 45 | 1 optional string sMessage; // 错误信息(如果有) 46 | 2 optional map mResult; // 结果 47 | }; 48 | ``` 49 | 50 | ### 版本迭代 51 | 52 | 从头到位,服务的核心逻辑都是从数据库中加载数据到内存中,然后根据配置进行不同的判断返回结果。 53 | 54 | #### v1 直接判断 55 | 56 | 第一版是直接把所有数据库数据从固定的一个表内按 FunctionID 区分后,加载到内存中,接口在处理请求时就上以 FunctionID 为维度的读锁,然后根据配置从请求体中取出数据,与内存中的数据进行比较。根据名单类型返回 iPermission 字段的值。 57 | 58 | #### v1.1 从固定的表内加载数据判断 59 | 60 | 随着单个数据源的增加(某种程度上也有名单维护不合理的原因),每次更新内存中的数据都会因为 SQL 语句执行时间过长(网络传输的数据大),导致服务处理其他请求变慢甚至异常。所以针对数据源的加载问题,做了一点细节优化: 61 | 62 | 1. 增加分页查询的逻辑,默认以数据库自增 ID 为依据,每次数据库查询限制 2000 条(一个拍脑袋定一下的配置),如果需要可以自行配置 Pagination 和 PageSize 调整此处逻辑。 63 | 2. 缩小读写数据时的加锁力度,将原有的全局读写单例改为按 FunctionID 划分的不同读写锁。定时更新数据时只对需要更新的部分进行加锁,尽可能避免影响其他数据的判断逻辑。 64 | 65 | #### v1.2 从多变的表内加载数据判断 66 | 67 | v1.1 的版本实现里只实现了一个固定语句的查询,形如 ```select xxx from white_list where function_id = xxx``` 的语句直接从管理后台中读取手动更新的配置。随着该服务使用范围的推广,已经慢慢无法满足实际需要。 68 | 69 | 假设有一份名单是由其他部门根据某些条件定时计算出来的,按原有设计只能是每次到处名单再手动加入管理后台里,费时费力。为了更为灵活的实现数据源加载,对数据库读取的逻辑做了以下优化: 70 | 71 | 1. 支持自定义配置数据库链接,没有设置则直接使用管理后台的数据库链接。 72 | 2. 支持配置需要读取的数据库字段,留空则默认为```udbuserid```。 73 | 3. 支持配置需要读取的数据库表名,不再只是原有的 ```white_list``` 和 ```black_list```。 74 | 4. 增加开关以便关闭默认的``` function_id = xxx ``` 查询过滤逻辑。 75 | 5. 支持配置```where``` 条件的写法。 76 | 77 | 实现完本版本后,只需要定时重新读取配置即可避免上述人工操作过程,更加方便地支持```动态+自动化变更```的需要。 78 | 79 | #### v1.3 优化数据的管理逻辑 80 | 81 | 到目前为止,所有的数据都是存放在一个全局的 ```map[string][]string mData``` 中,key 是functionid,value 则是集合,每次请求过来则从一个```map[string]int mFunctionID2FieidID``` 中取出需要请求中的哪个字段,再与 mData 中的集合进行比较。 82 | 83 | 这种设计无法满足后续对多个字段进行判断的场景,故进行改造。 84 | 85 | TODO 86 | -------------------------------------------------------------------------------- /special/song/iu-your-meaning.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - 你的意义 @IU 4 | date: 2022-06-03 19:34 +0800 5 | update: 2022-07-07 10:30 +0800 6 | description: 你的意义 @IU - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | 你的意义(너의 의미) @IU [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | 너의 그 한 마디 말도 그 웃음도 17 | neo ye ke han ma di mar do ke u-sem do 18 | 你的一言一语 一个微笑 19 | 나에겐 커다란 의미 20 | na ye gen keo da lan eu-i mi 21 | 对我来说都意义重大 22 | 너의 그 작은 눈빛도 23 | neo ye ke ca-gen nun bid do 24 | 你每一个细小的眼神 25 | 쓸쓸한 그 뒷모습도 나에겐 힘겨운 약속 26 | sser sse-lan ke dwin mo seb do na ye gen him gyeon un yag sog 27 | 还有那落寞的背影 对我来说都是沉重的约定 28 | 너의 모든 것은 내게로 와 29 | neo ye mo den geo-sen nae ge lo wa 30 | 你的一切都会向我靠近 31 | 풀리지 않는 수수께끼가 되네 32 | pur li ji an nen su su gge ggi ga twe ne 33 | 变成一道道无解的谜题 34 | 35 | 슬픔은 간이역의 코스모스로 피고 36 | sem pu-men ka-ni yeo-ge ko se mo se lo pi go 37 | 悲伤像简易车站旁大波斯菊般盛开 38 | 스쳐 불어온 넌 향긋한 바람 39 | se qyeo pu-leo on neon hyang ge-tan pa lam 40 | 一掠而过 你就像幽香的清风 41 | 나 이제 뭉게구름 위에 성을 짓고 42 | na i ze mung ge gu lem wi e seong er jid go 43 | 我要在云团上面建筑城堡 44 | 널 향해 창을 내리 바람 드는 창을 45 | neor hyang hae cang er nae li pa lam de nen cang er 46 | 为了你拉下窗户 吹进微风的窗户 47 | 48 | 너의 그 한 마디 말도 그 웃음도 49 | neo ye ke han ma di mar do ke u-sem do 50 | 你的一言一语 一个微笑 51 | 나에겐 커다란 의미 52 | na ye gen keoo da la eu-i mi 53 | 对我来说都意义重大 54 | 너의 그 작은 눈빛도 55 | neo ye ke ca-gen num bi do 56 | 你每一个细小的眼神 57 | 쓸쓸한 그 뒷모습도 나에겐 힘겨운 약속 58 | sser sse-lan ke dwin mo seb do na ye gen him gyeo un yag sog 59 | 还有那落寞的背影 对我来说都是沉重的约定 60 | 너의 모든 것은 내게로 와 61 | neo ye mo den geo-sen nae ge lo wa 62 | 你的一切都会向我靠近 63 | 풀리지 않는 수수께끼가 되네 64 | pur li ji an nen su su gge ggi ga twe ne 65 | 变成一道道无解的谜题 66 | 67 | 슬픔은 간이역의 코스모스로 피고 68 | sem pu-men ka-ni yeo-ge ko se mo se lo pi go 69 | 悲伤像简易车站旁大波斯菊般盛开 70 | 스쳐 불어온 넌 향긋한 바람 71 | se qyeo pu-leo on neon hyang ge-tan pa lam 72 | 一掠而过 你就像幽香的清风 73 | 나 이제 뭉게구름 위에 성을 짓고 74 | na i ze mung ge gu lem wi e seong er jid go 75 | 我要在云团上面建筑城堡 76 | 널 향해 창을 내리 바람 드는 창을 77 | neor hyang hae cang er nae li pa lam de nen cang er 78 | 为了你拉下窗户 吹进微风的窗户 79 | 80 | 슬픔은 간이역의 코스모스로 피고 81 | sem pu-men ka-ni yeo-ge ko se mo se lo pi go 82 | 悲伤像简易车站旁大波斯菊般盛开 83 | 스쳐 불어온 넌 향긋한 바람 84 | se qyeo pu-leo on neon hyang ge-tan pa lam 85 | 一掠而过 你就像幽香的清风 86 | 나 이제 뭉게구름 위에 성을 짓고 87 | na i ze mung ge gu lem wi e seong er jid go 88 | 我要在云团上面建筑城堡 89 | 널 향해 창을 내리 바람 드는 창을 90 | neor hyang hae cang er nae li pa lam de nen cang er 91 | 为了你拉下窗户 吹进微风的窗户 92 | 93 | 너의 그 한 마디 말도 그 웃음도 94 | neo ye ke han ma di mar do ke u-sem do 95 | 你的一言一语 一个微笑 96 | 나에겐 커다란 의미 97 | na ye gen keoo da la eu-i mi 98 | 对我来说都意义重大 99 | 너의 그 작은 눈빛도 100 | neo ye ke ca-gen num bi do 101 | 你每一个细小的眼神 102 | 쓸쓸한 그 뒷모습도 나에겐 힘겨운 약속 103 | sser sse-lan ke dwin mo seb do na ye gen him gyeo un yag sog 104 | 还有那落寞的背影 对我来说都是沉重的约定 105 | ``` 106 | -------------------------------------------------------------------------------- /_posts/2019-01-27-the-south.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "The South" 4 | subtitle: "" 5 | description: "A article for southern town. I am not a native english-speaker but a learner " 6 | date: 2019-01-27 +0800 7 | update: 2021-10-30 12:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: false 12 | tags: 13 | - 文学 14 | --- 15 | 16 | ​ In the spring of 2013, I was in the south, in a drizzly small town. 17 | 18 | ​ At the end of the second lunar month, the red kapok flowers, which looked like fire before, had already fallen off.The element of green gradually flared up from its bare branches. 19 | 20 | ​ And other tree species that can be seen everywhere, those whose leaves had been blown by the cold winter wind, were streaming greenery with the company of other pioneer, the misty spring rain. 21 | 22 | ​ Just like the small, thin but unknown tree at the corner,there was little greenery at the beginning, and then, green spreaded out as if one night's rain purified it, the tender green on the branches was charming enough to make someone into it. 23 | 24 | ​ My school was in the suburbs of town. Rows of low houses, which are traditional two-sided sloping house, can be seen by looking out of the classroom's window. 25 | 26 | ​ In the early morning of late spring, thick yet light fog was often hanged in the air like a glass cover. 27 | 28 | ​ The village was full of the sound of silence, and just like a sculpture group that had peeled off its color in the time of life had stood erect for thousands of years. 29 | 30 | ​ The weed in the corner from green to yellow, from yellow to green again.The rain stains on the taupe wall from wet to dry, from dry to wet again and again. 31 | 32 | ​ The narrow lane was always filled with yellow dog's lonely bark. Is he spending the remaining day or looking forward to the return of his master? 33 | 34 | ​ On the white even reflective road after raining, such a young child strided the thick short legs, raised hands slightly forward, tried best to chase the little brother's bicycle ahead. 35 | 36 | ​ That's an encounter. Over the farmland covered with green clothes all year round, I found a vigorous figure gliding and hovering. 37 | 38 | ​ He was a bird with all white body. He opened a pair of full-fledged wings and flited over and over again against the leaf apex of the crops, which made crops like water and he was lighter additionally. 39 | 40 | ​ Birds, who became the master of sky inborn, were luckier than us to take possession of blue sky. 41 | 42 | ​ When a string of sparrows hung on the electric wire woke up the morning with a clear twitter, there is the blue sky above the tablature. I cound not help but slow down , focus my vision, seeking to capture this magnificent picture. 43 | 44 | ​ In the south, there was a kind of beauty that makes the world quiet. 45 | -------------------------------------------------------------------------------- /special/song/jannabi-for-lover-who-hesitate.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - 致犹豫的恋人们 @Jannabi 4 | date: 2022-06-03 19:34 +0800 5 | update: 2022-07-07 10:30 +0800 6 | description: 致犹豫的恋人们 @Jannabi - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | 致犹豫的恋人们(주저하는 연인들을 위해) @Jannabi [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | 나는 읽기 쉬운 마음이야 17 | na neun yil gi xwi wun ma-eu mi ya 18 | 我是一颗很容易被读懂的心 19 | 20 | 당신도 스윽 훑고 가셔요 21 | tang xin do seu-euk heul go ga xyeo yo 22 | 请你也嗖一下扫视一番吧 23 | 24 | 달랠 길 없는 외로운 마음 있지 25 | tal leil gil om neun woe lo wun ma eum yit ji 26 | 有着无法消散的孤独之心 27 | 28 | 머물다 가셔요 음 29 | meo mul da go xyeo yo ummmm 30 | 请停留一会儿再离开吧 Um 31 | 32 | 내게 긴 여운을 남겨줘요 33 | nei ge gin yeo wu neul nam gyeo zwo yo 34 | 给我留下经久不散的余韵吧 35 | 36 | 사랑을 사랑을 해줘요 37 | sa lang eul sa lang eul hei zwo yo 38 | 请给予我爱 39 | 40 | 할 수 있다면 그럴 수만 있다면 41 | hal su yit dat myeon ke leol su man yi da myeon 42 | 可以做到的话 只要可以那样的话 43 | 44 | 새하얀 빛으로 그댈 비춰 줄게요 45 | sei ha ya bi ceu lo keu deil bi cwo zul ge yo 46 | 我会化作一道白光将你照耀 47 | 48 | 그러다 밤이 찾아오면 49 | ke leo da pa mi ca za o myeon 50 | 这样夜晚降临的话 51 | 52 | 우리 둘만의 비밀을 새겨요 53 | wu li tuil ma ne pi mi leul se gyeon yo 54 | 就能刻下只属于我们两个人的秘密 55 | 56 | 추억할 그 밤 위에 갈피를 꽂고 선 57 | cu eo kal keu ba mwi e gal pi leul got go seon 58 | 在要回忆的那晚之上 插入记忆书签 59 | 60 | 남몰래 펼쳐보아요 61 | nam mol lei pyeol qyeo bo a yo 62 | 偷偷地打开来看看 63 | 64 | 나의 자라나는 마음을 65 | na e ca la na neun ma eu meul 66 | 不能把我逐渐成长的心 67 | 68 | 못 본채 꺾어 버릴 수는 없네 69 | mot bon ce geo 70 | 难以视而不见然后把它挫伤抛弃 71 | 72 | 미련 남길바엔 그리워 아픈 게 나아 73 | mi lyeon nam gil ba en ke lin wo a peun ge na a 74 | 与其一直留恋 不如痛苦地思念 75 | 76 | 서둘러 안겨본 그 품은 따스할 테니 77 | seo dul leo an gyeo bon keu pu meun da seu hal te ni 78 | 急冲冲试着相拥的那怀抱定很温暖 79 | 80 | 그러다 밤이 찾아오면 81 | keul leo da pa mi ca za o myeon 82 | 这样夜晚降临的话 83 | 84 | 우리 둘만의 비밀을 새겨요 85 | wu li tul ma ne bi mi leul sei gyeo yo 86 | 就能刻下只属于我们两个人的秘密 87 | 88 | 추억할 그 밤 위에 갈피를 꽂고 선 89 | cu eo ka go ba mwi e gal pi leul got go seon 90 | 在要回忆的那晚之上 插入记忆书签 91 | 92 | 남몰래 펼쳐보아요 93 | nam mol lei pyeol qyeo bo a yo 94 | 偷偷地打开来看看 95 | 96 | 언젠가 또 그날이 온대도 97 | eon zen ga do keu na li on dei do 98 | 未来的某个时候 就算那天又到来了 99 | 100 | 우린 서둘러 뒤돌지 말아요 101 | wu lin seo dul leo dwi dol ji ma la yo 102 | 我们不要匆忙转身而去 103 | 104 | 마주보던 그대로 뒷걸음치면서 105 | ma zu bo deon keu dei lo dwit geo leom qi myeon seo 106 | 继续四目相视 然后一边向后退 107 | 108 | 서로의 안녕을 보아요 109 | seo lo e an nyeong eul bo a yo 110 | 一边对彼此说再见 111 | 112 | 피고 지는 마음을 알아요 다시 돌아온 계절도 113 | pi go ji neun ma eu meul-a la yo ta xi do la on gye zeol do 114 | 再次轮回的季节也知道我绽放又凋零的心 115 | 116 | 난 한 동안 새 활짝 피었다 질래 또 한번 영원히 117 | nan han dong an sei hwal zak pi eot da jil lei do han beon yeong won hi 118 | 我在一段时间里盛放然后凋谢 又再一次 如此循环往复直到永远 119 | 120 | 그럼에도 내 사랑은 또 같은 꿈을 꾸고 121 | keu leo me do nei sa lang en do ga teun gu meul gu go 122 | 尽管如此 我的爱情又做着相同的梦 123 | 124 | 그럼에도 꾸던 꿈을 난 또 미루진 않을거야 125 | 尽管如此 做着梦的我也不会拖延 126 | ``` -------------------------------------------------------------------------------- /_posts/2022-06-02-promote-personal-blog.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "博客更新记录总结 | 个人博客历史(一)" 4 | subtitle: "How to promote personal blog" 5 | description: "" 6 | date: 2022-06-02 +0800 7 | update: 2022-11-13 18:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 博客历史 14 | --- 15 | > 这是一篇对本博客推广的记录总结。也希望能成为其他有缘人推广自己个人博客的借鉴吧。 16 | 17 | 博客是用 GitHub Page + Jekyll 搭建的。早期是没有用独立域名,一直是挂靠在 ```github.io```的二级域名下,也没有做任何的推广,只是提交了 sitemap 随缘让搜索引擎收录,也没有在任何地方推广。所以一年前的访问量都很低——Search console 里显示的最高一天曝光是60,点击是5。曝光量最高的关键词是 ``` latex 偏导数```,估计是因为这篇文章[《Markdwon + LaTex 表达数学式子》](/notes/Markdown/LaTex-math/)意外地得到青睐,要不然这样子随缘根本不可能有访问。虽然博客是在2016年开始的,但是早期的博客内容也是在校期间零碎的记录,感兴趣的人有限,再加上没有给原有的独立域名续费,所以博客是一直在一种【低频+二级站点】状态下运行的,默默无闻的透明站。 18 | 19 | 从去年中下旬(大概是2021年10月底)就打算重新将博客运营起来,主要做了这些事情—— 20 | 21 | 1. 2021年11月购入本站域名并绑定使用。将原有的 ```github.io``` 域名迁移到新域名下。 22 | 2. 在 Bing Webmaster Tools 和 Google Search Console 进行相关设置,通知博客已经绑定了独立域名,需要进行相关迁移。 23 | 3. 明确博客定位。因为早期的博客内容主题都比较凌乱没有相对统一话题倾向,所以趁这次迁移独立域名的机会,重新明确写作目标。将专注在【技术、生活、分享、火狐、投资】五类上。 24 | 4. 因为本人是火狐浏览器的用户,从这点入手更容易做,所以结合自己地使用经验,断断续续地更新了 [《火狐浏览器资源汇总》](/special/firefox/resource/) [《火狐浏览器主题美化》](/special/firefox/theme/) [《火狐浏览器插件推荐》](/special/firefox/addons/) 等几篇内容。 25 | 5. 优化对搜索引擎地可见性。因为写的博客需要被搜索引擎收录后才能被更多的人用关键词访问到。所以对搜索引擎友好能有助于推广。除去提交 sitemap 外,同时完善了网页 meta 信息,包括将写作目标写进 keyswords、完善 Open Graph Meta Tags 让在社交网站分享时更为友好、提供 JSON-LD 结构化数据信息(不过这点现在看来作用有限因为搜索结果展示没有特殊变化)。 26 | 6. 同时也做了对用户访问体验更好地改动,包括压缩相关图片的大小、调整加载资源的设置。资源加载改动不大毕竟不是专业的前端开发大佬,只是把 cloudflare 换到 jsdelivr 上和顺手更新 jquery 和 bootstrap 版本避免漏洞。优化可以借助 Lighthouse 的得分有针对性的看。目前本站的得分是【性能100、无障碍-86、最佳做法-92、SEO-100】 27 | 7. 申请加入【中文独立博客列表】【开往-友链接力】和【十年之约】。其实这次对博客的推广优化是源于想加入【开往】项目的,但无奈管理员半年后才审批通过,所以博客的优化工作已经在期间完成的。加入【十年之约】更多是想要有个目标,迫使自己不断更。我挺喜欢他们的口号的——“一个人的寂寞,一群人的狂欢。” 28 | 29 | 做了这些后博客的访问量显著上升,最高曝光每天已经有600了,特别是“火狐插件”这个关键词已经能到相关结果的前五!这无疑是一种激励!详见 [《火狐浏览器插件推荐》](/special/firefox/addons/) 30 | 31 | 希望后续能借博客沉淀下更多属于自己的知识,帮助到更多的人。 32 | 33 | --- 34 | 35 | 2022.07.07 更新 36 | 37 | 本站博客内容索引无故被必应删除,使用'site'命令搜索都提示```Some results have been removed```/```部分搜尋結果已被移除```/```部分搜索结果未予显示。有关详细信息,请参阅此处。```,以必应为基础的例如 DuckDuckGo 等均无法搜索到本站,谷歌索引暂时正常。但必应站长里也没有相关的版权投诉问题,后台显示每天爬虫都有爬取,申述无果。网上也有类似的博主反馈被删除,暂时无能为力。 38 | 39 | 记录一下其他博主的类似问题,以便有空的时候尝试解决问题。 40 | 41 | 2022-03-25 《My website disappeared from Bing and DuckDuckGo · Jesse Squires》 42 | 43 | 2022-07-25 《My website disappeared from Bing and DuckDuckGo, Part 2 · Jesse Squires》 44 | 45 | 2022-06-16 《Bing and DuckDuckGo removed my business web site - Jeff Johnson》 46 | 47 | 2022-06-24 《Microsoft Bing - site gone from SERP overnight! | BikeGremlin I/O》 48 | -------------------------------------------------------------------------------- /special/song/jannabi-november-rain.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - November Rain@Jannabi 4 | date: 2023-11-05 17:30 +0800 5 | update: 2023-11-11 16:30 +0800 6 | description: November Rain@Jannabi - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | November Rain @Jannabi [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | sum swir su ga eops eo 17 | 숨 쉴 수가 없어 18 | 无法呼吸 19 | um jig ir su jo cha eops eo 20 | 움직일 수 조 차 없 어 21 | 也动弹不了 22 | bi ga on da geu nal cheo reom 23 | 비가 온다 그 날처럼 24 | 像那天一样下雨了 25 | na ur su do eopt go 26 | 나 울 수도 없고 27 | 我不能哭 28 | us eo bor su jo cha eops eo 29 | 웃어볼 수조차 없어 30 | 也不能笑 31 | bi ga on da 32 | 비가 온다 33 | 下雨了 34 | nun i doe ji mot han chae 35 | 눈이 되지 못한 채 36 | 没能成为雪 37 | gi eog sog e no bem beo re in 38 | 기억 속에 노벰버 레인 39 | 记忆中十一月的雨 40 | sal myeo si du nun ga e 41 | 살며시 두 눈가에 42 | 轻轻在眼角 43 | maet hin da tto maet hin da 44 | 맺힌다 또 맺힌다 45 | 凝结 又凝结了 46 | deul lyeo o neun bit so ri e 47 | 들려오는 빗소리에 48 | 在传来的雨声中 49 | gam chwo dun gi eok ma jeo 50 | 감춰둔 기억마저 51 | 连收藏的记忆也 52 | jeot neun da o jeot neun da 53 | 젖는다 오 젖는다 54 | 淋湿了 淋湿了 55 | it hyeo jir su eops eo 56 | 잊혀 질 수 없어 57 | 难以忘怀 58 | gi eog eun gye jeor eur heul leo 59 | 기억은 계절을 흘러 60 | 记忆流过季节 61 | bi ga doen da 62 | 비 가 된 다 63 | 成为雨 64 | nun i doe ji mot han chae 65 | 눈이 되지 못한 채 66 | 没能成为雪 67 | gi eog sog e no bem beo re in 68 | 기 억 속에 노벰버 레인 69 | 记忆中十一月的雨 70 | sal myeo si du nun ga e 71 | 살며시 두 눈가에 72 | 轻轻在眼角 73 | maet hin da tto maet hin da 74 | 맺힌다 또 맺힌다 75 | 凝结 又凝结了 76 | deul lyeo o neun bit so ri e 77 | 들려오는 빗소리에 78 | 在传来的雨声中 79 | gam chwo dun gi eok ma jeo 80 | 감춰둔 기억마저 81 | 连收藏的记忆也 82 | jeot neun da o jeot neun da 83 | 젖는다 오 젖는다 84 | 淋湿了 淋湿了 85 | gi eog sog e no bem beo re in 86 | 기억 속에 노벰버 레인 87 | 记忆中十一月的雨 88 | tto da si du nun ga e 89 | 또 다시 두 눈가에 90 | 再一次在眼角 91 | maet hir ttaen tto maet hir ttaen 92 | 맺힐 땐 또 맺힐 땐 93 | 凝结时 又凝结时 94 | deul lyeo o neun bit so ri do 95 | 들려오는 빗소리도 96 | 希望传来的雨声 97 | tta seu han chu eog eu ro 98 | 따스한 추억으로 99 | 也成为温暖的回忆 100 | heu reu gir tto heu reu gil 101 | 흐르길 또 흐르길 102 | 流淌 又流淌 103 | geo ri geo ri su noh at deon 104 | 거리거리 수놓았던 105 | 落满每条街的 106 | nag yeob i hoe saek bic e 107 | 낙엽이 회색빛에 108 | 落叶被灰色 109 | mul deul myeon tto mul deul myeon 110 | 물들면 또 물들면 111 | 浸染 又浸染 112 | ha yeom eops i heu reu neun bi 113 | 하염없이 흐르는 비 114 | 一直下的雨 115 | geu dae ro nun i doe eo 116 | 그대로 눈이 되어 117 | 就这样成为雪 118 | nae ryeo ra o nae ryeo ra 119 | 내려라 오 내려라 120 | 下吧 下吧 121 | bi ga on da 122 | 비가 온다 123 | 下雨了 124 | nun i doe ji mot han chae 125 | 눈이 되지 못한 채 126 | 没能成为雪 127 | gyeo ur go yo han a chim 128 | 겨울 고요한 아침 129 | 冬天安静的清晨 130 | keo teun geu sae ro 131 | 커튼 그 새로 132 | 在窗帘间 133 | heut nal li neun seol le im 134 | 흩날리는 설레임 135 | 飘飞的悸动 136 | gyeo ur i o gil 137 | 겨울이 오길 138 | 希望冬天到来 139 | da si huin nun eur gi da ri neun 140 | 다시 흰 눈을 기다리는 141 | 像再一次等待白雪的 142 | cheor eopt neun a i cheo reom tta seu han 143 | 철없는 아이처럼 따스한 144 | 不懂事的孩子般 145 | gyeo ur i o gil 146 | 겨울이 오길 147 | 希望温暖的冬天到来 148 | ``` -------------------------------------------------------------------------------- /special/firefox/website.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Firefox 火狐浏览器网站资源汇总(2025年) 4 | date: 2022-07-26 13:40 +0800 5 | update: 2024-12-26 09:00 +0800 6 | --- 7 | 8 | Firefox 火狐浏览器 常用网站资源汇总 9 | 10 | ### 电脑版下载 11 | 12 | 简体中文下载页面 -->> https://www.mozilla.org/zh-CN/firefox/new/ 13 | 14 | 英文下载页面 -->> https://www.mozilla.org/en-US/firefox/new/ 15 | 16 | 电脑版 -->> https://www.mozilla.org/zh-CN/firefox/channel/desktop/ 17 | 18 | 不同版本 -->> https://www.mozilla.org/zh-CN/firefox/all/ 19 | 20 | 所有语言的历史版本 -->> https://archive.mozilla.org/pub/firefox/releases/ 21 | 22 | ### 移动端下载 23 | 24 | 安卓版 -->> https://www.mozilla.org/zh-CN/firefox/browsers/mobile/android/ 25 | 26 | iOS 版 -->> https://www.mozilla.org/zh-CN/firefox/browsers/mobile/ios/ 27 | 28 | Firefox Focus -->> https://www.mozilla.org/zh-CN/firefox/browsers/mobile/focus/ 29 | 30 | #### 移动端最新自动构建下载地址 31 | 32 | Nightly 版 -->> https://firefox-ci-tc.services.mozilla.com/tasks/index/mobile.v2.fenix.nightly.latest/arm64-v8a 33 | 34 | Beta 版 -->> https://firefox-ci-tc.services.mozilla.com/tasks/index/mobile.v2.fenix.beta.latest/arm64-v8a 35 | 36 | 正式发行版 -->> https://firefox-ci-tc.services.mozilla.com/tasks/index/mobile.v2.fenix.release.latest/arm64-v8a 37 | 38 | Reference Browser (仅有Nightly版。官方不建议日常使用) -->> https://firefox-ci-tc.services.mozilla.com/tasks/index/mobile.v2.reference-browser.nightly.latest/arm64-v8a 39 | 40 | Firefox Focus/Klar -->> https://firefox-ci-tc.services.mozilla.com/tasks/index/project.mobile.focus.release/latest 41 | 42 | ### 其他 43 | 44 | Firefox Lite(已停止更新) -->> https://github.com/mozilla-tw/FirefoxLite/releases 45 | 46 | 正式版及 Beta 版发行内容 -->> https://github.com/mozilla-mobile/fenix/releases 47 | -------------------------------------------------------------------------------- /notes/Markdown/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Markdown 基础语法 4 | description: Markdown 十二个基本语法(标题、引用、斜体、粗体、有序列表和无序列表、链接、图片、删除线、分割线、脚注、代码) 5 | date: 2016-11-10 12:00 +0800 6 | update: 2023-06-04 16:00 +0800 7 | linkeddata: {"@context":"https://schema.org","@type":"NewsArticle","headline":"Markdown 十二个基本语法(标题、引用、斜体、粗体、有序列表和无序列表、链接、图片、删除线、分割线、脚注、代码)","image":["https://blog.ypingcn.com/img/home-home-bg-Sm5ceH.webp"],"datePublished":"2016-11-10T08:00:00+08:00","dateModified":"2021-11-06 00:20 +0800","author":[{"@type":"Person","name":"ypingcn","url":"https://blog.ypingcn.com/wiki/about/"}]} 8 | --- 9 | 10 | Markdown 语法可以满足文档的基本需要,是强有力的写作工具。常见的用法如下 11 | 12 | ## 标题 13 | 14 | 在需要作为标题的文字之前加上适当个数的井号 ``` # ```(一个代表一级目录,两个表示二级目录,以此类推,一直支持到六级目录)。 15 | 16 | ## 引用 17 | 18 | 加上 ``` > ``` 即可,引用中可以多层嵌套引用。 19 | 20 | ## 斜体 21 | 22 | 文字两旁加上``` * ``` ,要与粗体区分开。斜体是一个星号,粗体是两个。 23 | 24 | ## 粗体 25 | 26 | 文字两旁加上``` ** ```,注意是两个连续的``` ** ``` 27 | 28 | ## 有序列表 29 | 30 | 数字后加点再加空格即可,软件就会显示好数字。 31 | 32 | ## 无序列表 33 | 34 | 个人比较习惯先加``` - ``` ,再加空格。``` * ``` 和 ``` + ``` 有同样的效果,但都要在后面加上空格后再书写内容 35 | 36 | ## 链接 37 | 38 | 有两种方式实现链接 39 | 40 | 第一种是 41 | 42 | ```markdown 43 | This is a [website](http://www.google.com) 44 | ``` 45 | 46 | 第二种是 47 | 48 | ```markdown 49 | I like [Firefox][1] and [Chromium][2] 50 | 51 | [1]:[https://www.mozilla.org/zh-CN/firefox/] 52 | [2]:[https://www.chromium.org] 53 | ``` 54 | 55 | 第一种便于撰写,但第二种明显方便管理链接 56 | 57 | ## 图片 58 | 59 | 图片跟链接很像,而且都有两种形式,区别是要在最前面加感叹号 60 | 61 | 例如 62 | 63 | ```markdown 64 | scan this ![QR code](https://example.com/qrcode.png) to continue 65 | ``` 66 | ## 删除线 67 | 68 | 文字两侧添加``` ~~ ```(两个连续的波浪线) 69 | 70 | 71 | ## 分割线 72 | 73 | 在空白的一行添加三个连续的``` - ``` 74 | 75 | 76 | ## 脚注 77 | 78 | 就是常见的注释,用法如下 79 | 80 | ```markdown 81 | hello[^note] 82 | [^note]: another way to say hi 83 | ``` 84 | ## 代码 85 | 86 | 前后用三个连续的``` ` ```,前后两个可以在同一行,也可以单独占一行。如果是单独占一行的话可以在前一行后面紧跟编程语言名以高亮显示。 87 | 88 | --- 89 | 90 | 还有其他更多的用法,例如表格等。 91 | 92 | 可以下载一个 Typora ,支持上述所有格式,还能 添加数学式子 。 93 | 94 | 95 | 参考资料 96 | 97 | Markdown 语法说明(简体中文版) 98 | 99 | --- 100 | 101 | **更多阅读** 102 | 103 | 125 | -------------------------------------------------------------------------------- /special/firefox/librewolf.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Librewolf 浏览器资源汇总(2025年) 4 | description: 从下载地址到实用教程,本文为你提供一站式的 Librewolf 浏览器资源汇总。了解更多关于 Librewolf 的信息,使你的浏览体验更加完美。 5 | date: 2022-04-24 13:40 +0800 6 | update: 2024-12-26 09:00 +0800 7 | --- 8 | 9 | **快速下载**:最新版Librewolf 浏览器 Windows 安装程序下载 10 | 11 | --- 12 | 13 | Librewolf,字面意思即【自由之狼】。Librewolf 浏览器是一款基于 Mozilla Firefox 火狐浏览器定制,旨在为普通用户提供注重安全隐私、开箱即用的优秀浏览器。 14 | 15 | 它删除了 Firefox 中收集用户数据的组件,例如 Pocket、Telemetry 和 Data Collection 等,并添加了一些针对隐私和安全的扩展和配置选项,如uBlock Origin、HTTPS Everywhere 和 First Party Isolation等。此外,Librewolf 浏览器还包括一些高级功能,如强制加密DNS(DoH)和HTTP Referrer控制等,以增强用户的在线隐私。 16 | 17 | 同样支持 Windows、MacOS、Linux 等不同日常使用的操作系统平台,满足不同人群的使用需要。 18 | 19 | Librewolf 浏览器图标 20 | 21 | 它有以下的几个特点适合普通用户使用: 22 | 23 | 1. 默认内置安装 uBlock Origin 以阻止脚本/广告,保护隐私和安全。 24 | 2. 没有 “添加到 Pocket” 按钮,减少了被推广打扰的机会。 25 | 3. 默认不启用火狐账户进行云同步,但需要时可以手动开启。 26 | 4. 没有自动更新功能。只能需要时只能重新下载安装,配置会保留。或者使用 LibreWolf Updater 插件简化下载流程。 27 | 28 | 对于在意上网安全的用户,它做了以下几点的改动: 29 | 30 | 1. 移除浏览器内置的遥测功能,不会再与 ```*.telemetry.mozilla.org``` 等相关域名交互上报用户行为数据。 31 | 2. 追踪保护默认设置为“严格”模式,默认就是屏蔽【社交媒体跟踪器、所有窗口中的跨网站 Cookie(包括跟踪性 Cookie)、所有窗口中的跟踪性内容、加密货币挖矿程序和数字指纹跟踪程序】 32 | 3. 默认启用 HTTPS-only 模式。在访问非 HTTPS 的网站时会提醒用户,不会直接访问展示内容。 33 | 4. 默认内置私密搜索供应商,如 Searx、Qwant(DuckDuckGo 被设置为默认搜索引擎)、DuckDuckGo、Brave Search。但对于普通用户而已这几个搜索引擎访问没有日常使用的百度谷歌好,所以在需要时候,需要访问相关地址,在搜索栏或地址栏里手动添加回去。 34 | 5. 支持伪造虚假的屏幕分辨率、时区、语言等,使得网站更难获取用户的环境参数。更多浏览器的隐私保护效果测评,可以访问 https://privacytests.org/ 获取更多测评细节。 35 | 36 | ## 安装 37 | 38 | 访问 Librewolf 浏览器官网,点击首页 Installation 的蓝色按钮即可跳转到对应平台的下载页面。【View all versions and release notes】则可以查阅所有的历史版本以及对应的发布记录,了解相关版本的改动。 39 | 40 | Librewolf 浏览器 Windows 安装包下载地址:点击前往 41 | 42 | Librewolf 浏览器 MacOS 安装包下载地址:点击前往 43 | 44 | 其他 Linux 平台如 Arch、Debian、Gentoo、Fedora 等发行版可以访问 Librewolf 浏览器官网 获取更为详细的指引。 45 | 46 | --- 47 | 48 | **更多阅读** 49 | 50 | 72 | -------------------------------------------------------------------------------- /special/song/iu-suga-eight.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: 歌词音译 - Eight @IUxSUGA 4 | date: 2022-06-03 19:34 +0800 5 | update: 2022-07-07 10:30 +0800 6 | description: Eight @IUxSUGA - 韩语罗马音译+中文歌词 7 | --- 8 | 9 | 에잇(Prod.&Feat. SUGA of BTS) @IU [更多] 10 | 11 | Lyrics Korean/Hangul Romanization/Chinese 12 | 13 | 韩语罗马音译+中文歌词。全文如下 14 | 15 | ``` 16 | So are you happy now 17 | 所以你现在幸福了吗 18 | 19 | Finally happy now are you 20 | 你现在终究是幸福了吗 21 | 22 | 뭐 그대로야 난 23 | mweo k dae lo ya nan 24 | 那什么 也就那样吧我 25 | 26 | 다 잃어버린 것 같아 27 | ta i-leo beo lin geod ga-tae 28 | 像是弄丢了一切 29 | 30 | 모든 게 맘대로 왔다가 인사도 없이 떠나 31 | mo den ge mam dae lo wad da ga in sa do eob-x ddeo na 32 | 一切都随心所欲地到来 又悄无声息地离开 33 | 34 | 이대로는 무엇도 사랑하고 싶지 않아 35 | i dae lo nen mu eod do sa lang ha go xib ji a-na 36 | 照这样下去 我可能不会再爱上什么了 37 | 38 | 다 해질 대로 해져버린 39 | ta hae jir dae lo hae jyeo beo lin 40 | 旅行在那已破败不堪的 41 | 42 | 기억 속을 여행해 43 | ki eog so-ger yeo haeng hae 44 | 记忆之中 45 | 46 | 우리는 오렌지 태양 아래 47 | u li nen o len ji tae yang a lae 48 | 我们在橙色太阳之下 49 | 50 | 그림자 없이 함께 춤을 춰 51 | k lim ze eob-xi ham gge cu-mer cweo 52 | 一同起舞 无形无影 53 | 54 | 정해진 이별 따위는 없어 55 | ceong hae jin i byeor dda wi nen eob-seo 56 | 在那没有注定了的离别 57 | 58 | 아름다웠던 그 기억에서 만나 59 | a lem da weod deon k ki eo-ge seo man na 60 | 曾经美好的记忆之中相遇 61 | 62 | Forever young 63 | Forever young 64 | 우우우 우우우우 우우우 우우우우 65 | uuu uuuu uuu uuuu 66 | Forever we young 67 | Forever we young 68 | 우우우 우우우우 69 | uuu uuuu 70 | 71 | 이런 악몽이라면 영영 깨지 않을게 72 | i leon ang mong i la myeon yeong yeong ggae ji a-ner g 73 | 若是这样的噩梦 我愿长眠于此 74 | 75 | 섬 그래 여긴 섬 서로가 만든 작은 섬 76 | 岛屿 是的 这里是岛屿 我们彼此造就的小岛 77 | 예 음 forever young 영원이란 말은 모래성 78 | 不错 forever young 永远这两个字不过是转瞬即逝的沙堡 79 | 작별은 마치 재난문자 같지 80 | 诀别仿佛灾难警报 81 | 그리움과 같이 맞이하는 아침 82 | 与想念一同迎来的早晨 83 | 서로가 이 영겁을 지나 84 | 我们都度过了这永恒的劫难 85 | 꼭 이 섬에서 다시 만나 86 | 一定要在这座岛屿上再次相遇 87 | 88 | 지나듯 날 위로하던 누구의 말대로 고작 89 | ji na den nar wi lo ha deon nu gu ye mar dae lo ko zag 90 | 正如谁安慰我所说的那句 91 | 92 | 한 뼘짜리 추억을 잊는 게 참 쉽지 않아 93 | han bbyeom zza li cu eo-g-lin nen ge cam xwib ji a-na 94 | 回忆不过丝缕 可要想忘掉还真没那么容易 95 | 96 | 시간이 지나도 여전히 97 | xi ga-ni ji na do yeo zeo-ni 98 | 纵然时光流逝 99 | 100 | 날 붙드는 그곳에 101 | nar pud d nen k go-se 102 | 那个地方却依旧紧紧攥住我 103 | 104 | 우리는 오렌지 태양 아래 105 | u li nen o leon ji tae tang a lae 106 | 我们在橙色太阳之下 107 | 108 | 그림자 없이 함께 춤을 춰 109 | k lim za eob-xi ham gge cu-mer cweo 110 | 一同起舞 无形无影 111 | 112 | 정해진 안녕 따위는 없어 113 | ceong hae jin an nyeong dda wi nen eob-xi 114 | 在那没有注定离别的 115 | 116 | 아름다웠던 그 기억에서 만나 117 | a lem da weod deon k ki eo-ge seo man na 118 | 曾经美好的记忆之中相遇 119 | 120 | 우리는 서로를 베고 누워 121 | u li nen seo lo ler pe go nu weo 122 | 我们枕在彼此身上 123 | 124 | 슬프지 않은 이야기를 나눠 125 | ser pu ji a-nen i ya gi ler la nweo 126 | 分享着不算悲伤的故事 127 | 128 | 우울한 결말 따위는 없어 129 | u u-lan keyor mar dda wi nen eob-xi 130 | 没有伤感的结局 131 | 132 | 난 영원히 널 이 기억에서 만나 133 | nan yeong weo-ni neor i ki eo-ge seo man na 134 | 我与你永远在那记忆中相遇 135 | 136 | Forever young 137 | Forever young 138 | 우우우 우우우우 우우우 우우우우 139 | uuu uuuu uuu uuuu 140 | Forever we young 141 | Forever we young 142 | 우우우 우우우우 143 | uuu uuuu 144 | 145 | 이런 악몽이라면 영영 깨지 않을게 146 | i leon ang mong i la myeon yeong yeong ggae ji a-ner ge 147 | 若是这样的噩梦 我愿长眠于此 148 | ``` -------------------------------------------------------------------------------- /js/hux-blog.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Clean Blog v1.0.0 (http://startbootstrap.com) 3 | * Copyright 2015 Start Bootstrap 4 | * Licensed under Apache 2.0 (https://github.com/IronSummitMedia/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | 7 | /*! 8 | * Hux Blog v1.6.0 (http://startbootstrap.com) 9 | * Copyright 2016 @huxpro 10 | * Licensed under Apache 2.0 11 | */ 12 | 13 | // Tooltip Init 14 | // Unuse by Hux since V1.6: Titles now display by default so there is no need for tooltip 15 | // $(function() { 16 | // $("[data-toggle='tooltip']").tooltip(); 17 | // }); 18 | 19 | 20 | // make all images responsive 21 | /* 22 | * Unuse by Hux 23 | * actually only Portfolio-Pages can't use it and only post-img need it. 24 | * so I modify the _layout/post and CSS to make post-img responsive! 25 | */ 26 | // $(function() { 27 | // $("img").addClass("img-responsive"); 28 | // }); 29 | 30 | // responsive tables 31 | $(document).ready(function() { 32 | $("table").wrap("
"); 33 | $("table").addClass("table"); 34 | }); 35 | 36 | // responsive embed videos 37 | $(document).ready(function() { 38 | $('iframe[src*="youtube.com"]').wrap('
'); 39 | $('iframe[src*="youtube.com"]').addClass('embed-responsive-item'); 40 | $('iframe[src*="vimeo.com"]').wrap('
'); 41 | $('iframe[src*="vimeo.com"]').addClass('embed-responsive-item'); 42 | }); 43 | 44 | // Navigation Scripts to Show Header on Scroll-Up 45 | jQuery(document).ready(function($) { 46 | var MQL = 1170; 47 | 48 | //primary navigation slide-in effect 49 | if ($(window).width() > MQL) { 50 | var headerHeight = $('.navbar-custom').height(), 51 | bannerHeight = $('.intro-header .container').height(); 52 | $(window).on('scroll', { 53 | previousTop: 0 54 | }, 55 | function() { 56 | var currentTop = $(window).scrollTop(), 57 | $catalog = $('.side-catalog'); 58 | 59 | //check if user is scrolling up by mouse or keyborad 60 | if (currentTop < this.previousTop) { 61 | //if scrolling up... 62 | if (currentTop > 0 && $('.navbar-custom').hasClass('is-fixed')) { 63 | $('.navbar-custom').addClass('is-visible'); 64 | } else { 65 | $('.navbar-custom').removeClass('is-visible is-fixed'); 66 | } 67 | } else { 68 | //if scrolling down... 69 | $('.navbar-custom').removeClass('is-visible'); 70 | if (currentTop > headerHeight && !$('.navbar-custom').hasClass('is-fixed')) $('.navbar-custom').addClass('is-fixed'); 71 | } 72 | this.previousTop = currentTop; 73 | 74 | 75 | //adjust the appearance of side-catalog 76 | $catalog.show() 77 | if (currentTop > (bannerHeight + 41)) { 78 | $catalog.addClass('fixed') 79 | } else { 80 | $catalog.removeClass('fixed') 81 | } 82 | }); 83 | } 84 | }); -------------------------------------------------------------------------------- /_posts/2022-11-13-short-url-for-static-page.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "静态页面也能实现短链接 | 个人博客历史(二)" 4 | subtitle: "Short URL in static page for personal blog" 5 | description: "不用服务器也能实现短链接跳转的功能" 6 | date: 2022-11-13 +0800 7 | update: 2022-11-13 18:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 博客历史 14 | --- 15 | 16 | 本站点是使用 Jekyll 搭建起来的,所有的页面都是静态页面,在部署的时候页面的就已经确认了,并没有实现服务端的逻辑。但有些链接地址太长,直接分享出去会占用太多字数也不好更新。 17 | 18 | 例如专题里的《最新版 Firefox 火狐浏览器下载》 《最新版 Librewolf 浏览器下载》 《最新版 Floorp 浏览器下载》 这三个页面,我都增加了「最新版本快速下载」的按钮,原本是直接加上原始下载链接的。但是随着版本更新,每次更新最新版本的地址都需要在三个地方更新三个地址的信息,不仅麻烦,而且会多次触发页面的构建增加不必要的提交历史,于是萌生了实现短链接的逻辑。 19 | 20 | ## 实现 21 | 22 | 实现这个功能主要想好两个问题 23 | 24 | 1. “短地址”到“实际地址”的对应关系如何管理 25 | 2. 最终地址如何跳转 26 | 27 | ### 如何管理 28 | 29 | 数据管理的话,主要考虑到部署在 ```Github Page```/```Gitee Page```/```COding Page``` 这类第三方服务上的 Jekyll 都不能调用数据库,而且这个短链功能主要是给博客使用,不会大规模对外,使用数据库来管理就太“重”了。所以可以直接把数据存在一个``` routes.json ```文件里,在地址里传进短地址,实际的跳转地址从这个配置文件里获取。 30 | 31 | 一个例子—— 32 | 33 | ```markdown 34 | { 35 | "floorp-windows-lastest": "https://github.com/Floorp-Projects/Floorp/releases/download/v10.7.0/floorp-win64.installer.exe" 36 | } 37 | ``` 38 | 39 | ### 如何跳转 40 | 41 | 静态页面跳转的话就没法返回不同的```HTTP 301(永久重定向)```/``` 302(临时重定向) ```返回码了。但是在功能体验上来说可以尽可能地让用户的等待时间缩短,且逻辑只能在前端实现。 42 | 43 | 上网搜索了一下,发现一篇博客给了我启发。可以设置 ``` window.location.href ``` 属性来实现跳转,如果有延时的需要则设置定时器后延迟更新属性。 44 | 45 | 因为静态页面里获取``` routes.json ```时可能会拿到一个带缓存的非最新页面,所以可以在获取的时候加一个``` ?t=[时间戳] ```的小尾巴,这也是很多网站的常规操作了。 46 | 47 | 非前端开发者,东拼西凑的代码,贴一下自己的实现。主要逻辑是从地址里的```r```参数里获取短地址。如 ```https://example.com/?r=blog``` 这个地址,``` blog ``` 就是我们想要的短地址,不存在的短地址则跳转到``` error.html ``` 上。 48 | 49 | ```js 50 | function goUrl(config, timeoutMs) { 51 | fetch(config + `?t=${Date.now()}`) 52 | .then(response => response.json()) 53 | .then(routes => { 54 | var queries = parseQueryString(location.search.substring(1)) 55 | var key = queries['r'] 56 | var url = routes[key]; 57 | if (!url) 58 | url = '/error.html'; 59 | console.log(`${key} redirecting to ${url}`); 60 | setTimeout(function () { 61 | window.location.href = url 62 | }, timeoutMs) 63 | }) 64 | .catch(error => { 65 | console.log(error); 66 | }); 67 | } 68 | ``` 69 | ## 最终效果 70 | 71 | 来看看最终效果吧,逻辑不复杂,虽然并不完美但也是实现了需要的功能。 72 | 73 | 74 | 75 | 76 | 77 | 78 | #### 参考网页 79 | 80 | 1. 《不必复杂,静态博客也可以做短链》 -------------------------------------------------------------------------------- /_posts/2021-11-21-effective-search.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "如何高效地搜索" 4 | subtitle: "How to search effective online" 5 | description: "信息爆炸时代,有价值的信息淹没在浩如烟海的噪音中,如何高效地获得所需要的信息也就成为当今时代所必须要掌握的一项技能" 6 | date: 2021-11-21 +0800 7 | update: 2022-08-01 10:00 +0800 8 | author: "ypingcn" 9 | header-img: "img/home-bg-Sm5ceH.webp" 10 | header-mask: 0.3 11 | catalog: true 12 | tags: 13 | - 教程 14 | --- 15 | 16 | 17 | 你一定会有这样的经历,在为了查找某个内容,输入一个关键词的时候,展现在你面前的内容有很多是毫无相关的页面、视频,甚至更过分的是广告和诈骗。在当今信息爆炸时代,有价值的信息淹没在浩如烟海的噪音中,如何高效地获得所需要的信息也就成为当今时代所必须要掌握的一项技能。 18 | 19 | 《如何阅读一本书》这种经典或许能给我们一点启示。书中举了不同的例子讲述了作者自己是如何阅读书籍的,同样,我们在网上搜索的时候也是需要一点技巧来提高效率的。下面几个是我个人最近在网上搜索内容时候的一点总结,希望也能给你有所启示。 20 | 21 | 搜索可以分为三步走 22 | 23 | - 找什么(准确描述自己想要的搜索目标) 24 | - 哪里找(使用哪个工具找) 25 | - 怎么找(掌握搜索指令) 26 | 27 | ## 一 找什么? 28 | 29 | 找什么是最最重要的环节,每次搜索都是有一个特定的需求。在确定搜索词的时候有这几个可以考虑的。 30 | 31 | ### 1.1 口语化转为关键词 32 | 33 | 过于口语化的用词会降低优质内容出现的概率。能精简成几个关键词能更准确地找到需要的信息。 34 | 35 | 例如「怎么才能把图片保存到手机上」可以用「保存图片 手机」两个关键词代替。 36 | 37 | 当然,这一点也不是一定要每次都这样做,因为网上有很多问答平台,也是有一定概率找到内容的,就是内容良莠不齐。 38 | 39 | ### 1.2 使用近义词 40 | 41 | 每一个人在表达的时候的用词都是不一样的,用相近含义的词语可能有意想不到的效果。 42 | 43 | ## 二 哪里找? 44 | 45 | 46 | 提高搜索效率首先要武装我们搜索的工具,一个顺手的工具能让我们事半功倍。在网上搜索的时候,我们与网页之间的工具便是浏览器。虽然工具不能真正帮我们找到想要的内容,但是正确的配置可以提前过滤掉不需要的广告噪音和诈骗等风险。 47 | 48 | ### 2.1 先过滤广告 49 | 50 | [《浏览器插件推荐》](/special/firefox/addons/) 中也曾介绍过 ```uBlock Origin``` 这个插件,安装过后效果立竿见影,过滤了很多不需要的内容,离想要的结果更近了一步。 51 | 52 | 搜索时广告过滤开启关闭的效果对比 53 | 54 | 例如在搜索「浏览器」这个关键词的时候,如果没有开启广告过滤的话,前三个结果就是广告,而且第二、三个都是些 XXX 传媒出品的内容,派不上用场不说,安装后还有可能给我们的电脑带进来广告弹窗等其他隐患,效率高低立见。 55 | 56 | ### 2.2 不止「百度一下」 57 | 58 | 百度一下已经是大家对网上搜索的代名词了,但网上好用的搜索平台不只百度一个。在搜不到结果的时候不妨换一个网站。 59 | 60 | - 谷歌 Google(收录网站最多的) 61 | - 搜狗 Sogou (还支持搜索微信的内容) 62 | - 必应 Bing 63 | 64 | ### 2.3 下载 APP 获取 65 | 66 | 现在网上的内容更多的被不同的 APP 所瓜分,搜索引擎也不能完全获取到。在需要获取特定垂直内容的时候不妨使用 APP 找。这也是很多人第一反应就想到的。 67 | 68 | - 美食出行 --> 美团大众小红书等 69 | - 租房信息 --> 豆瓣安居客等 70 | - 游戏教程 --> 哔哩哔哩等 71 | 72 | ## 三 怎么找? 73 | 74 | 搜索引擎都有几个通用的命令可以帮助搜索,不妨记下来下次尝试使用~ 75 | 76 | ### 3.1 时间范围 77 | 78 | 在搜索引擎输入栏下方,通常会有个设置的小按钮,点击进去可以限制搜索时间范围。这样就可以按时间搜索对应的内容,对于时效性要求比较高的场景来说效果明显。 79 | 80 | ### 3.2 site 81 | 82 | ```site:www.qq.com XXX``` 这样就是限定在 ```qq.com``` 这个网站上搜索 ```XXX``` 的内容。常用在专业性比较强的网站上使用,效果等同于内部搜索。 83 | 84 | ### 3.3 filetype 85 | 86 | filetype 后面跟需要文件的后缀名,这点在搜索电子书的时候特别管用,例如 ```filetype:pdf``` 就是搜索 PDF 文件。 87 | 88 | ### 3.4 双引号 "" 89 | 90 | 用双引号引起来的词语表示在网页内容里是一定相连不能分开搜索的。例如「高效搜索」这样搜的话展示的内容大概率是按「高效」「搜索」的逻辑来的,「"高效搜索"」才会合并起来。 91 | 92 | 可以用在某些固定组合的词语搜索上。 93 | 94 | ### 3.5 减号 - 95 | 96 | 减号表示不要出现某个关键词,剔除无关内容。「网站 -百科」表示搜索包含「网站」但是不包含「百科」的网页。 97 | 98 | ### 3.6 inurl 99 | 100 | inurl 表示网址内一定要包含某个关键词,例如```inurl:os 下载``` 表示网址一定要有```os```这个词,且网页内容里有```下载```。这个方法用的比较少。 101 | 102 | ### 3.7 intitle 103 | 104 | intitle 跟 inurl 有相似的点,只不过限制的范围从网址变成了限制网页标题。这个方法会缩小搜索范围,不太建议使用。 105 | 106 | 107 | --- 108 | 109 | 以上希望能在你搜索的时候提供启示,找到自己想要找到的信息~ 110 | 111 | -------------------------------------------------------------------------------- /special/firefox/version.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Firefox 火狐浏览器版本差异(2025年) 4 | date: 2021-10-30 12:00 +0800 5 | update: 2024-12-26 09:00 +0800 6 | --- 7 | 8 | Firefox 火狐浏览器在 PC 电脑上主要分为 ```Nightly``` --> ```Beta``` --> ```Release``` --> ```ESR``` 四个版本,每个版本都会在上一个版本稳定之后按计划进入下一个版本。由前往后,更新频率逐步降低,但稳定性逐步上升。不同版本的区别除去 Logo 样式上的不同,更多的是为了满足不同的需要,不同版本有不同版本的侧重点。 9 | 10 | > 以下版本均支持安装插件(又称拓展) 拓展推荐 ~ 11 | 12 | ## 一、Nlightly 每夜构建版 13 | 14 | Firefox 火狐浏览器 Nightly 15 | 16 | --- Firefox 火狐浏览器 Nightly, @Mozilla Copyright --- 17 | 18 | --- 19 | 20 | Nightly 版的 Logo 是十分鲜艳的紫色,表明这个版本是十分不稳定的,需要用户留意。 21 | 22 | 最新的开发成果每天在 Nightly 版本中更新(称为每夜构建版,因为构建时间大概是在晚上),这个版本更新非常频繁几乎是一天一更,用起来可能有各种各样的问题。有趣的事这个版本偶尔会有开发者埋下的彩蛋(例如替换 Logo )。 23 | 24 | 这个版本适合追求新功能,不在意浏览器稳定性的用户。 25 | 26 | ## 二、Beta/Develpoer 公开测试版 27 | 28 | Firefox 火狐浏览器 Beta 29 | 30 | --- Firefox 火狐浏览器 Beta, @Mozilla Copyright --- 31 | 32 | Firefox 火狐浏览器 Developer 33 | 34 | --- Firefox 火狐浏览器 Developer, @Mozilla Copyright --- 35 | 36 | --- 37 | 38 | 进入公开测试版后,Logo 颜色相应变浅,体现出版本具备一定的稳定性。 39 | 40 | 在 Nightly 每夜构建版发布后一段时间便会进 Beta 和 Develper 两个版本中。Beta 意为公开测试版,Develper 是面向开发者的测试版本,自带有许多针对前端开发的功能。 41 | 42 | 这两个版本适合前端开发者,或者想要尝试新功能但对稳定性有一定要求的用户。 43 | 44 | Developer 版本官方介绍 45 | 46 | ## 三、Release 正式发布版本 47 | 48 | Firefox 火狐浏览器 49 | 50 | --- Firefox 火狐浏览器, @Mozilla Copyright --- 51 | 52 | --- 53 | 54 | 一般是一个月时间后,在前面两个版本稳定后一段时间内便会进正式版本。正式版的 Logo 中颜色变回火狐的传统红,也不带有任何标识,是对外宣传使用的版本。 55 | 56 | ## 四、ESR 长期支持版 57 | 58 | 因为部分用户需要保持稳定,几个月或者更长的时间才会更新一次软件版本。于是便有了 ESR(Extended Support Release 长期支持)版本,前面提到的便称为 Rapid Release 快速发布版。 59 | 60 | 上面提到的不同版本更新节奏均可以在 Mozilla wiki 中的「发行计划」 Firefox Trains 中查询到 61 | 62 | --- 63 | 64 | **更多阅读** 65 | 66 | 88 | -------------------------------------------------------------------------------- /special/firefox/edition-faq.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Firefox 火狐浏览器【国际版】与【谋智中国版】的区别(2025年) 4 | description: 详尽解析 Firefox 国际版与火狐谋智版的主要区别。了解两款浏览器的特点,帮助您做出更明智的选择。 5 | date: 2023-01-28 11:20 +0800 6 | update: 2025-07-28 12:30 +0800 7 | --- 8 | 9 | ## 谋智中国版将于 2025 年 9 月 29 日后停止运营 10 | 11 | 2025 年 5 月 8 日,Mozilla 与北京谋智火狐信息技术有限公司达成一致,北京谋智火狐信息技术有限公司将不再运营 Firefox 浏览器及任何与 Firefox 有关的中国大陆业务。 12 | 13 | 因此,北京谋智火狐信息技术有限公司将于 2025 年 9 月 29 日后,正式终止与 Mozilla 及 Firefox 浏览器相关的中国大陆运营。Firefox 浏览器将在中国大陆继续可用并保持全部功能。 14 | 15 | ## 一. 国际版与谋智版的区分 16 | 17 | Firefox 火狐浏览器现在有官方国际版和谋智(火狐中国版)两个版本。他们下载的地址、维护主体、访问内容和浏览体验都是不一样的。 18 | 19 | 从个人的细节体验而言更推荐使用官方国际版。 20 | 21 | 首先先明确一下关于国际版火狐浏览器官网的问题 22 | 23 | 问题:哪个是国际版火狐浏览器的官方网站:```firefox.com.cn``` 还是 ```mozilla.org```? 24 | 答案:```mozilla.org```! 25 | 26 | ------ 27 | 28 | ### 1. 网站标题不同 29 | 30 | 【✔推荐】国际版网页标题是 —— ```下载由 Mozilla 开发的桌面版 Firefox``` 31 | 32 | 【❌不推荐】谋智版的网站标题是 —— ```Firefox 火狐浏览器 - 全新、安全、快速 | 官方最新下载``` 33 | 34 | ------ 35 | 36 | ### 2. 网站显示的配图和文案不同 37 | 38 | 【✔推荐】国际版网页文案是 —— ```没有晦涩难懂的隐私保护政策,更不向广告商预留后门,纯粹是一款闪电般快、不会出卖您的浏览器。``` 39 | 40 | 【❌不推荐】谋智版的网站标题是 —— ```没有晦涩难懂的隐私保护政策,更不向第三方预留后门,纯粹是一款闪电般快、不会出卖您的浏览器。``` 41 | 42 | 区别在于```广告商```和```第三方```,文案的变化表明谋智版是大概率包含推广广告的。 43 | 44 | ------ 45 | 46 | 【✔推荐】国际版网页右侧的配图是包含英文文章和国外网站。 47 | 48 | 【❌不推荐】谋智版网页右侧的配图是包含著名的国内网站,特别是```京东```/```爱淘宝``` 等购物网站。 49 | 50 | 这类网站在购物节的时候相关的推广广告是比较多的,展示出来是否是暗示谋智版与这些网站有合作进而投放广告呢? 51 | 52 | ------ 53 | 54 | ### 3. 点击【下载其他平台与语言版本】后的选项不同 55 | 56 | 从首页左侧【下载Firefox】按钮下方,点击【下载其他平台与语言版本】后进入的页面可以下载 Firefox 浏览器的不同版本。 57 | 58 | 【✔推荐】国际版能选择```Firefox```、```Firefox Beta```、```Firefox开发者版``` 、```Firefox Nightly``` 、```Firefox延长支持版``` 、``` Firefox Android``` 、``` Firefox Android Beta``` 、``` Firefox Android Nightly``` 、```Firefox iOS版本```九大类,且支持选择其他语言。 59 | 60 | 【❌不推荐】国内版仅能选择```Firefox```、```Firefox延长支持版``` 、``` Firefox Android``` 、```Firefox iOS版本```四大类,且无法选择其他语言。 61 | 62 | 不确认自己适合哪个版本的可以在 《Firefox 火狐浏览器各版本区别》 文章中了解更多差异和改动。个人使用还是推荐 ``` Firefox延长支持版 ``` 或者 ``` Firefox ``` 这两个更为稳定的版本。 63 | 64 | ------ 65 | 66 | ### 4. 从下载页面的【顶部栏】判断 67 | 68 | 不同下载页面的顶部栏具有非常明显的可区分性。 69 | 70 | 【✔推荐】国际版的顶部栏是用黑白底形如```moz://a```,暗含mozilla之义。 71 | 可以选择的入口有``` Firefox 浏览器```、``` 产品 ``` 、``` 认识我们 ``` 、``` 创新 ``` 四大类。 72 | 73 | 【❌不推荐】国内版的顶部栏是火狐浏览器的图标。 74 | 可以选择的入口有``` Firefox 浏览器```、``` 认识我们 ``` 两个。 75 | 76 | ------ 77 | 78 | ### 5. 从下载页面的【底部栏】判断 79 | 80 | 不同下载页面的底部栏说明了网站的运营主体。 81 | 82 | 【✔推荐】国际版的底部栏注明的是```Mozilla 基金会```,这家基金会是火狐浏览器的开发和运营主体。 83 | 地址栏和底部右侧支持不同语言的切换(```zh-CN```代表简体中文)。 84 | 开发者一栏中有其他版本的火狐浏览器选项入口。 85 | 86 | ``` 87 | 欢迎访问 Mozilla Corporation 的非营利母公司 — Mozilla 基金会。 88 | 上述内容中的某些部分系 mozilla.org 志愿者个人版权所有(©1998–2024)。内容可按知识共享许可协议使用。 89 | ``` 90 | 91 | 【❌不推荐】而国内版是一家商业公司,是国内的代理公司。 92 | 底部右侧不支持其他语言的切换。 93 | 开发者一栏中没有其他版本的火狐浏览器选项入口。 94 | 95 | ``` 96 | 北京谋智火狐信息技术有限公司 版权所有. 97 | ``` 98 | 99 | ------ 100 | 101 | ### 6. 从下载后的版本信息判断 102 | 103 | 在浏览器的版本信息中查看:路径是 【菜单】 -> 【帮助】 -> 关于 如果在弹出的页面中包含「北京谋智网络技术有限公司」「谋智」等字眼,那就是下载到了国内代理的特殊版本,需要调整使用为国际版。 104 | 105 | 下图是国际版的一个关于截图。 106 | 107 | Firefox 火狐浏览器 Nightly 版关于页面 108 | 109 |
--- Firefox 火狐浏览器 Nightly 版中文版关于页面 ---
110 | 111 | ### 7. 从浏览器界面判断 112 | 113 | 国际版在地址栏中间是没有二维码按钮的,二维码是由插件功能提供的而不是自带功能。从这一点界面上的区别也可以简单快速地判断出。 -------------------------------------------------------------------------------- /css/syntax.css: -------------------------------------------------------------------------------- 1 | /* to make lines scroll instead of wrap */ 2 | /* from http://stackoverflow.com/a/23393920 */ 3 | 4 | .highlight pre code * { 5 | white-space: nowrap; // this sets all children inside to nowrap 6 | } 7 | 8 | .highlight pre { 9 | overflow-x: auto; // this sets the scrolling in x 10 | } 11 | 12 | .highlight pre code { 13 | white-space: pre; // forces to respect
 formatting
14 | }
15 | 
16 | 
17 | /*
18 |  * GitHub style for Pygments syntax highlighter, for use with Jekyll
19 |  * Courtesy of GitHub.com
20 |  */
21 | 
22 | .highlight pre, pre, .highlight .hll { background-color: #f8f8f8; border: 1px solid #ccc; padding: 6px 10px; border-radius: 3px; }
23 | .highlight .c { color: #999988; font-style: italic; }
24 | .highlight .err { color: #a61717; background-color: #e3d2d2; }
25 | .highlight .k { font-weight: bold; }
26 | .highlight .o { font-weight: bold; }
27 | .highlight .cm { color: #999988; font-style: italic; }
28 | .highlight .cp { color: #999999; font-weight: bold; }
29 | .highlight .c1 { color: #999988; font-style: italic; }
30 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic; }
31 | .highlight .gd { color: #000000; background-color: #ffdddd; }
32 | .highlight .gd .x { color: #000000; background-color: #ffaaaa; }
33 | .highlight .ge { font-style: italic; }
34 | .highlight .gr { color: #aa0000; }
35 | .highlight .gh { color: #999999; }
36 | .highlight .gi { color: #000000; background-color: #ddffdd; }
37 | .highlight .gi .x { color: #000000; background-color: #aaffaa; }
38 | .highlight .go { color: #888888; }
39 | .highlight .gp { color: #555555; }
40 | .highlight .gs { font-weight: bold; }
41 | .highlight .gu { color: #800080; font-weight: bold; }
42 | .highlight .gt { color: #aa0000; }
43 | .highlight .kc { font-weight: bold; }
44 | .highlight .kd { font-weight: bold; }
45 | .highlight .kn { font-weight: bold; }
46 | .highlight .kp { font-weight: bold; }
47 | .highlight .kr { font-weight: bold; }
48 | .highlight .kt { color: #445588; font-weight: bold; }
49 | .highlight .m { color: #009999; }
50 | .highlight .s { color: #dd1144; }
51 | .highlight .n { color: #333333; }
52 | .highlight .na { color: teal; }
53 | .highlight .nb { color: #0086b3; }
54 | .highlight .nc { color: #445588; font-weight: bold; }
55 | .highlight .no { color: teal; }
56 | .highlight .ni { color: purple; }
57 | .highlight .ne { color: #990000; font-weight: bold; }
58 | .highlight .nf { color: #990000; font-weight: bold; }
59 | .highlight .nn { color: #555555; }
60 | .highlight .nt { color: navy; }
61 | .highlight .nv { color: teal; }
62 | .highlight .ow { font-weight: bold; }
63 | .highlight .w { color: #bbbbbb; }
64 | .highlight .mf { color: #009999; }
65 | .highlight .mh { color: #009999; }
66 | .highlight .mi { color: #009999; }
67 | .highlight .mo { color: #009999; }
68 | .highlight .sb { color: #dd1144; }
69 | .highlight .sc { color: #dd1144; }
70 | .highlight .sd { color: #dd1144; }
71 | .highlight .s2 { color: #dd1144; }
72 | .highlight .se { color: #dd1144; }
73 | .highlight .sh { color: #dd1144; }
74 | .highlight .si { color: #dd1144; }
75 | .highlight .sx { color: #dd1144; }
76 | .highlight .sr { color: #009926; }
77 | .highlight .s1 { color: #dd1144; }
78 | .highlight .ss { color: #990073; }
79 | .highlight .bp { color: #999999; }
80 | .highlight .vc { color: teal; }
81 | .highlight .vg { color: teal; }
82 | .highlight .vi { color: teal; }
83 | .highlight .il { color: #009999; }
84 | .highlight .gc { color: #999; background-color: #EAF2F5; }
85 | 


--------------------------------------------------------------------------------
/_posts/2023-12-31-implementation-linkmic-pk-voiceroom.markdown:
--------------------------------------------------------------------------------
  1 | ---
  2 | layout: post
  3 | title:  "连麦、PK和语音房的实现设计思路"
  4 | subtitle: "implementation of linkmic pk and voice room"
  5 | description: "连麦、PK和语音房的实现设计思路记录"
  6 | date:   2023-12-31 +0800
  7 | update: 2024-11-17 12:00 +0800
  8 | author:     "ypingcn"
  9 | header-img: "img/home-bg-Sm5ceH.webp"
 10 | header-mask: 0.3
 11 | catalog:    true
 12 | tags:
 13 |     - 技术
 14 |     - 后端
 15 |     - 微服务
 16 | ---
 17 | 
 18 | 连麦 PK 是秀场直播中的一个重要核心玩法。而语音房同样包含众多的连麦操作。这三类都是不同的角色在自己位置上的行为。
 19 | 
 20 | > 本文意在对已有功能实现的总结和思考,对比中思考改进点
 21 | 
 22 | 故在此,对这三类场景的数据管理实现上,总结一下相同点与不同点。
 23 | 
 24 | ## 存储位置状态数据
 25 | 
 26 | 首先,PK 可以理解成是连麦上再次叠加的一层玩法,按照这种逻辑,双人 PK 则是需要双人连麦成功后才有的玩法。按照不同的连麦类型可以分成双人连麦和多人连麦,这两种分法,核心的本质在于一场连麦中的人数是```2```还是```N```,这个具体数字只需要在发起时确认即可。为统一讨论实现方案,后续仅讨论多人连麦。
 27 | 
 28 | 其次,语音房是一种包含 8 个人或者 10 个人的位置状态管理,与连麦相比,这个位置信息不需要包含画面相关的信息,取而代之的是说话中的“声纹”。所以连麦和语音房的位置状态数据共同点,至少包含是否有人上座、用户ID的两个基础信息。
 29 | 
 30 | 再者可以按以下逻辑,抽象出相关的信息存储——
 31 | 
 32 | ``` 用户->场次的索引、场次->所有位置信息的数据 ```
 33 | 
 34 | 那么,第一个实现上的差别就产生了,如何存储所有的位置信息并保证其准确性?以下是两个做法
 35 | 
 36 | ### 文档型存储
 37 | 
 38 | 这里的文档型存储,是类比“文档型数据库”的一种说法。将所有位置数据都抽象到同一个 json 或者其他序列化后的文本中,数据库辅以版本号进行管理。每次位置更新,只需要取出对应的版本号和位置数据,更新位置数据后用乐观锁同步到数据库中,同步失败则```有限次```地重复之前步骤重试。
 39 | 
 40 | 连麦会话中的位置信息管理使用了本思路来处理,这样做的好处在于后续可扩展性高,有需要新增的字段数据只需要直接添加,不需要额外的改动。
 41 | 
 42 | #### 数据结构设计
 43 | 
 44 | 1. **位置信息文档**:
 45 |    
 46 | 	* 用户ID (`user_id`)
 47 | 	* 场次ID (`session_id`)
 48 | 	* 是否有人上座 (`is_occupied`)
 49 | 	* 其他相关信息(如声纹信息、时间戳等)
 50 | 	* 版本号 (`version`):用于乐观锁同步
 51 |   
 52 | 2. **场次文档**:
 53 |    
 54 | 	* 场次ID (`session_id`)
 55 | 	* 场次名称 (`session_name`)
 56 | 	* 开始时间 (`start_time`)
 57 | 	* 结束时间 (`end_time`)
 58 | 	* 当前版本号 (`version`):用于记录场次的最新版本
 59 | 
 60 | #### 操作流程
 61 | 
 62 | 1. **创建场次**:
 63 |    
 64 | 	* 在场次文档中插入一条新的记录,并初始化版本号。
 65 |   
 66 | 2. **用户加入场次**:
 67 |    
 68 | 	* 在位置信息文档中插入一条新的记录,关联用户ID和场次ID,并初始化版本号。
 69 |   
 70 | 3. **更新位置信息**:
 71 |    
 72 | 	* 读取位置信息文档的当前版本号。
 73 | 	* 更新位置信息文档中的数据。
 74 | 	* 使用乐观锁同步更新到数据库中,即比较版本号是否一致。如果不一致,则重试有限次数。
 75 |   
 76 | 4. **查询位置信息**:
 77 |    
 78 | 	* 直接读取位置信息文档中的数据,并根据需要关联其他相关信息(如用户信息、场次信息等)。
 79 | 
 80 | #### 优点
 81 | 
 82 | * **可扩展性高**:新增字段数据只需要直接添加到位置信息文档中,不需要额外的改动。
 83 | * **实现简单**:相对于关系型存储,文档型存储的实现更为简单直观。
 84 | * **性能较好**:对于读多写少的场景,文档型存储的性能表现较好。
 85 | 
 86 | #### 缺点
 87 | 
 88 | * **数据一致性**:由于使用乐观锁进行同步更新,可能存在一定的数据不一致风险。
 89 | * **查询效率**:对于复杂查询和数据分析,文档型存储的效率可能不如关系型存储。
 90 | * **存储空间**:由于存储的是序列化后的 JSON 数据,相对于关系型存储可能会占用更多的存储空间。
 91 | 
 92 | ### 关系型存储
 93 | 
 94 | 关系型存储则更侧重于结构化数据的存储和管理。在关系型数据库中,可以将位置信息拆分为多个表,例如用户表、场次表和位置信息表,通过外键关联这些表。每次位置更新,需要执行 SQL 语句来更新相关表中的数据,并通过事务来保证数据的一致性。
 95 | 
 96 | 关系型存储的优点在于数据结构清晰,查询效率高,适合复杂查询和数据分析。但是,关系型存储的可扩展性相对较差,新增字段可能需要修改表结构。
 97 | 
 98 | 以下是关系型存储在语音房中的技术细节实现文档:
 99 | 
100 | ### 关系型存储表结构设计
101 | 
102 | 1. 用户表(users)
103 |    - user_id (主键)
104 |    - username
105 |    - email
106 |    - ...
107 | 
108 | 2. 场次表(sessions)
109 |    - session_id (主键)
110 |    - session_name
111 |    - start_time
112 |    - end_time
113 |    - ...
114 | 
115 | 3. 位置信息表(positions)
116 |    - position_id (主键)
117 |    - user_id (外键,关联用户表)
118 |    - session_id (外键,关联场次表)
119 |    - is_occupied (是否有人上座)
120 |    - voiceprint (声纹信息)
121 |    - ...
122 | 
123 | ### 关系型存储操作流程
124 | 
125 | 1. 创建场次:插入一条新的记录到场次表中。
126 | 2. 用户加入场次:插入一条新的记录到位置信息表中,并关联用户表和场次表。
127 | 3. 更新位置信息:执行 SQL 语句更新位置信息表中的数据。
128 | 4. 查询位置信息:执行 SQL 语句查询位置信息表中的数据,并关联用户表和场次表。
129 | 
130 | ### 关系型存储优缺点
131 | 
132 | 优点:
133 | - 数据结构清晰,易于理解和维护。
134 | - 查询效率高,适合复杂查询和数据分析。
135 | - 数据一致性好,通过事务保证数据的一致性。
136 | 
137 | 缺点:
138 | - 可扩展性较差,新增字段可能需要修改表结构。
139 | - 相对于文档型存储,关系型存储的性能较低。
140 | 


--------------------------------------------------------------------------------
/notes/Python/django-models.md:
--------------------------------------------------------------------------------
  1 | ---
  2 | layout: page
  3 | title:  Django 中的 models
  4 | update: 2017-07-16 22:01 +0800
  5 | ---
  6 | 
  7 | ## 概述
  8 | 
  9 | models 用来创建数据库表。创建后运行以下命令迁移数据方可使用
 10 | 
 11 | ```python
 12 | python manage.py makemigrations
 13 | python manage.py migrate
 14 | ```
 15 | 
 16 | ```python
 17 | python manage.py dumpdata appname > appname.json
 18 | python manage.py loaddata appname.json
 19 | ```
 20 | 
 21 | ## 字段
 22 | 
 23 | 一个 models 的结构大致如下
 24 | 
 25 | ```python
 26 | from django.db import models
 27 | class test(models.Model):
 28 |     a1 = models.AutoField(primary_key=True)
 29 |     a2 = models.CharField(max_length=100)
 30 | ```
 31 | 
 32 | 其中的```AutoField``` ``` CharField ``` 就是字段,定义了数据库中存储数据的类型
 33 | 
 34 | django 有丰富的字段可供选择。
 35 | 
 36 | 在 django 的文档中可以查询到更为具体的内容
 37 | [《Model field reference | Django documentation | Django》](https://docs.djangoproject.com/en/dev/ref/models/fields/#model-field-types)
 38 | 
 39 | ## 参数
 40 | 
 41 | 上面例子中的```primary_key=True``` ``` max_length=100 ```  便是对字段进行限制的参数。
 42 | 
 43 | ```
 44 | 1.null=True 数据库中该字段可为空
 45 | 2.blank=True django 的 admin 添加数据时可留空
 46 | 3.YEAR_IN_SCHOOL_CHOICES = (
 47 |     ('FR', 'Freshman'),
 48 |     ('SO', 'Sophomore'),
 49 |     ('JR', 'Junior'),
 50 |     ('SR', 'Senior'),
 51 |     ('GR', 'Graduate'),
 52 | )
 53 | example = models.CharField(choice = YEAR_IN_SCHOOL_CHOICES) 选项
 54 | 4.default = 0 默认值为0
 55 | 5.primary_key = True 主键
 56 | 6.unique = True 不允许重复
 57 | ```
 58 | 
 59 | 这些只是个例子,更多解释还是要看文档,filed options 部分 [《Models | Django documentation | Django》](https://docs.djangoproject.com/en/dev/topics/db/models/#field-options)
 60 | 
 61 | ## 表间关系
 62 | 
 63 | 数据表之间可以有以下几个关系
 64 | 
 65 | ```
 66 | 一对多:models.ForeignKey(其他表)
 67 | 多对多:models.ManyToManyField(其他表)
 68 | 一对一:models.ManyToManyField(其他表)
 69 | ```
 70 | 
 71 | 创建上跟之前的没有多大的区别,举个例子:
 72 | 
 73 | ````python
 74 | class people(models.Model):
 75 |     name = models.CharField(max_length=100)
 76 |     age = models.models.IntegerField()
 77 |     
 78 | class boy(models.Model):
 79 |     n = models.ForeignKey(people)
 80 | ````
 81 | 
 82 | ## 数据操作
 83 | 
 84 | ```python
 85 | from .models import *
 86 | #增
 87 | people.objects.get_or_create(name="1")
 88 | #删
 89 | people.objects.all().delete()
 90 | #改
 91 | people.objects.filter(name="1").update(name="2")
 92 | #查
 93 | people.objects.get(name="1") #单条数据
 94 | people.objects.filter(name="1") #特定数据,不一定是一条(例子不是很好)
 95 | #数据个数
 96 | a = people.objects.filter(name="1")
 97 | len(a)
 98 | people.objects.filter(name="1").count()
 99 | #范围
100 | people.objects.filter(age__range=[0,100])
101 | #包含
102 | people.objects.filter(name__contains="1")
103 | #排序
104 | people.objects.all().order_by('-age') #从大到小排序,要从小到大排则去掉负号
105 | #其他
106 | startswith istartswith endswith iendswith
107 | ```
108 | 
109 | ## 管理
110 | 
111 | 在相应文件夹中的 ```admin.py``` 编辑好内容,就可以在管理界面中管理数据
112 | 
113 | ```python
114 | from django.contrib import admin
115 | 
116 | # Register your models here.
117 | 
118 | from  import models
119 | 
120 | admin.site.register(models.people)
121 | ```
122 | 
123 | 如果显示的是 xxx objects,可以这样弄使得数据更容易理解
124 | 
125 | ```python
126 | class test(models.Model):
127 |     #python2
128 |     def __unicode__(self):
129 |         return self.name
130 |     #python3
131 |     def __str__(self):
132 |         return self.name
133 | ```
134 | 
135 | ## 总结
136 | 
137 | django 的文档挺齐全的,上面也只是对我自己学习上的一个整理。
138 | 
139 | 参考:
140 | 
141 | [Django documentation | Django documentation | Django](https://docs.djangoproject.com/)
142 | 
143 | [Django中的页面管理后台](https://www.cnblogs.com/zknublx/p/5944779.html)
144 | 


--------------------------------------------------------------------------------
/notes/Https/LetsEncrypt.md:
--------------------------------------------------------------------------------
 1 | ---
 2 | layout: page
 3 | title:  Let's Encrypt 使用记录
 4 | date: 2017-07-15 21:30 +0800
 5 | update: 2021-11-19 22:56 +0800
 6 | ---
 7 | 
 8 | 随着网络技术的发展,原有的网络传输设计也遇到了各种问题。使用 HTTP 传输无法保证中间内容不会被第三方修改,所以便诞生了基于 HTTP 的 HTTPS 协议。多了一层虽然会给服务端增加额外的开销,但这对于用户而言是值得的,加上 HTTPS 是个明智的选择。各方都在鼓励网站向 HTTPS 方向进行改造,搜索引擎也对 HTTPS 的网站给予不同程度的加分。
 9 | 
10 | HTTPS 需要安装相关的证书,付费免费都能找到相应的服务商。而其中最有名的便是 Let's Encrypt 了,免费且能满足 HTTPS 的使用需求,连 Github Page 等服务都使用了 Let's Encrypt 的证书。这家的证书是使用一个叫 Certbot 的程序生成的。Certbot 是 Let's Encrypt 的官方工具。
11 | 
12 | 下面便是 Certbot 相关的安装使用记录——
13 | 
14 | ## 安装
15 | 
16 | 在网上找到的大部分是从源代码编译开始用的,找到一个 Certbot ,是用 PPA 装的软件,方便不少。
17 | 
18 | https://certbot.eff.org/
19 | 
20 | 以我自己的配置来说(Ubuntu 16.04 + Nginx),安装的命令是这样的:
21 | 
22 | ```
23 | $ sudo apt-get update
24 | $ sudo apt-get install software-properties-common
25 | $ sudo add-apt-repository ppa:certbot/certbot
26 | $ sudo apt-get update
27 | $ sudo apt-get install python-certbot-nginx 
28 | ```
29 | 
30 | 具体命令,在上面的链接中正确选择好就会显示。
31 | 
32 | ## 相关文件生成
33 | 
34 | 运行 ``` sudo letsencrypt certonly ```
35 | 
36 | 提示选择验证的方式。
37 | 
38 | ```
39 | How would you like to authenticate with the ACME CA?
40 | 1: Spin up a temporary webserver (standalone)
41 | 2: Place files in webroot directory (webroot)
42 | Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 
43 | ```
44 | 
45 | 因为是个人向的网站,没有太多可用性的要求,便选择 1 。(standalone 和 webroot 的区别在于,standalone 是用服务器的 80 / 443 端口验证的,需要暂停所在机器的服务,而 webroot 是在网站根目录下生成一个特殊的文件夹,通过 Certbot 的官方服务器发出请求,判断是否能验证成功 )
46 | 
47 | 之后终端中便会提示要求输入域名。
48 | 
49 | ```Please enter in your domain name(s) (comma and/or space separated)  (Enter 'c' to cancel):```
50 | 
51 | 
52 | 输入且验证成功后,如出现类似于以下内容就是正确生成证书了。
53 | 
54 | ```
55 | IMPORTANT NOTES:
56 |  - Congratulations! Your certificate and chain have been saved at
57 |    /etc/letsencrypt/live/domain.com/fullchain.pem. Your cert will
58 |    expire on 2017-10-13. To obtain a new or tweaked version of this
59 |    certificate in the future, simply run certbot again. To
60 |    non-interactively renew *all* of your certificates, run "certbot
61 |    renew"
62 |  - If you like Certbot, please consider supporting our work by:
63 | 
64 |    Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
65 |    Donating to EFF:                    https://eff.org/donate-le
66 | 
67 | ```
68 | 
69 | 生成2048位 DH parameters:
70 | 
71 | ```
72 | sudo openssl dhparam -out /etc/ssl/certs/dhparams.pem 2048
73 | ```
74 | 
75 | ## 修改 Nginx 配置
76 | 
77 | 在 /etc/nginx/sites-enabled 下新建文件,添加以下内容
78 | 
79 | ```
80 | server {
81 |          listen 443 ssl;
82 |          server_name domain.com;
83 |          ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
84 |          ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
85 |          ssl_dhparam /etc/ssl/certs/dhparams.pem;
86 |          ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-A    ES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-S    HA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-    AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-S    HA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC    3-SHA';
87 |         ssl_prefer_server_ciphers on;
88 | }
89 | ```
90 | 
91 | 重启 Nginx 后即可生效,完成 HTTPS 证书的部署。
92 | 
93 | 


--------------------------------------------------------------------------------
/_posts/2022-10-14-user-attribute-service.md:
--------------------------------------------------------------------------------
  1 | ---
  2 | layout: post
  3 | title:  "简化开发逻辑的用户属性服务设计"
  4 | subtitle: "User attribute service implement for microservices"
  5 | description: "简化开发逻辑的用户属性服务设计,支持快速迭代上线减少编写重复代码"
  6 | date:   2022-10-14 +0800
  7 | update: 2022-11-03 20:30 +0800
  8 | author:     "ypingcn"
  9 | header-img: "img/home-bg-Sm5ceH.webp"
 10 | header-mask: 0.3
 11 | catalog:    true
 12 | tags:
 13 |     - 技术
 14 |     - 后端
 15 |     - 微服务
 16 | ---
 17 | 
 18 | ## 一、背景
 19 | 
 20 | 在实际业务场景中,有很多功能是支持用户自行设置决定开启关闭的。针对每个单独的设置分别编写代码是一种重复的劳动,可以把这部分的逻辑抽象出来减少重复开发。
 21 | 
 22 | 同样的服务端针对不同用户也会有不同的业务属性,如果每个属性只会有单一的KV逻辑的话,单独的数据操作代码也可以抽象出来提前封装好。
 23 | 
 24 | ## 二、接口设计
 25 | 
 26 | 数据管理上用 UID+Biz 为主键,用户传入的 KEY 为二级主键进行数据管理。
 27 | 
 28 | 最终的接口设计如下,主要是实现增删改查接口,增和改接口合并为 SET 接口支持同时处理两类。所有接口支持弱条件过滤,SET 接口支持判断旧值符合要求后再更新。
 29 | 
 30 | 设计对内接口和对外接口,以便对用户权限进行约束管理。
 31 | 
 32 | ```protobuffer
 33 |     // 划分场景
 34 |     struct UserAttributeBiz
 35 |     {
 36 |         kTEST = 1,
 37 |     };
 38 |     // 操作类似
 39 |     struct UserAttributeOpType
 40 |     {
 41 |         kSTRING = 1,     // 简单处理字符串类型(直接覆盖)
 42 |         kNUMBER = 2,     // 简单处理数字类型(直接覆盖)
 43 |         kNUMBER_ADD = 3, // 数字类型累加(负数为减)
 44 |     };
 45 |     // 属性值
 46 |     struct UserAttribute
 47 |     {
 48 |         0 optional string sKey;
 49 |         1 optional string sStrValue;   // 字符串类型值,默认为空
 50 |         2 optional long lNumValue;     // 数字类型值,默认为0
 51 |         3 optional long lTimestampSec; // 最后更新时间,设置时都不填
 52 |         // 如无必要,客户端调用设置接口时不支持、不设置以下后续字段
 53 |         4 optional int iOpType = 0;             // see alse @UserAttributeOpType
 54 |         5 optional int iHasOldStrValue = false; // 是否有旧值,SET/DEL 的时候填值将作为条件,GET 暂时用不到
 55 |         6 optional string sOldStrValue;
 56 |         7 optional long lExpireTimestamp = 0; // 失效时间(时间戳),设置时都不填
 57 |     };
 58 |     // 获取接口
 59 |     struct GetUserAttributeReq
 60 |     {
 61 |         0 optional User tUser;
 62 |         1 optional int iBiz = 0;
 63 |         2 optional vector vKeys; // 服务端留空则为获取全部。客户端禁止留空
 64 |     };
 65 |     struct GetUserAttributeRsp
 66 |     {
 67 |         0 optional int iCode;
 68 |         1 optional string sMessage;
 69 |         2 optional vector vItems;
 70 |     };
 71 |     // 设置接口
 72 |     struct SetUserAttributeReq
 73 |     {
 74 |         0 optional User tUser;
 75 |         1 optional int iBiz = 0;
 76 |         2 optional vector vItems;
 77 |         3 optional int iCheckKey = 1; // 检查 key 是否符合配置的内容。服务端有效,客户端必须开启。
 78 |         4 optional int iFetchNew = 0; // 返回更新后的最新值
 79 |     };
 80 | 
 81 |     struct SetUserAttributeRsp
 82 |     {
 83 |         0 optional int iCode;
 84 |         1 optional string sMessage;
 85 |         2 optional vector vItems;
 86 |     };
 87 |     // 删除接口
 88 |     struct DelUserAttributeReq
 89 |     {
 90 |         0 optional User tUser;
 91 |         1 optional int iBiz = 0;
 92 |         2 optional vector vItems; // 留空则删除全部
 93 |         3 optional int iCheckKey = 1;            // 检查 key 是否符合配置的内容
 94 |     };
 95 |     struct DelUserAttributeRsp
 96 |     {
 97 |         0 optional int iCode;
 98 |         1 optional string sMessage;
 99 |         // TODO 返回删除条数??
100 |     };
101 | ```
102 | 
103 | 同样结合之前博客提到的缓存应用,对于一致性要求不高的场景可以再封装一层合并查询+缓存的中间组件,提供给业务进行调用。组件实现的缓存 KEY 可以定义为 UID+BIZ+KEY 三个维度,多个 KEY 则拆分为不同缓存对象。
104 | 
105 | 实际应用上,直播及其相关场景中缓存组件能有 15% 到 60% 不等的命中率,削峰效果良好。
106 | 
107 | ## 三、优化点
108 | 
109 | 1. 力度更小的限制,目前实现的逻辑只实现了哪些业务 ID 的值对外开放 + 限制 KEY 的取值,没有约束 VALUE 的取值。
110 | 2. 支持更多灵活的 KV 取值判断逻辑,例如正则等。
111 | 3. 支持配置 KEY 在没有设置的时候返回默认值,不再默认返回空值。
112 | 4. 底层数据存储支持按不同的业务 ID 存储到不同的地方,实现底层数据隔离与安全,也方便在不同业务中的快速部署和迁移。
113 | 


--------------------------------------------------------------------------------
/_posts/2022-12-04-retirement-pension-plan.markdown:
--------------------------------------------------------------------------------
 1 | ---
 2 | layout: post
 3 | title:  "追「个人养老金」热点?不如多了解观望看看"
 4 | subtitle: "Retirement pension plan"
 5 | description: "个人养老金"
 6 | date:   2022-12-04 +0800
 7 | update: 2023-06-04 16:00 +0800
 8 | author:     "ypingcn"
 9 | header-img: "img/home-bg-Sm5ceH.webp"
10 | header-mask: 0.3
11 | catalog:    true
12 | tags:
13 |     - 生活
14 | ---
15 | 
16 | 最近有一个很火的话题便是个人养老金了,银行渠道的红包开户大力推广叠加「养老」的焦虑,个人养老金俨然成为最近的热点话题。年轻人对于养老问题都有提前规划的意识和规划(详见《这届年轻人,不到30岁就思考养老的事了》 - 腾讯新闻),那么个人养老金这项制度对于年轻人养老是否有所帮助呢?下面是我最近关于「个人养老金」的观察分析总结,在此与各位分享下。
17 | 
18 | ## 何为「个人养老金」?
19 | 
20 | 对于这个问题首先引用一段比较正式的文字来解释「个人养老金」项目
21 | 
22 | > 个人养老金是指政府政策支持、个人自愿参加、市场化运营、实现养老保险补充功能的制度。个人养老金实行个人账户制,缴费完全由参加人个人承担,自主选择购买符合规定的储蓄存款、理财产品、商业养老保险、公募基金等金融产品,实行完全积累,按照国家有关规定享受税收优惠政策。 
23 | 
24 | 很明显「个人养老金帐号」一个能享受国家税收优惠,旨在为养老设计的专用帐号,参与人按需自愿参加、自主选择购买相关产品。
25 | 
26 | 从目前已经公布的细节,「个人养老金」项目有以下几个特点:
27 | 
28 | 1. 目前仅有 36 个先行城市(地区)可以开通账户,可以购买的产品有「储蓄存款、理财产品、商业养老保险、公募基金」四类,与现有基本养老保险相比较是两笔钱,本质上还是一个**「```个人投资独立账户```」**,并没有任何保本保收益的承诺。
29 | 
30 | 2. 每个人每年能存入 12000 元,并作为个人所得税专项附加扣除额度(类似于现有的子女教育、住房贷款利息、住房租金和赡养老人等)享受后续税收返还。资金仅能在**「```达到退休年龄```」**这种长期的时间后取出来,对应的税率是 3%。所以对于不需要纳税/个人所得对应税率在3%的人,参与这个计划的意义不大。
31 | 
32 | 3. 对于年轻人群体而言选择「公募基金」更为适合,但现有品种只是各种养老目标基金,缺少国债、不同指数基金的选择,品种单一缺少分散风险的有效手段。
33 | 
34 | > 后续相关信息的更新,会放在 《财经文章收藏》 
35 | > 
36 | > 个人养老金可买的公募基金相关信息的更新,会放在 《中国公募基金发展大事记》 
37 | > 
38 | > 欢迎访问。
39 | 
40 | ## 作为养老第三支柱改变个人观念
41 | 
42 | 个人养老金也不是什么新鲜事,早已是养老的三大支柱之一:
43 | 
44 |  - 第一支柱是政府主导的基本养老保险。截止 2022 年,基本养老保险已覆盖近 10 亿人。
45 |  - 第二支柱是企业年金,主要是经济发达地区的企业自行设立的一个养老补充计划。2021年末,全国有 11.75 万户企业建立企业年金,参加职工 2875 万人。相对于第一支柱而言,能享受到第二支柱的人数是相对小部分。
46 |  - 第三支柱是个人养老金,主要是个人的资金自行投资规划。
47 | 
48 | 作为养老第三支柱的「个人养老金」,更多是一种理念上的改变和制度上的约束。对于我个人而言,```税收抵扣```+```银行开户红包```的吸引力有限,流动性差这点也比较劝退。但个人养老这件事上能引导个人从更长期限角度上来规划资金使用,为资金使用明确一个目标和相对期限,做一件长期模糊但又在正确方向上的事情。
49 | 
50 | 如果对自己自控力有信心的人,自己进行投资理财的计划已经是一份「个人养老金」了。不放心自己的人群,选择加入也是个好的选择,「个人养老金」从制度上“逆人性”地限制了资金的取出,投资期限也大幅延长,用税收优惠来慢慢培养长期的习惯。同样遵循「好资产 + 好价格 + 长期持有 = 慢慢增长」的原则来打理自己的金钱,为未来做保障。
51 | 
52 | 本质上而言「个人养老金」是一种现行基本养老保险的补充,对于以下人群参加个人养老金计划的意义不大:
53 | 
54 |  - 不需要纳税/年度个人所得在 13.6 万享受不到减税优惠的人群。
55 |  - 相信个人投资能力更强并且能真正长期实现的人群。
56 |  - 已有完善的养老计划的人群(如企业年金和商业保险足够用)
57 |  - 因为只能在退休后取出来,所以现在对资金流动性要求较高的人群不适合参加(如 20 多岁刚开始工作需要花钱的地方多时)
58 | 
59 | ## 养老金替代率
60 | 
61 | 养老金替代率是指退休以后领的养老金占之前工作时收入的比例。这个比例对于维持退休后的生活水平而言至关重要。
62 | 
63 | 举个例子而言,退休前每个月收入是 1 万,退休后领取养老金是 9000,那么替代率就是 90% ,这样子下来对于你后续生活质量而言不会特别大。而且人性而言是由奢入俭是非常困难的,替代率越低带来消极的影响会越大。
64 | 
65 | 现如今已退休一代人的养老金替代率是在国际平均水平以上,甚至还能出现退休工资倒挂先前工作收入的情况。但现在这代年轻人由于```统筹账户+人口结构变化```等因素,后续年轻人的养老金替代率会明显低于当前,所以越早准备越好,不能单指望退休后靠第一支柱过日子。
66 | 
67 | ## 构建自己的被动收入
68 | 
69 | 对于年轻人而言,父母养老问题来得更为迫切一点。有一句话说得好,“经济基础决定上层建筑”,物质条件会影响很多事情,所以趁年轻需要提前打好物质基础。
70 | 
71 | 上班是工业革命以来最主流的收入方式,那除去上班以外如何构建自己的“睡后收入”,利用好每个人最宝贵的时间呢,我看到这样的一句话或许能对你有所启发。
72 | 
73 | ```全面学习(认知杠杆)* 终身学习(时间杠杆)* 投资理财(财务杠杆) => 被动收入(人生杠杆)```
74 | 
75 | 或许「个人养老金」这项能作为一个财务杠杆,在时间的积累下打下更好的物质基础吧。
76 | 
77 | >  更多参考资料
78 | 
79 | 《E54 个人养老金账户有必要开吗?太有了|养老那些事儿 02》 
80 | 
81 | 《E65 我到底要不要开个人养老金账户?听完这期就懂了|我们和养老的距离 05》
82 | 
83 | 《「个人养老金」来了,我要参与吗?》
84 | 
85 | 
86 | 


--------------------------------------------------------------------------------
/notes/C/apue11-thread.md:
--------------------------------------------------------------------------------
 1 | ---
 2 | layout: page
 3 | title:  第十一章 线程
 4 | date: 2017-09-25 20:18 +0800
 5 | update: 2021-11-25 21:36 +0800
 6 | ---
 7 | 
 8 | 线程相关,主要是 pthread 里的函数
 9 | 
10 | ## 线程
11 | 
12 | ```cpp
13 | #include 
14 | 
15 | int pthread_equal(pthread_t __thread1, pthread_t __thread2)
16 | pthread_t pthread_self() 
17 | int pthread_create(pthread_t *restrict __newthread, const pthread_attr_t *restrict __attr, void *(*__start_routine)(void *), void *restrict __arg) 
18 | void pthread_exit(void *__retval)
19 | int pthread_join(pthread_t __th, void **__thread_return)
20 | int pthread_cancel(pthread_t __th)
21 | void pthread_cleanup_push(routine, arg)
22 | void pthread_cleanup_pop(int )
23 | ```
24 | 
25 | pthread_self() 返回线程本身的信息
26 | 
27 | pthread_create 接口中的函数参数分别对应 进程号、进程属性【NULL 后面讲】、开始的函数、函数参数
28 | 
29 | pthread_join 获取线程中执行结果的返回值
30 | 
31 | pthread_cancel 取消进程的其他线程,成功返回 0 ,反之是错误编号
32 | 
33 | pthread_cleanup_push 安排退出时需要调用的函数
34 | 
35 | ## 互斥量
36 | 
37 | ```cpp
38 | int pthread_mutex_init(pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr)
39 | int pthread_mutex_destory(pthread_mutex_t *__mutex, const pthread_mutexattr_t *__mutexattr)
40 | int pthread_mutex_lock(pthread_mutex_t *__mutex)
41 | int pthread_mutex_trylock(pthread_mutex_t *__mutex)
42 | int pthread_mutex_unlock(pthread_mutex_t *__mutex)
43 | int pthread_mutex_timedlock(pthread_mutex_t *restrict mutex,const struct timespec *restrict tsptr);
44 | ```
45 | 
46 | pthread_mutex_init 第二个参数使用NULL的默认参数,也可以直接赋值 PTHREAD_MUTEX_INITIALIZER
47 | pthread_mutex_destory 销毁互斥量
48 | pthread_mutex_timedlock 达到指定时间不加锁互斥量,并返回ETIMEOUT
49 | 
50 | ### 读写锁
51 | 
52 | ```cpp
53 | int pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr); //读写锁
54 | int pthread_rwlock_destory(pthread_rwlock_t * rwlock)
55 | int pthread_rdlock(pthread_rwlock_t * rwlock)
56 | int pthread_wrlock(pthread_rwlock_t * rwlock)
57 | int pthread_unlock(pthread_rwlock_t * rwlock)
58 | int pthread_rwlock_timedrdlock(pthread_rwlock_t * restrict rwlock,const struct timespec * restrict tsptr)
59 | 
60 | int pthread_rwlock_timedwlock(pthread_rwlock_t * restrict rwlock,const struct timespec * restrict tsptr)
61 | ```
62 | 
63 | pthread_rwlock_timedrdlock 和 pthread_rwlock_timedwlock 都是带超时的读写锁,其余函数没有超时的逻辑。
64 | 
65 | ### 条件变量
66 | 
67 | ```cpp
68 | int pthread_cond_init(pthread_cond_t *cv,const pthread_condattr_t *cattr);
69 | int pthread_cond_destory(pthread_cond_t * cond)
70 | int pthread_cond_wait(pthread_cond_t *restrict __cond, pthread_mutex_t *restrict __mutex)
71 | int pthread_cond_timedwait(pthread_cond_t *restrict __cond, pthread_mutex_t *restrict __mutex, const struct timespec *restrict __abstime)
72 | int pthread_cond_signal(pthread_cond_t *__cond)
73 | int pthread_cond_broadcast(pthread_cond_t *__cond)
74 | ```
75 | 
76 | ### 自旋锁
77 | 
78 | 自旋锁可以在线程不希望在重新调度上花费太多的时间的场景下使用
79 | ```cpp
80 | int pthread_spin_init(pthread_spinlock_t * lock,int pshared)
81 | // 第二个参数 PTHREAD_PROCESS_PRIVATE 只能被初始化该锁的进程访问 PTHREAD_PROCESS_SHARED 用于同步该进程和其他进程中的线程
82 | int pthread_spin_destory(pthread_spinlock_t * lock)
83 | int pthread_spin_lock(pthread_spinlock_t * lock)
84 | int pthread_spin_trylock(pthread_spinlock_t * lock)
85 | int pthread_spin_unlock(pthread_spinlock_t * lock)
86 | ```
87 | 
88 | ### 屏障 
89 | 
90 | 允许所有线程等待直到所有合作的线程都达到某一点 
91 | 【在init时指定n+1个等待,其中n是线程数。而在每个线程执行函数的首部调用wait()。这样100个pthread_create()结束后所有线程都停下来等待最后一个wait()函数被调用。这个wait()由主进程在它觉得合适的时候调用就好。最后这个wait()就是鸣响的起跑枪。】
92 | 
93 | ```cpp
94 | int pthread_barrier_init(pthread_barrier_t *restrict barrier, const pthread_barrierattr_t *restrict attr, unsigned count);
95 | int pthread_barrier_wait(pthread_barrier_t *barrier);
96 | int pthread_barrier_destroy(pthread_barrier_t *barrier);
97 | ```
98 | 
99 | pthread_barrier_init 中由 count 参数指定等待的线程数


--------------------------------------------------------------------------------
/special/firefox/mercury.md:
--------------------------------------------------------------------------------
 1 | ---
 2 | layout: page
 3 | title: Mercury 浏览器资源汇总(2025年)
 4 | description: 号称比原版 Firefox 浏览器性能优化 8%-20% 的 Mercury 浏览器,新一代高效安全的浏览器选择
 5 | date: 2025-08-17 15:00 +0800
 6 | update: 2025-11-14 10:30 +0800
 7 | ---
 8 | 
 9 | 根据官网说明,Mercury 浏览器【官网】是一款着重编译优化的 Firefox 火狐浏览器分支,并且集成了来自 LibreWolf、Waterfox 等多款优秀浏览器的隐私/安全性特性改动。
10 | 
11 | ## 亮点
12 | 
13 |  - Compiler optimizations include AVX, AES, LTO and PGO.
14 |  - 编译器优化包括 AVX、AES、LTO 和 PGO。
15 |  - Disable all telemetry and reporting.
16 |  - 禁用所有遥测和报告。
17 |  - Remove all debugging constructs and enable hardening by default.
18 |  - 移除所有调试结构,并默认启用加固功能。
19 |  - Enable backspace to go back, and GPU acceleration by default.
20 |  - 默认启用退格键回退功能和 GPU 加速。
21 |  - Enable Do Not Track and Global Privacy Control.
22 |  - 启用“勿追踪”和“全球隐私控制”。
23 |  - Disable Pocket, highlights, and suggested content on the new tab page.
24 |  - 禁用新标签页中的 Pocket、高亮和建议内容。
25 |  - Restore top bar to ~ESR78 state with home button and developer button.
26 |  - 恢复顶部栏至 ESR78 状态,包含主页按钮和开发者按钮。
27 |  - Allow installing unsigned extensions.
28 |  - 允许安装未签名的扩展。
29 |  - Branding changes  品牌更改
30 |  - Enable JPEG XL by default
31 |  - 默认启用 JPEG XL
32 |  - Implemented performance tweaks from BetterFox.
33 |  - 实施了 BetterFox 提供的一些性能优化。
34 |  - Disabled "Normandy", a component that allows Mozilla to alter extension configurations at will remotely. (bleh wtf is that)
35 |  - 禁用了“Normandy”,这是一个允许 Mozilla 远程随意更改扩展配置的组件。(真是烦人,这是什么)
36 | 
37 | Mercury 浏览器着重于改进易用性和增强隐私/安全性的补丁。基于原生 Firefox,在性能、安全性和易用性方面做进一步的优化,其中许多来自于 LibreWolf、Waterfox、FireDragon、PlasmaFox、Ghostery 和 GNU IceCat。
38 | 
39 | Mercury 浏览器在基准测试和不同操作系统上相比原生 Firefox 可提高 8%-20%的性能。
40 | 
41 | ## 编译器优化方式对比
42 | 
43 | 1. AVX(Advanced Vector Extensions):向量指令集优化
44 | 2. AES(Advanced Encryption Standard):加密指令集优化
45 | 3. LTO(Link-Time Optimization):链接时全局优化
46 | 4. PGO(Profile-Guided Optimization):Profile引导的动态优化
47 | 
48 | | 优化类型	 |         核心目标	          |           依赖条件            |       	适用场景        |
49 | | ---------- | -------------------------- | ---------------------------- | ---------------------- |
50 | | AVX        | 	利用向量指令提升数据并行性能 | 	CPU支持AVX指令集	             | 科学计算、多媒体处理     |
51 | | AES	     | 利用硬件指令加速加密解密	  | CPU支持AES指令集              | 加密库、安全协议         |
52 | | LTO	     | 跨文件全局优化	              | 编译器支持LTO                 | 大型项目、跨文件调用频繁  |
53 | | PGO        | 	基于运行时反馈的动态优化	  | 可收集真实运行场景的profile	 | 服务器应用、桌面程序     |
54 | 
55 | ## 下载方式
56 | 
57 | 访问【官网】,找到【Releases (Linux & Windows) 】的下载入口,根据 Windows 、MacOS 或 Linux 等操作系统选择下载~
58 | 
59 | ## 提醒
60 | 
61 | 个人开发者因精力有限,所开发浏览器往往更新频率低,甚至存在断更风险,其功能迭代、bug修复及安全补丁无法及时跟进,可能影响使用稳定性与安全性,建议谨慎将 Mercury 浏览器作为主力浏览器使用。
62 | 
63 | 截止 2025 年 08 月 18 日,作者 Alex313031 最近一次更新 Mercury 浏览器时间已经是 2024 年 09 月 17 日,间隔时间接近一年。
64 | 
65 | ---
66 | 
67 | **更多阅读**
68 | 
69 | 
91 | 


--------------------------------------------------------------------------------
/wiki/index.md:
--------------------------------------------------------------------------------
 1 | ---
 2 | layout: page
 3 | title:  帮助 FAQ
 4 | update: 2025-08-17 15:00 +0800
 5 | description: 博客的 FAQ 页面,记录博客所有模块的入口和常见问题的解答,希望能及时提供帮助。
 6 | linkeddata: {"@context":"http://schema.org","@type":"ItemList","numberOfItems":"9","itemListElement":[{"@type":"ListItem","position":1,"url":"https://blog.ypingcn.com/wiki/about/"},{"@type":"ListItem","position":2,"url":"https://blog.ypingcn.com/wiki/guestbook/"},{"@type":"ListItem","position":3,"url":"https://blog.ypingcn.com/wiki/copywriting-guidelines/"},{"@type":"ListItem","position":4,"url":"https://blog.ypingcn.com/special/firefox/resource/"},{"@type":"ListItem","position":5,"url":"https://blog.ypingcn.com/special/firefox/addons/"},{"@type":"ListItem","position":6,"url":"https://blog.ypingcn.com/special/firefox/version/"},{"@type":"ListItem","position":7,"url":"https://blog.ypingcn.com/special/firefox/theme/"},{"@type":"ListItem","position":8,"url":"https://blog.ypingcn.com/special/firefox/librewolf/"},{"@type":"ListItem","position":9,"url":"https://blog.ypingcn.com/special/fund/year-book/"}]}
 7 | not_show_copyright: true
 8 | not_show_ad: true
 9 | ---
10 | 
11 | 欢迎来到帮助 与 FAQ 页面!本页汇总了网站所有模块的入口和常见问题的解答。
12 | 
13 | 如果是使用电脑浏览器访问本页面,可以使用 ```Ctrl + F```快捷键搜索所需要的帮助。
14 | 
15 | ## 关于
16 | 
17 | # @关于本站 
18 | 
19 | # @留言联系 
20 | 
21 | ------
22 | 
23 | ## 博客
24 | 
25 | # @最新更新 
26 | 
27 | ------
28 | 
29 | ## 知识库
30 | 
31 | # @笔记目录 
32 | 
33 | # @LCTT 翻译记录 
34 | 
35 | # @中文排版指北 
36 | 
37 | ------
38 | 
39 | ## 专题
40 | 
41 | ### Firefox 火狐浏览器
42 | 
43 | # @Firefox 火狐浏览器插件推荐 
44 | 
45 | # @Firefox 火狐浏览器设置安全 DNS (DoH) ~
46 | 
47 | # @Firefox 火狐浏览器【国际版】与【谋智中国版】的区别 
48 | 
49 | # @Floorp 浏览器 ~
50 | 
51 | # @Librewolf 浏览器 ~
52 | 
53 | # @Waterfox 浏览器 ~
54 | 
55 | # @Zen 浏览器 ~
56 | 
57 | # @Mercury 浏览器 ~
58 | 
59 | # @Firefox 火狐浏览器资源汇总 
60 | 
61 | # @Firefox 火狐浏览器主题美化 ~
62 | 
63 | # @Firefox Trains,一个查看 Firefox 火狐浏览器不同渠道最新版本的网站 ~
64 | 
65 | # @Firefox 火狐浏览器版本差异 
66 | 
67 | # @Firefox 火狐浏览器相关网站汇总 ~
68 | 
69 | ### 基金
70 | 
71 | # @中国公募基金发展大事记 
72 | 
73 | ### KPOP
74 | 
75 | #《12月24日》- d.ear
76 | 
77 | #《Ah Puh》- IU
78 | 
79 | #《Drama》- IU
80 | 
81 | #《Eight》- IU x SUGA
82 | 
83 | #《被遗忘的季节》- IU
84 | 
85 | #《你的意义》- IU
86 | 
87 | #《秋日思绪》- Jannabi
88 | 
89 | #《致犹豫的恋人们》- Jannabi
90 | 
91 | #《November Rain》- Jannabi
92 | 
93 | #《좋은 사람 있으면 소개시켜줘 》- Joy
94 | 
95 | #《面具》- 安七炫
96 | 
97 | #《摇篮曲》- Jukjae(郑宰阮)


--------------------------------------------------------------------------------
/js/animatescroll.min.js:
--------------------------------------------------------------------------------
1 | /* Coded by Ramswaroop */
2 | (function(e){e.easing["jswing"]=e.easing["swing"];e.extend(e.easing,{def:"easeOutQuad",swing:function(t,n,r,i,s){return e.easing[e.easing.def](t,n,r,i,s)},easeInQuad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInOutQuad:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t+n;return-r/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,r,i){return r*(t/=i)*t*t+n},easeOutCubic:function(e,t,n,r,i){return r*((t=t/i-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t+n;return r/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeOutQuart:function(e,t,n,r,i){return-r*((t=t/i-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t*t+n;return-r/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,r,i){return r*(t/=i)*t*t*t*t+n},easeOutQuint:function(e,t,n,r,i){return r*((t=t/i-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t*t*t+n;return r/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,r,i){return-r*Math.cos(t/i*(Math.PI/2))+r+n},easeOutSine:function(e,t,n,r,i){return r*Math.sin(t/i*(Math.PI/2))+n},easeInOutSine:function(e,t,n,r,i){return-r/2*(Math.cos(Math.PI*t/i)-1)+n},easeInExpo:function(e,t,n,r,i){return t==0?n:r*Math.pow(2,10*(t/i-1))+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(-Math.pow(2,-10*t/i)+1)+n},easeInOutExpo:function(e,t,n,r,i){if(t==0)return n;if(t==i)return n+r;if((t/=i/2)<1)return r/2*Math.pow(2,10*(t-1))+n;return r/2*(-Math.pow(2,-10*--t)+2)+n},easeInCirc:function(e,t,n,r,i){return-r*(Math.sqrt(1-(t/=i)*t)-1)+n},easeOutCirc:function(e,t,n,r,i){return r*Math.sqrt(1-(t=t/i-1)*t)+n},easeInOutCirc:function(e,t,n,r,i){if((t/=i/2)<1)return-r/2*(Math.sqrt(1-t*t)-1)+n;return r/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,r,i){var s=1.70158;var o=0;var u=r;if(t==0)return n;if((t/=i)==1)return n+r;if(!o)o=i*.3;if(u
  2 | 
 49 | 
101 | 


--------------------------------------------------------------------------------
/notes/SQL/syntax.md:
--------------------------------------------------------------------------------
  1 | ---
  2 | layout: page
  3 | title:  SQL 基础语法
  4 | update: 2016-11-19 10:36 +0800
  5 | ---
  6 | 
  7 | SQL 的基础语法(select/insert/update/delete ...)
  8 | 
  9 | 参考资料
 10 | 
 11 | w3school [SQL教程](http://www.w3school.com.cn/sql/index.asp)
 12 | 
 13 | SQL语句大小写不敏感。
 14 | 
 15 | 
 16 | ## Basic
 17 | 
 18 | ```
 19 | SELECT column FROM table
 20 | ```
 21 | 
 22 | ### select
 23 | 
 24 | ```
 25 | SELECT DISTINCT column FROM table
 26 | 
 27 | SELECT column FROM table WHERE column operator value
 28 | 
 29 | SELECT column FROM table WHERE 1 AND 2 (WHERE 1 OR 2)
 30 | 
 31 | SELECT column FROM table ORDER BY column
 32 | 
 33 | SELECT column FROM table LIMIT number(MySQL)
 34 | 
 35 | SELECT column FROM table WHERE column LIKE pattern (% _ [charlist] [^charlist])
 36 | 
 37 | SELECT column FROM table WHERE column IN (value1,value2,...)
 38 | 
 39 | SELECT column FROM table WHERE column BETWEEN value1 AND value2
 40 | 
 41 | SELECT column FROM table AS alias_name(表的别名)
 42 | SELECT column AS alias_name FROM table(列的别名)
 43 | 
 44 | SELECT column INTO new_table [IN external_database] FROM old_table
 45 | ```
 46 | 
 47 | ### insert
 48 | 
 49 | ```
 50 | INSERT INTO table VALUES (v1.v2...)
 51 | INSERT INTO table (column1,column2,...) VALUES (v1,v2,...)
 52 | ```
 53 | 
 54 | ### update
 55 | 
 56 | ```
 57 | UPDATE table SET column = new_value WHERE column = value
 58 | ```
 59 | 
 60 | ### delete
 61 | 
 62 | ```
 63 | DELETE FROM table WHERE column = value
 64 | ```
 65 | 
 66 | ### union
 67 | 
 68 | ```
 69 | SELECT column1 FROM table1 UNION SELECE column2 FROM table2(元素不重复)
 70 | SELECT column2 FROM table1 UNION ALL SELECT column2 FROM table2(元素可以重复)
 71 | ```
 72 | 
 73 | ### create
 74 | 
 75 | ```
 76 | CREATE DATABASE name
 77 | CREATE TABLE name( c1 type,c2 type,c3 type,...)
 78 | ```
 79 | 
 80 | ## Join
 81 | 
 82 | ```
 83 | (INNER) JOIN: 如果表中有至少一个匹配,则返回行
 84 | LEFT JOIN: 即使右表中没有匹配,也从左表返回所有的行
 85 | RIGHT JOIN: 即使左表中没有匹配,也从右表返回所有的行
 86 | FULL JOIN: 只要其中一个表中存在匹配,就返回行
 87 | 
 88 | SELECT column FROM table1 INNER JOIN table2 ON table1.column = table2.column
 89 | SELECT column FROM table1 LEFT JOIN table2 ON table1.column = table2.column 
 90 | SELECT column FROM table1 RIGHT JOIN table2 ON table1.column = table2.column 
 91 | SELECT column FROM table1 FULL JOIN table2 ON table1.column = table2.column 
 92 | ```
 93 | 
 94 | ## Constraint
 95 | 
 96 | ### not null
 97 | 
 98 | ```
 99 | CREATE TABLE name( c1 type NOT NULL,c2 type,c3 type,...)
100 | ```
101 | 
102 | ### unique
103 | 
104 | ```
105 | CREATE TABLE name( c1 type,c2 type,c3 type,... ,UNIQUE(c1) ) (MySQL)
106 | CREATE TABLE name( c1 type,c2,type,c3 type,... ,CONSTRAINT constraint_name UNIQUE(c1,c2) ) (MySQL)
107 | ALTER TABLE table ADD UNIQUE(column)
108 | ALTER TABLE table ADD CONSTRAINT constraint_name UNIQUE(c1,c2)
109 | ALTER TABLE table DROP INDEX constraint_name (MySQL)
110 | ```
111 | 
112 | ### primary key
113 | 
114 | ```
115 | CREATE TABLE name( c1 type,c2 type,c3 type,... ,PRIMARY KEY(c1) ) (MySQL)
116 | CREATE TABLE name( c1 type,c2,type,c3 type,... ,CONSTRAINT constraint_name PRIMARY KEY(c1,c2) )  (MySQL)
117 | ALTER TABLE table ADD PRIMARY KEY(column)
118 | ALTER TABLE table ADD CONSTRAINT constraint_name PRIMARY KEY(c1,c2)
119 | ALTER TABLE table DROP PRIMARY KEY(MySQL)
120 | ```
121 | 
122 | ### foreign key
123 | 
124 | ```
125 | CREATE TABLE name( c1 type,c2 type,c3 type,... ,FOREIGN KEY(c1) REFERENCE table2(column) ) (MySQL)
126 | CREATE TABLE name( c1 type,c2 type,c3 type,... ,CONSTRAINT constraint_name FOREIGN KEY(c1) REFERENCE table2(column) ) (MySQL)
127 | ALTER TABLE table ADD FOREIGN KEY (column) REFERENCE table2(column)
128 | ALTER TABLE table ADD CONSTRAINT constraint_name FOREIGN KEY (column) REFERENCE table2(column)
129 | ALTER TABLE table DROP FOREIGN KEY constraint_name (MySQL)
130 | ```
131 | 
132 | ### check
133 | 
134 | ```
135 | CREATE TABLE name( c1 type,c2 type,c3 type,... ,CHECK(expression) ) (MySQL)
136 | CREATE TABLE name( c1 type,c2 type,c3 type,... ,CONSTRAINT constraint_name CHECK(expression) ) (MySQL)
137 | ALTER TABLE table ADD CHECK(expression)
138 | ALTER TABLE table ADD CONSTRAINT constraint_name CHECK(expression)
139 | ALTER TABLE table DROP CHECK constraint_name (MySQL)
140 | ```
141 | 
142 | ### default
143 | 
144 | ```
145 | CREATE TABLE name( c1 type,c2 type,c3 type,... ,cn type DEFAULT 'value' ) (MySQL)
146 | ALTER TABLE table ALTER column SET DEFAULT 'value' (MySQL)
147 | ALTER TABLE table ALTER column DROP DEFAULT (MySQL)
148 | ```
149 | 


--------------------------------------------------------------------------------