35 Commits

Author SHA1 Message Date
mayx 2fd191d418 Update file 2024-07-03-ai-summary.md 2024-07-03 13:41:02 +00:00
mayx 99ec7de3cd Update file 2024-07-03-ai-summary.md 2024-07-03 13:32:37 +00:00
mayx cd294479e0 Update file 2024-07-03-ai-summary.md 2024-07-03 13:01:14 +00:00
mayx b7ab4e6356 Update file post.html 2024-07-02 08:46:57 +00:00
mayx 934c04aea7 Update file post.html 2024-07-02 08:25:21 +00:00
mayx 5c7773fb59 Update 2 files
- /_layouts/post.html
- /js/main.js
2024-07-02 08:09:28 +00:00
mayx 41ce7aabb0 Update 2 files
- /proxylist.md
- /js/main.js
2024-07-02 03:59:47 +00:00
mayx cbe4db5992 Update file 2024-06-16-hackintosh.md 2024-06-16 12:26:12 +00:00
mayx 04e63388b6 Update 2 files
- /_posts/2024-05-19-bt-ops.md
- /proxylist.md
2024-05-19 11:10:53 +00:00
mayx 106aa95def Update default.html 2024-04-15 07:29:05 +00:00
mayx f1e7070380 Update 2 files
- /js/main.js
- /_posts/2024-04-06-old-pc.md
2024-04-08 12:52:09 +00:00
mayx 10a3521795 Update file 2024-04-06-old-pc.md 2024-04-06 09:43:54 +00:00
mayx 881ed13576 Update 2 files
- /_posts/2024-04-06-old-pc.md
- /index.html
2024-04-06 09:41:50 +00:00
mayx 982a87e0bf Update file proxylist.md 2024-03-21 01:54:03 +00:00
mayx 5097364988 Update 3 files
- /images/offline.svg
- /images/online.svg
- /proxylist.md
2024-03-21 01:45:48 +00:00
mayx c437b255f1 Update file 2024-03-16-ssl-pinning.md 2024-03-16 13:17:54 +00:00
mayx efaaa32674 Update default.html 2024-02-24 16:02:33 +00:00
mayx 8a51f7a942 Update 3 files
- /images/17966333.png
- /_config.yml
- /_layouts/default.html
2024-02-24 15:58:24 +00:00
mayx afe8b95115 Update 4 files
- /proxylist.md
- /images/17966333.png
- /_config.yml
- /_posts/2024-02-24-luckfox.md
2024-02-24 15:53:16 +00:00
mayx 2aad4be863 Update 2 files
- /_posts/2024-02-03-1panel.md
- /_posts/2024-01-20-renpy.md
2024-02-03 14:04:27 +00:00
mayx 74cb7d028c Update 4 files
- /llama.html
- /_posts/2024-01-20-renpy.md
- /index.html
- /proxylist.md
2024-01-20 11:01:55 +00:00
mayx d74fe7b4b8 Update file index.html 2024-01-01 10:54:46 +00:00
mayx 8f7d02697d Update 5 files
- /card.html
- /llama.html
- /index.html
- /Live2dHistoire/live2d/js/message.js
- /js/main.js
2024-01-01 10:53:46 +00:00
mayx 4afea923c5 Update 3 files
- /package.json
- /_posts/2023-04-05-ai.md
- /_posts/2024-01-01-summary.md
2024-01-01 09:01:21 +00:00
mayx e6281bfa5f Update file Gemfile 2023-12-30 15:27:02 +00:00
mayx a4e9d17cf1 Update file Gemfile 2023-12-30 15:16:27 +00:00
mayx 975fcf9d8e Update 2 files
- /Gemfile
- /.gitlab-ci.yml
2023-12-30 15:12:33 +00:00
mayx 1734d36dd5 Update file Gemfile 2023-12-30 15:02:50 +00:00
mayx eefdb73475 Update 3 files
- /Gemfile
- /.gitlab-ci.yml
- /Live2dHistoire/live2d/js/message.js
2023-12-30 14:59:15 +00:00
mayx c622346eaa Update 2 files
- /Gemfile
- /Live2dHistoire/live2d/js/message.js
2023-12-30 13:58:00 +00:00
mayx 7609bb0b8f Update message.js 2023-12-30 13:41:55 +00:00
mayx 2298c9b271 更新.gitlab-ci.yml文件 2023-12-24 16:49:42 +00:00
mayx f9abd1e5d7 Update file 2023-12-24-android.md 2023-12-24 12:30:52 +00:00
mayx 62ea62e8e8 Update file 2023-12-10-openfyde.md 2023-12-09 17:42:34 +00:00
mayx 3dc82a814a Update 2 files
- /_posts/2023-02-03-mbp.md
- /_posts/2023-10-21-game.md
2023-10-21 15:24:08 +00:00
26 changed files with 1031 additions and 230 deletions
+2 -2
View File
@@ -6,14 +6,14 @@
# Template project: https://gitlab.com/pages/jekyll
# Docs: https://docs.gitlab.com/ee/pages/
image: ruby:2.6
image: ruby:2.7
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
before_script:
- gem install bundler
- gem install bundler -v 2.4.22
- bundle install
pages:
+9 -7
View File
@@ -1,11 +1,13 @@
source "https://rubygems.org"
gem "jekyll", "~> 4.1.0"
gem "jekyll", "~> 3.9.3"
group :jekyll_plugins do
gem "jekyll-gist"
gem "jekyll-coffeescript"
gem "jekyll-assets"
gem "jekyll-sitemap"
gem "jekyll-feed"
gem "jekyll-gist", "~> 1.5.0"
gem "jekyll-coffeescript", "~> 1.1.1"
gem "jekyll-assets", "~> 1.0.0"
gem "jekyll-sitemap", "~> 1.4.0"
gem "jekyll-feed", "~> 0.15.1"
gem "jekyll-theme-minimal"
gem "jekyll-paginate"
gem "jekyll-paginate", "~> 1.1.0"
gem "kramdown-parser-gfm", "~> 1.1.0"
gem "kramdown", "~> 2.3.2"
end
+4 -4
View File
@@ -289,16 +289,16 @@ if(!norunFlag){
type: 'POST',
url: talkAPI,
data: {
"info":info_,
"userid":userid_
"info": info_,
"userId": userid_
},
success: function(res) {
if(res.code !== 100000){
if(res.intent.code !== 0){
talkValTimer();
showMessage('似乎有什么错误,请和站长联系!',0);
}else{
talkValTimer();
showMessage(res.text,0);
showMessage(res.results[0].values.text,0);
}
console.log(res);
$('#AIuserText').val("");
+105 -118
View File
@@ -1,153 +1,140 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% seo %}
{% feed_meta %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<script src="/js/jquery.min.js"></script>
<!-- <![endif]-->
<!--[if lt IE 9]>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% seo %}
{% feed_meta %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
<!--[if !IE]> -->
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
<script src="/js/jquery.min.js"></script>
<!-- <![endif]-->
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<![endif]-->
{% if site.google_analytics %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
{% if site.google_analytics %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics }}');
var lastUpdated = new Date("{{ site.time | date: "%FT%T%z" }}");
Date.prototype.format = function(fmt) {
var o = {
"M+" : this.getMonth()+1, //月份
"d+" : this.getDate(), //日
"h+" : this.getHours(), //小时
"m+" : this.getMinutes(), //分
"s+" : this.getSeconds(), //秒
"q+" : Math.floor((this.getMonth()+3)/3), //季度
"S" : this.getMilliseconds() //毫秒
};
if(/(y+)/.test(fmt)) {
fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));
</script>
{% endif %}
<style>
.backToTop {
display: none;
width: 18px;
line-height: 1.2;
padding: 5px 0;
background-color: #000;
color: #fff;
font-size: 12px;
text-align: center;
position: fixed;
_position: absolute;
right: 10px;
bottom: 100px;
_bottom: "auto";
cursor: pointer;
opacity: .6;
filter: Alpha(opacity=60);
}
for(var k in o) {
if(new RegExp("("+ k +")").test(fmt)){
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
}
}
return fmt;
}
</script>
{% endif %}
<style>
.backToTop {
display: none;
width: 18px;
line-height: 1.2;
padding: 5px 0;
background-color: #000;
color: #fff;
font-size: 12px;
text-align: center;
position: fixed;
_position: absolute;
right: 10px;
bottom: 100px;
_bottom: "auto";
cursor: pointer;
opacity: .6;
filter: Alpha(opacity=60);
}
</style>
</head>
<body>
<div class="wrapper">
<header>
<h1><a href="{{ "/" | relative_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>
{% if site.logo %}
<img src="{{ site.logo | relative_url}}" alt="Logo" />
</style>
</head>
<body>
<div class="wrapper">
<header>
<h1><a href="{{ "/" | relative_url }}">{{ site.title | default: site.github.repository_name }}</a></h1>
{% if site.logo %}
<img src="{{ site.logo }}" alt="Logo" />
{% endif %}
<p>{{ site.description | default: site.github.project_tagline }}</p>
<p><form action="/search.html"><input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.."> <input type="submit"></form></p>
<p>{{ site.description | default: site.github.project_tagline }}</p>
{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ site.github.repository_nwo }}</small></a></p>
{% endif %}
<p>
<form action="/search.html"><input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts..">
<input type="submit">
</form>
</p>
{% if site.github.is_user_page %}
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
{% endif %}
<p class="view"><a href="{{ "/Mabbs/" | relative_url }}">About Me</a></p>
{% if site.github.is_project_page %}
<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub
<small>{{ site.github.repository_nwo }}</small></a></p>
{% endif %}
<ul class="downloads">
{% if site.github.is_user_page %}
<p class="view"><a href="{{ site.github.owner_url }}">View My GitHub Profile</a></p>
{% endif %}
<p class="view"><a href="/Mabbs/">About Me</a></p>
<ul class="downloads">
{% if site.github %}
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
<li><a href="{{ site.github.zip_url }}">Download <strong>ZIP File</strong></a></li>
<li><a href="{{ site.github.tar_url }}">Download <strong>TAR Ball</strong></a></li>
<li><a href="{{ site.github.repository_url }}">View On <strong>GitHub</strong></a></li>
{% else %}
<li style="width: 270px;border-right:0px;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
<li style="width: 270px;border-right:0px;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
{% endif %}
</ul>
</header>
<section>
</ul>
</header>
<section>
{{ content }}
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<div class="live_talk_input_name_body" style="display:none;">
<input name="name" type="hidden" class="live_talk_name white_input" id="AIuserName" value="Mayx_Blog_Talk" />
</section>
<!--[if !IE]> -->
<div id="landlord" style="left:5px;bottom:0px;">
<div class="message" style="opacity:0"></div>
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
<div class="live_talk_input_body">
<div class="live_talk_input_name_body" style="display:none;">
<input name="name" type="hidden" class="live_talk_name white_input" id="AIuserName" value="Mayx_Blog_Talk" />
</div>
<div class="live_talk_input_text_body">
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?"/>
<button type="button" class="live_talk_send_btn" id="talk_send">发送</button>
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?"/>
<button type="button" class="live_talk_send_btn" id="talk_send">发送</button>
</div>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
</div>
<input name="live_talk" id="live_talk" value="1" type="hidden" />
<div class="live_ico_box" style="display:none;">
<div class="live_ico_item type_info" id="showInfoBtn"></div>
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
<div class="live_ico_item type_music" id="musicButton"></div>
<div class="live_ico_item type_youdu" id="youduButton"></div>
<div class="live_ico_item type_quit" id="hideButton"></div>
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
<input id="duType" value="douqilai" type="hidden">
</div>
</div>
</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<div id="open_live2d">召唤伊斯特瓦尔</div>
<!-- <![endif]-->
<footer>
<p><small>Made with ❤ by Mayx<br />Last updated at <script>document.write(lastUpdated.format("yyyy-MM-dd hh:mm:ss"));</script><br /> 总字数:
{% assign count = 0 %}{% for post in site.posts %}{% assign single_count = post.content | strip_html | strip_newlines | remove: " " | size %}
{% assign count = count | plus: single_count %}{% endfor %}{% if count > 10000 %}{{ count | divided_by: 10000 }} 万 {{ count | modulo: 10000 }}
{% else %}{{ count }}{% endif %} - 文章数:{% for post in site.posts %}{% assign co = co | plus: 1 %}{% endfor %}{{ co }} - <a href="{{ "/atom.xml" | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small></p>
</footer>
</div>
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
<footer>
<p>
<small>Made with ❤ by Mayx<br />Last updated at <script>document.write(lastUpdated.toLocaleString());</script><br /> 总字数:{% assign count = 0 %}{% for post in site.posts %}{% assign single_count = post.content | strip_html | strip_newlines | remove: " " | size %}{% assign count = count | plus: single_count %}{% endfor %}{% if count > 10000 %}{{ count | divided_by: 10000 }} 万 {{ count | modulo: 10000 }}{% else %}{{ count }}{% endif %} - 文章数:{% for post in site.posts %}{% assign co = co | plus: 1 %}{% endfor %}{{ co }} - <a href="{{ "/atom.xml" | relative_url }}" >Atom</a> - <a href="{{ "/README.html" | relative_url }}" >About</a></small>
</p>
</footer>
</div>
<script src="{{ "/assets/js/scale.fix.js" | relative_url }}"></script>
<script src="/js/main.js"></script>
<!--[if !IE]> -->
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<script src="/js/main.js"></script>
<!--[if !IE]> -->
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
<script src="/Live2dHistoire/live2d/js/message.js"></script>
<!-- <![endif]-->
</body>
</html>
<!-- <![endif]-->
</body>
</html>
+101 -57
View File
@@ -2,89 +2,133 @@
layout: default
---
<small>{{ page.date | date: "%-d %B %Y" }} - 字数统计:{% if page.layout == "encrypt" %}God Knows {% else %}{{ page.content | strip_html | strip_newlines | remove: " " | size }} - 阅读大约需要{{ page.content | strip_html | strip_newlines | remove: " " | size | divided_by: 350 | plus: 1 }}分钟{% endif %} - Hits: <span id="{{ page.url }}" class="visitors" >Loading...</span>
</small>
<small>{{ page.date | date: "%-d %B %Y" }} - 字数统计:{% if page.layout == "encrypt" %}God Knows {% else %}{{ page.content | strip_html | strip_newlines | remove: " " | size }} - 阅读大约需要{{ page.content | strip_html | strip_newlines | remove: "" | size | divided_by: 350 | plus: 1 }}分钟{% endif %} - Hits: <span id="{{ page.url }}" class="visitors">Loading...</span></small>
<h1>{{ page.title }}</h1>
<p class="view">by <a href="//github.com/{{ page.author | default: "Mabbs" }}">{{ page.author | default: site.author }}</a></p>
<div id="outdate" style="display:none;">
<hr />
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
<br /><br />
<hr />
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
<br /><br />
</div>
<script>
BirthDay = new Date("{{ page.date | date: "%m/%d/%Y" }} 00:00:00");
today = new Date();
timeold = (today.getTime() - BirthDay.getTime());
secondsold = Math.floor(timeold / 1000);
e_daysold = timeold / (24 * 60 * 60 * 1000);
daysold = Math.floor(e_daysold);
if (daysold > 90) {
BirthDay = new Date("{{ page.date | date: "%m/%d/%Y" }} 00:00:00");
today = new Date();
timeold = (today.getTime() - BirthDay.getTime());
secondsold = Math.floor(timeold / 1000);
e_daysold = timeold / (24 * 60 * 60 * 1000);
daysold = Math.floor(e_daysold);
if (daysold > 90) {
document.getElementById("outdate").style.display = "block";
document.getElementById("outime").innerHTML = daysold;
}
}
</script>
<hr />
{% if page.layout != "encrypt" %}
<!--[if !IE]> -->
<b>AI摘要</b>
<p id="ai-output">正在生成中……</p>
<script>
async function sha(str) {
const encoder = new TextEncoder();
const data = encoder.encode(str);
const hashBuffer = await crypto.subtle.digest("SHA-256", data);
const hashArray = Array.from(new Uint8Array(hashBuffer)); // convert buffer to byte array
const hashHex = hashArray
.map((b) => b.toString(16).padStart(2, "0"))
.join(""); // convert bytes to hex string
return hashHex;
}
async function ai_gen(){
var postContent = "文章标题:" + {{ page.title | jsonify }} + ";文章内容:" + {{ page.content | strip_html | strip_newlines | jsonify }};
var postContentSign = await sha(postContent);
var outputContainer = document.getElementById("ai-output");
$.get("https://summary.mayx.eu.org/is_uploaded?id={{ page.url }}&sign=" + postContentSign, function (data) {
if (data == "yes") {
$.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign, function (data2) {
outputContainer.textContent = data2;
});
} else {
$.post("https://summary.mayx.eu.org/upload_blog?id={{ page.url }}", postContent, function (data) {
$.get("https://summary.mayx.eu.org/get_summary?id={{ page.url }}&sign=" + postContentSign);
const evSource = new EventSource("https://summary.mayx.eu.org/summary?id={{ page.url }}");
outputContainer.textContent = "";
evSource.onmessage = (event) => {
if (event.data == "[DONE]") {
evSource.close();
return;
} else {
const data = JSON.parse(event.data);
outputContainer.textContent += data.response;
}
}
});
}
});
}
ai_gen();
</script>
<hr />
<!-- <![endif]-->
{% endif %}
{% include toc.html html=content sanitize=true h_max=3 %}
{{content}}
{% if page.tags %}
<small>tags: <em>{{ page.tags | join: "</em> - <em>" }}</em></small>
<small>tags: <em>{{ page.tags | join: "</em> - <em>" }}</em></small>
{% endif %}
<div class="pagination">
{% if page.previous.url %}
<span class="prev" >
<a href="{{ site.baseurl }}{{ page.previous.url }}">
上一篇:{{ page.previous.title }}
</a>
</span>
{% endif %}
{% if page.previous.url %}
<span class="prev">
<a href="{{ site.baseurl }}{{ page.previous.url }}">
上一篇:{{ page.previous.title }}
</a>
</span>
{% endif %}
<br />
{% if page.next.url %}
<span class="next" >
<a href="{{ site.baseurl }}{{ page.next.url }}">
下一篇:{{ page.next.title }}
</a>
</span>
{% endif %}
</div>
{% if page.next.url %}
<span class="next">
<a href="{{ site.baseurl }}{{ page.next.url }}">
下一篇:{{ page.next.title }}
</a>
</span>
{% endif %}
</div>
<!--[if !IE]> -->
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>
<link rel="stylesheet" href="/css/gitalk.css">
<script src="/js/gitalk.min.js"></script>
<div id="gitalk-container"></div>
<script>
if (window.location.host != "mabbs.github.io")
{
var gitalk = new Gitalk({
clientID: '098934a2556425f19d6e',
clientSecret: '0bd44eed8425e5437ce43c4ba9b2791fbc04581d',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '{{ page.id }}', // Ensure uniqueness and length less than 50
distractionFreeMode: false // Facebook-like distraction free mode
})
}
else
{
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '{{ page.id }}', // Ensure uniqueness and length less than 50
distractionFreeMode: false // Facebook-like distraction free mode
})
}
if (window.location.host != "mabbs.github.io") {
var gitalk = new Gitalk({
clientID: '098934a2556425f19d6e',
clientSecret: '0bd44eed8425e5437ce43c4ba9b2791fbc04581d',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '{{ page.id }}', // Ensure uniqueness and length less than 50
distractionFreeMode: false // Facebook-like distraction free mode
})
}
else {
var gitalk = new Gitalk({
clientID: '36557aec4c3cb04f7ac6',
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
repo: 'mabbs.github.io',
owner: 'Mabbs',
admin: ['Mabbs'],
id: '{{ page.id }}', // Ensure uniqueness and length less than 50
distractionFreeMode: false // Facebook-like distraction free mode
})
}
gitalk.render('gitalk-container')
gitalk.render('gitalk-container')
</script>
<!-- <![endif]-->
<!-- <![endif]-->
+1 -1
View File
@@ -28,7 +28,7 @@ tags: [Apple, MacBook, 体验]
## 游戏体验
众所周知,MacBook很不适合用来打游戏,因为大多数游戏都是在Windows上编写的。不过我已经安装了Windows11ARM的虚拟机,如果用来跑游戏效果会怎么样呢?我从我原来用的电脑上传了一个Galgame过来,打开试了一下,卡的不得了,不知道是因为没法调用显卡还是怎么回事,感觉帧率就10fps的样子,我在我原来的电脑上运行了一下试了试,运行非常流畅。连运行Galgame都这么垃圾,其他游戏估计更不用说了。不过这估计也是因为是虚拟机的缘故,所以我想找找MacOS支持的游戏。去Apple Store下载游戏……都要花钱,不过我看到我的MacBook作为Pro,有个Touch Bar,所以想整个Touch Bar的游戏,正好看到了个打砖块,试了试效果还不错。
当然用MacBook光看打砖块流畅那就没啥意义了,所以再升点级,试试三维弹球吧😝,之前我在网上看到一个开源版本的三维弹球,叫做[SpaceCadetPinball](https://github.com/k4zmu2a/SpaceCadetPinball),是用Windows XP自带的那个版本逆向出来的,我看了一眼是支持在MacOS上运行的,于是就下载下来编译了一下,效果确实不错,不过我又试了一下在Windows原生的版本,一样很流畅啊😂,而且不知道为什么感觉开源的这个版本缓冲器不太对劲,弹的没原生的舒服……这试游戏没必要针对弹球游戏吧😂。
不过我也不知道MacOS支持什么游戏,想了想我在Epicgames上白嫖了不少游戏,干脆下载下来看看都有啥支持吧。看了一圈while True:learn()居然支持,然后就下载下来试了一下,不过这个基本上也没啥特效啥的,就是那种逻辑推理游戏,也展现不出什么,不过我原来的电脑运行这个游戏的时候风扇就开始高速转起来了,MacBook能完全没声音应该还是证明有点东西的。
不过我也不知道MacOS支持什么游戏,想了想我在Epic Games上白嫖了不少游戏,干脆下载下来看看都有啥支持吧。看了一圈while True:learn()居然支持,然后就下载下来试了一下,不过这个基本上也没啥特效啥的,就是那种逻辑推理游戏,也展现不出什么,不过我原来的电脑运行这个游戏的时候风扇就开始高速转起来了,MacBook能完全没声音应该还是证明有点东西的。
不过我也不一定非要考虑电脑游戏,我也可以考虑一下手机游戏,毕竟MacOS在M系列芯片上是可以运行iOS软件的,不过系统做了一些限制,不是所有都支持,所以我就下了一个[PlayCover](https://github.com/PlayCover/PlayCover),在上面安装了公主连结 Re:Dive。效果还挺不错的,完全不卡,不过运行的时候可以明显感觉有点开始发热了,我浏览网页看视频的时候完全不发热,看来这个游戏还是挺费资源的。
## 综合体验
经过这些天的使用,我感触最深的就是这台电脑的续航了,别说一天不充电,感觉两三天不充电都没问题,毕竟标称续航是20小时,可以算是续航最强的笔记本电脑了。不过这样的话感觉就更像是大号手机/平板那样了,用的时候不充电,24小时不用关机,感觉和手机差不多,相比平板功能还是更多,要是说用iPad那个东西可没有终端,越狱也还是比不了MacOS。而相比Android平板,我之前还在上面[试过Termux](/2022/02/15/termux.html),不过问题和越狱差不多,支持的东西还是不如MacOS,虽然MacOS也不是开源的,但是对我来说我感觉那个终端就像Linux那个终端差不多,加上HomeBrew效果还是挺不错的,另外MacBook比平板的续航更长,就是重量也更重了。
+1 -1
View File
@@ -7,7 +7,7 @@ tags: [AI, LLM, 人工智能]
最近人工智能发展的还真是不错啊……<!--more-->
# 起因
最近ChatGPT为代表的人工智能发展的越来越好了,而且因为它对生产力的提升使得了解AI的人也越来越多了。虽然我也不算是对AI很感兴趣,但是我在Github Copilot刚出的时候就已经用上了,到现在一直在用(不过毕业了以后估计就用不了了吧😂)。不过那时候Copilot毕竟专业性比较高,知道的人也比较少,不像现在ChatGPT能在各行各业使用,甚至还有基于类似模型的Vtuber,比如[Neuro-sama](https://www.twitch.tv/vedel987),所以即使是普通人使用它,都能够减轻自己的工作压力,所以现在的人们都在讨论它。
最近ChatGPT为代表的人工智能发展的越来越好了,而且因为它对生产力的提升使得了解AI的人也越来越多了。虽然我也不算是对AI很感兴趣,但是我在Github Copilot刚出的时候就已经用上了,到现在一直在用(不过毕业了以后估计就用不了了吧😂)。不过那时候Copilot毕竟专业性比较高,知道的人也比较少,不像现在ChatGPT能在各行各业使用,甚至还有基于类似模型的Vtuber,比如[Neuro-sama](https://www.twitch.tv/vedal987),所以即使是普通人使用它,都能够减轻自己的工作压力,所以现在的人们都在讨论它。
当然在这之前,还有一些很厉害的画图AI,比如使用了Stable Difusion的NovalAI,以及Midjourney啥的,不过因为我对画图并不感兴趣,所以它发展的有多好也基本上和我没有关系。其实除了这些能够AIGC的模型之外,在那之前还有下围棋的AlphaGO啥的,那个我就更不感兴趣了,相信大多数人也不感兴趣,所以总的来看也就只有现在才能证明AI发展到了能够让大家觉得能干涉到更多人的地步吧。
也正因为现在以ChatGPT为代表的LLM的发展,开源社区也开始搞起来一些有意思的东西。不过LLM的训练成本比较高,所以现在开源社区在这一块的发展也许得感谢比如Facebook的[LLaMA](https://github.com/facebookresearch/llama)之类基础的模型,才能让大家能用较低的成本去训练属于自己的AI吧。
+33
View File
@@ -0,0 +1,33 @@
---
layout: post
title: 在MacBook玩游戏的各种方法
tags: [Apple, MacBook, 游戏]
---
我倒要看看是谁在说Mac打游戏是疯子😡<!--more-->
# 起因
自从[用了MacBook Pro](/2023/02/03/mbp.html)以后,我用我以前Windows笔记本的次数越来越少了。虽然性能可能比不上,但是安静和超长续航的体验还是相当不错的。但是我也不是完全不玩游戏的人,有时候闲了也有打游戏的需求,那我如何在不使用Windows系统的情况下打游戏呢?
# 在MacBook玩游戏的方法
## 原生游戏
一般来说如果想发挥MacBook的全部能力,那自然是完完全全为Mac设计,不需要任何转换等方法的游戏最好了,这类游戏一般在Mac App Store就能找到和下载,只是绝大多数都不是免费的,我也就下过一款[TouchBrickOut](https://apps.apple.com/us/app/ibreakout/id1582094533)的打砖块游戏,这是真真正正为Mac设计的,不仅原生还要Touch Bar。当然对于大多数游戏来说不会为Mac专门设计,毕竟Mac的游戏玩家比较少。但是能在Mac上原生运行的游戏除了为Mac设计以外,就是开源游戏了。毕竟源代码都有了,想在哪里编译都可以。对于我玩的游戏来说,有几款正好符合这一点,比如[osu!lazer](https://github.com/ppy/osu),还有之前玩过的[三维弹球](https://github.com/k4zmu2a/SpaceCadetPinball)。
## iOS游戏
因为M系列芯片基于ARM架构,所以我的MacBook也可以玩iOS的游戏。这类游戏一般也能直接在Mac App Store上下载到,比如我玩过的[药水制作师](https://apps.apple.com/us/app/%E8%8D%AF%E6%B0%B4%E5%88%B6%E4%BD%9C%E5%B8%88/id950654598)。但其实有很多iOS游戏在Mac App Store上都搜索不到,应该是开发者设置了规则不允许在Mac上使用。对于这类游戏可以在[Decrypt IPA Store](https://decrypt.day/)上下载,并且使用[PlayCover](https://github.com/PlayCover/PlayCover)安装。对我来说,我一般玩[公主连结Re:Dive](https://decrypt.day/app/id1423525213),以及一些模拟器,比如[XP3Player](https://apps.apple.com/us/app/xp3player/id1064060287)和[ONSPlayer](https://apps.apple.com/us/app/onsplayer/id1388250129)(其实这两款软件可以在Mac App Store上下载,但是都要花钱……所以我就去网上找的ipa文件然后在PlayCover上安装了)
## 使用Rosetta 2的x86游戏
在M系列芯片出来以前,其实也有不少Mac上的游戏,但是这类游戏可能在M芯片的Mac出来之前就已经开发好了,想让开发者为M芯片做适配显然不大可能。不过macOS有Rosetta 2可以让开发者不需要任何改动的情况下就让游戏在M系列芯片Mac上运行。这类游戏非常多,基本上在Steam和Epic Games上下载的游戏都是x86的,像我用的Epic Games Launcher以及在上面下载的游戏[while True:learn()](https://launcher.store.epicgames.com/zh-CN/p/while-true-learn)都是这样的,不过我玩的这些对性能要求都非常低,所以即使用了转译,但是玩起来并不会卡。
## 基于脚本的Galgame游戏
很多Galgame都是用一些专用的脚本引擎工具写出来的,例如T Visual Presenter、NScripter还有Ren'Py等等,因为是脚本,所以通常来说很容易跨平台,毕竟它们没有太多依赖系统本身的东西,只要能写出对应平台的解析器,脚本都能运行。像上述提到的XP3Player、ONSPlayer还有[RenPyViewer](https://apps.apple.com/us/app/renpyviewer/id1547796767)就可以运行很多基于脚本的游戏。不过很多Ren'Py游戏都有发行macOS版本,所以一般不需要安装RenPyViewer。只是有可能它们都是基于x86开发的,可能需要用Rosetta 2转译……
## 在网页上运行的游戏
浏览器作为跨平台最强的解决方法,自然游戏也不例外,能在网页上运行的游戏也很多,像RPG Maker MV制作的游戏基本上都可以在浏览器上运行。我看到有一个[网站](https://amemei-lists.top/posts/49e03169/)就收集了很多这种游戏,他们之前还把游戏放在了GitHub上。不过Github对[Sexually Obscene Content](https://docs.github.com/zh/site-policy/acceptable-use-policies/github-sexually-obscene-content)内容是不容忍的,所以他们在GitHub上的东西就消失了……不过我搜了一下还有一些漏网之鱼,[这个账号](https://github.com/jjbR18)还有这样的游戏可以玩🤣(有效性只限我写文章之前的时间,说不定哪天被GitHub发现就没了)。其实对于这种网页上可以运行的游戏来说,最好下载下来,虽然RPG Maker MV的游戏可以在线玩,但是加载那么多资源,尤其这些文件还是在境外,对国内玩家非常的不友好😆,所以如果想在Mac上玩,可以下载下来,然后在终端那个目录下执行`python3 -m http.server`,就可以打开 <http://127.0.0.1:8000> 下开始游戏了。不过Safari的效果不太行,很多游戏连声音都没有,想玩还是下载Chrome之类的浏览器比较好。
## 使用Wine🍷游玩Windows游戏
除了相对比较原生的办法,不太优雅的办法就是用基于Wine的各种东西了。其实我之前不太想在MacBook上使用Wine的,因为一般如果是Linux系统在ARM芯片上运行的话需要用QEMU User模式模拟x86,然后再运行Wine,效率极其低下,还不如用虚拟机呢(虽然听过Crossover,不过我当时以为它是按这种方式的,而且还要收费😂)。不过macOS不太一样,它有Rosetta 2加持,效率比QEMU User模式高太多了,虽然是两次翻译但是毕竟有黑科技还算是能玩。尤其是前段时间出的Game Porting Toolkit,据说很厉害,所以前几天我根据[这个教程](https://www.applegamingwiki.com/wiki/Game_Porting_Toolkit)安装了一个,编译的时候第一次听到我的MacBook风扇转😂。试了试效果确实不错,找了个Unity3D的游戏可以满帧率运行。虽然很不错,不过我又去网上搜了搜,发现我是**,有个开源的软件[Whisky](https://github.com/Whisky-App/Whisky)不需要编译任何东西,就可以使用Wine和GPTk,而且配置也很简单,还能使用DXVK,而且因为是已经编译好的,不需要安装依赖,也不需要源码之类的东西,我通过上面教程安装的大小要4个多GiB,但是这个就只要1个多GiB,还不需要考虑乱七八糟的东西。
经过我的实测,GPTk(其实就是D3DMetal)兼容性更好一些,效率也更高,但是占内存很大,DXVK似乎效率低一些,但是占内存比较小,因为我的MacBook只有8GiB内存,而且我玩的游戏在哪个上面都能跑满帧率 ~~(反正3A大作我也不可能在MacBook上玩,估计M2的水平也玩不了……不如说我基本上不玩3A大作🤣)~~ ,所以我在玩游戏一般还是会用DXVK多一些,除非打不开才会用D3DMetal。
## 使用虚拟机游玩Windows游戏
因为我的MacBook只有8GiB内存,而且硬盘也只有256GiB,跑虚拟机压力实在是太大了,我以前试过[UTM](https://github.com/utmapp/UTM),但是玩不了游戏,随便什么游戏都会卡的动不了,当然也可能是UTM的显卡驱动不太行,不过现在的话我也不想尝试其他虚拟机了,所以我只能说强烈不推荐使用虚拟机玩游戏。
## 云游戏方案
这种方案直接就不在本机运行了,流畅程度全看网络和连接的主机性能。我以前也写过一篇[关于云游戏的体验](/2021/09/28/cloudgame.html),在这里就不多赘述了。
# 感想
这么看来MacBook玩游戏的方法挺多的嘛,谁说一定要Windows才能打游戏呢?我觉得说在macOS上打游戏的人是精神病的人自己才是精神病吧,谁也没有说买MacBook就是专门拿来打游戏的,那些人就是觉得买Mac亏,估计还很穷吧🤣。
顺便一说,有个叫[AppleGamingWiki](https://www.applegamingwiki.com/wiki/Home)的网站上记录了一些比较大的游戏在M系列芯片上的兼容性,如果真的有想在Mac上打游戏的想法,也可以去这个Wiki上参考一下。
+24
View File
@@ -0,0 +1,24 @@
---
layout: post
title: rpi4-openfyde的使用体验
tags: [树莓派, openfyde]
---
什么样的系统用户体验更好呢?<!--more-->
# 起因
最近玩树莓派感觉有点玩腻了,毕竟我不是搞硬件的人,树莓派的GPIO接口对我来说毫无意义,当作PC或者服务器的话性能又太差了,兼容性也不太行(这么看来新出的树莓派5一样对我来说毫无意义,和4B一样都是垃圾)。但是毕竟那个东西也挺贵的,闲置也不太好,因此我想在上面装上适合普通人使用的系统,然后送给家里的人使用。
# 系统的选择
首先服务器版的系统肯定不需要考虑了,谁会用一个满是命令行的系统啊,在我看来普通人使用的系统只能在Windows, MacOS, Android, ChromeOS里面选了,任何GNU/Linux发行版的桌面版在我看来都不太适合普通人使用,[Windows之前已经试过了](/2023/05/22/rpi-win.html),可以说基本上没法用,就是纯粹的垃圾。MacOS显然还没有什么方案可以安装(至于仿MacOS的TwisterOS对于普通人来说使用难度也很大,安装软件都是难事),Android虽然也不是不能用但是作为桌面端系统效果还是不太行,所以我觉得可能也就只有ChromeOS可以考虑一用了。
不过官方的ChromeOS要支持的设备才能刷,树莓派显然不在其中,要么就刷ChromiumOS,但是那个要登谷歌账号,在国内使用也不太好。幸好国内有一家对ChromeOS做了本地化的公司,开发了FydeOS,我看了一下如果想在树莓派上安装,就只能安装FydeOS for You,但那个是收费的,每年要120CNY,太贵了,我肯定是不会考虑的。还好,还有一个替代品,那就是openFyde,两个系统我也不太清楚有什么区别,可能是云服务有所不同吧?对于树莓派来说,安装[rpi4-openfyde](https://github.com/openFyde/overlay-rpi4-openfyde)就可以了,另外想要安装的话最好选文件名中包含“archero”的那个,才能使用Android子系统。
# 安装与使用体验
第一次安装的时候我是直接把镜像用Raspberry Pi Imager刷进去的,我以为它和其他的树莓派系统一样刷进去之后再配置其他东西,结果并不是,那个镜像是个安装包,想要用的话需要先格式化TF卡,然后找一个U盘把系统刷进去,然后把U盘和TF卡都插入树莓派才能安装,就和安装ESXi一样。
安装之后拔掉U盘重启就可以创建用户使用了,首先作为浏览器为基础的系统,我平时用浏览器可能也就是看看Bilibili吧,之前我使用树莓派官方系统的浏览器看Bilibili效果非常差,看看装了openFyde的效果怎么样?结果令人失望,效果还是一样的差,主要应该还是没有硬件解码的问题吧……树莓派4B的GPU好像只支持硬件解码H264,而树莓派5更是卧龙凤雏,只支持H265,真是有够逆天。这么说来FydeOS for You可是要每年120CNY呢,这个水平的性能他们有自己测过吗?就这样也能收费吗?至于其他不涉及视频的网页倒是还算流畅,不过毕竟GPU很垃圾,有一些特殊情况还是会卡。
除了浏览器之外,可能用的比较多的就是Android子系统了吧,要是想轻度办公的话应该需要一个Office,用浏览器的Office也不太好,所以先安装个WPS Office试试看,这个从Fyde的应用商店里就能直接安装,还挺方便的。不过安装好之后效果感觉不太行,首先这个Android子系统居然不支持滚轮,复制粘贴都要像手机那样长按,而且很多时候比如新建文档,它会开两个窗口,原来新建文档的窗口不会关掉……这可不像是能让人用的样子啊……而且整体使用也比浏览器卡,使用起来并不顺畅。另外输入法也不是默认开启的,要在设置里设置,体验也不太行。
我试了一下那个应用商店,上面的应用要么就是网页链接,要么就是Android程序,要么就是浏览器插件,Android程序从我用了WPS Office来看不怎么抱有希望了,放网页链接的我感觉有点无语😓,其他系统的浏览器都能把网页当作应用,这个系统反倒是直接当超链接跳过去了……至于浏览器插件,那个只要是能安装浏览器就都能用吧,没啥特别的。
虽然普通人可能用不上,这个系统还有一个Linux子系统,具体是什么Linux我没细看,不过好像是使用容器启动的。我试了一下效果还行,只是不知道为什么不能使用全部内存,我使用的是8GiB的树莓派,但是分配给Linux的只有6GiB,存储也是分配的,默认10GiB。明明都是Linux系统为什么ChromeOS要限制子系统的资源呢?
# 总结
总的用下来,树莓派4B的性能可能真的就只能看看网页了,连视频都不能流畅播放,安装Android应用效果也很差,不过有时候限制多并不是一件坏事,毕竟对普通人来说如果这个性能让人不要抱有更多的希望,反倒是提高了用户体验呢。虽然如果是用比如Ubuntu之类的系统能做的事情应该更多,但很多情况不是普通人应该关心的事情,尤其这个芯片还是ARM指令集的,即使某些应用提供了Linux版也不一定能在树莓派上安装,尤其这个安装很多时候也不是双击就能搞定的,openFyde至少能做到真想安装Android应用的时候双击还是能安装的,卡虽卡了点,但是一般情况不会出现让普通人看了会看不懂的情况,已经算很不错了。
因此,我觉得如果让普通人使用树莓派,安装openFyde是最好的选择了。
+24
View File
@@ -0,0 +1,24 @@
---
layout: post
title: 如何在Linux容器内运行Android
tags: [Linux, Android]
---
原生运行Android肯定比虚拟机好!<!--more-->
# 起因
前段时间我在树莓派上安装了[openFyde](/2023/12/10/openfyde.html),后来发现原来它的ArcHero安卓子系统是基于anbox开发的,和ChromeOS的安卓子系统有一些区别,至于区别在哪我也不是特别清楚。不过既然它的安卓子系统和Linux直接安装的没啥区别,那不如我试试看在普通的Linux上安装容器化的安卓系统效果怎么样?
# 试用Waydroid
最开始我测试的是[Waydroid](https://github.com/waydroid/waydroid),因为听说anbox的升级版就是Waydroid,据说性能比anbox强,所以想试试看,安装挺简单的,执行个脚本之后用apt就能安装。不过我的测试平台是Ubuntu Server 20.04LTSWaydroid之所以叫这个名字是因为它要基于Wayland显示服务器运行,可我是无界面的系统要怎么用它啊?Waydroid好像没有无头模式这种东西,不过我搜了一下weston实现了Wayland协议而且支持无头模式,用法也很简单,安装好weston之后执行`weston --backend=headless-backend.so`就可以了。
不过默认安装好的Waydroid不能运行ARM架构的程序,似乎是因为libhoudini之类的库是有版权的,所以不能直接集成,不过还好有人开发了一个[工具包](https://github.com/casualsnek/waydroid_script),可以给Waydroid安装包括libhoudini在内的多个因为版权等原因不能直接在项目里使用的程序,而且操作起来也很简单,体验还不错。
至于怎么查看界面,因为是无头模式启动的所以没有界面,只能通过adb查看,不过我试了一下scrcpy不知道为什么不能用,但是用Airtest就能看到界面,就挺奇怪的……还有就是分辨率很低,不过这个应该改weston的启动参数就可以改分辨率了吧,但因为后来发现Waydroid不能开多个实例感觉有点废物就没有在继续研究了。
不过总的来看,如果是在桌面版的Linux上,而且界面是使用Wayland协议的效果应该会比较好,好像Ubuntu22.04以上的系统默认会使用Wayland,在这个系统上面使用Waydroid效果应该比在Windows上使用WSA的效果还要好。毕竟这可不是虚拟机运行,而是使用容器技术原生运行的,如果有机会的话还是值得一用的。
# 试用redroid
因为Waydroid不能开多个实例,所以我搜了一下有没有类似技术而且能开多个实例的,结果就找到了[redroid](https://github.com/remote-android)。安装也很简单,执行几个命令修改下内核模块然后直接用docker pull个镜像就可以用,而且这个切换版本比Waydroid简单,Waydroid想换别的安卓版本要自己整镜像,不然就只能用基于Android 11的LineageOSredroid可以按镜像的版本号选择希望使用的安卓版本,而且我测试了一下,redroid是可以使用scrcpy连接的,看起来效果还不错。
但是我试了一下运行一些ARM的安卓程序会出现闪退的情况,我以为是因为没有ARM兼容库的问题,但是文档上写的镜像里面已经自带了libndk……这么看来可能是因为libndk的兼容性不太行啊,另外libndk好像是给AMD的CPU使用的,我用的CPU是Intel的,Intel应该用libhoudini才对,然而我找了半天也没有找到怎么让redroid使用libhoudini……真是令人失望啊。
# 总结
看来在容器内运行Android系统的需求还是太少了,很多问题都没人解决……不过想想也是,那些搞云手机的大多直接拿真机运行Android,用兼容层的性能损耗也很大,而服务器级别的ARM芯片也不便宜……
另外就是使用Linux的人也很少,而且像那些在Windows上玩安卓游戏的人都是用的虚拟机,性能也都够用了,毕竟那么高功率的桌面端CPU怎么样都比超低功率的手机CPU强啊,所以容器内运行Android的需求比较少可能也很正常吧……

Some files were not shown because too many files have changed in this diff Show More