mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2026-07-22 03:33:22 +08:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2fd191d418 | |||
| 99ec7de3cd | |||
| cd294479e0 | |||
| b7ab4e6356 | |||
| 934c04aea7 | |||
| 5c7773fb59 | |||
| 41ce7aabb0 | |||
| cbe4db5992 | |||
| 04e63388b6 | |||
| 106aa95def | |||
| f1e7070380 | |||
| 10a3521795 | |||
| 881ed13576 | |||
| 982a87e0bf | |||
| 5097364988 | |||
| c437b255f1 | |||
| efaaa32674 | |||
| 8a51f7a942 | |||
| afe8b95115 | |||
| 2aad4be863 | |||
| 74cb7d028c | |||
| d74fe7b4b8 | |||
| 8f7d02697d | |||
| 4afea923c5 | |||
| e6281bfa5f | |||
| a4e9d17cf1 | |||
| 975fcf9d8e | |||
| 1734d36dd5 | |||
| eefdb73475 | |||
| c622346eaa | |||
| 7609bb0b8f | |||
| 2298c9b271 | |||
| f9abd1e5d7 | |||
| 62ea62e8e8 | |||
| 3dc82a814a | |||
| 09c88ebf18 | |||
| 2aed9e9d90 | |||
| bfe05eef58 | |||
| 5713b1b477 | |||
| 52eb8cd0a7 | |||
| c17b6f0971 | |||
| e7ad732f8d | |||
| 8b6738dcef | |||
| c52e7ded82 | |||
| 2df79d6a44 | |||
| 59688d1e1f | |||
| 86edb37efb | |||
| d06229e705 | |||
| 385b842c80 | |||
| 1cd08a24bd | |||
| c664d9e93a | |||
| 8dcfcaeb7b | |||
| 57f8e30bf4 |
+2
-2
@@ -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:
|
||||
|
||||
+5
-5
@@ -105,31 +105,31 @@
|
||||
<g class="stagger" style="animation-delay: 450ms" transform="translate(25, 0)">
|
||||
<line x1="12" y1="6.25" x2="19" y2="6.25"
|
||||
style="stroke:rgb(255,255,255);stroke-width:2"/>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[0].title }}</text>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[0].title | truncate: 18 }}</text>
|
||||
</g>
|
||||
</g><g transform="translate(0, 25)">
|
||||
<g class="stagger" style="animation-delay: 600ms" transform="translate(25, 0)">
|
||||
<line x1="12" y1="6.25" x2="19" y2="6.25"
|
||||
style="stroke:rgb(255,255,255);stroke-width:2"/>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[1].title }}</text>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[1].title | truncate: 18 }}</text>
|
||||
</g>
|
||||
</g><g transform="translate(0, 50)">
|
||||
<g class="stagger" style="animation-delay: 750ms" transform="translate(25, 0)">
|
||||
<line x1="12" y1="6.25" x2="19" y2="6.25"
|
||||
style="stroke:rgb(255,255,255);stroke-width:2"/>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[2].title }}</text>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[2].title | truncate: 18 }}</text>
|
||||
</g>
|
||||
</g><g transform="translate(0, 75)">
|
||||
<g class="stagger" style="animation-delay: 900ms" transform="translate(25, 0)">
|
||||
<line x1="12" y1="6.25" x2="19" y2="6.25"
|
||||
style="stroke:rgb(255,255,255);stroke-width:2"/>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[3].title }}</text>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[3].title | truncate: 18 }}</text>
|
||||
</g>
|
||||
</g><g transform="translate(0, 100)">
|
||||
<g class="stagger" style="animation-delay: 1050ms" transform="translate(25, 0)">
|
||||
<line x1="12" y1="6.25" x2="19" y2="6.25"
|
||||
style="stroke:rgb(255,255,255);stroke-width:2"/>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[4].title }}</text>
|
||||
<text class="stat bold" x="25" y="12.5">{{ site.posts[4].title | truncate: 18 }}</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
@@ -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>
|
||||
+102
-58
@@ -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 %}
|
||||
{% 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]-->
|
||||
@@ -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比平板的续航更长,就是重量也更重了。
|
||||
|
||||
@@ -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吧。
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
layout: post
|
||||
title: 使用树莓派安装Windows的尝试
|
||||
tags: [树莓派, Windows]
|
||||
---
|
||||
|
||||
树莓派能不能作为迷你主机使用呢?<!--more-->
|
||||
|
||||
# 起因
|
||||
前段时间,家里人送给了我一个树莓派4B-8GiB内存版,因为手头用着MacBook Pro,看到这个比我之前用的树莓派3B好了不少的东西,就开始想它能不能和用着一样是ARM架构的Mac Mini M2那样使用,当然想给树莓派安装黑苹果那就是天方夜谭了,毕竟macOS里用到的很多东西也不完全只是ARM,想想也知道既然是苹果自己研发的芯片,里面肯定是有一些比如专有的指令集什么的,树莓派应该算是公版的ARM吧?肯定有些指令是没有的……不过我还是愿意仿个macOS试试看,我在网上看好像[TwisterOS](https://twisteros.com)仿macOS的效果最好,而且它是基于树莓派官方系统开发的,所以应该也没啥兼容性的问题,另外它其他的主题比如仿Windows的做的也不错,但仿Windows还不如给它装一个真正的Windows,毕竟网上是有能够给树莓派安装Windows ARM版的办法的。
|
||||
|
||||
# 给树莓派安装Windows
|
||||
最开始我想给树莓派安装Windows的时候手头没有Windows的电脑,但是给树莓派安装Windows所用的软件[Windows on R](https://worproject.com)貌似用到了Windows上的一些东西。不过他们提供了一种可以先给卡里安装WinPE然后再安装系统的办法,最开始我是先尝试的那种方案,我可以先用一张安装了树莓派官方系统启动树莓派,然后用[WoR-flasher](https://github.com/Botspot/wor-flasher)给另外一张卡安装WinPE以及系统镜像。操作很简单,照着README做就行了,不过不知道是为什么,尝试了好几次,每次安装到一半就卡住然后报错安装失败,然后连WinPE都进不去了……
|
||||
我怀疑是通过这种方式安装可能有什么问题,而且当时安装到时候卡是32GiB大小的,虽然官网上说32GiB是足够的,不过也许还是有什么问题?所以后来我重新买了一张64GiB的卡片,并且用Windows去运行Windows on Raspberry imager给卡里安装了Windows 11,不过很奇怪的是还是运行不了……换了好几个系统镜像都不行,后来才发现原来是我自作多情每次启动的时候都把频率调成2.2GHz所以不能启动,默认的1.5GHz或者调高到2.0GHz都没有问题😥,因为这个问题尝试了好多次……
|
||||
|
||||
# 在树莓派上的Windows体验
|
||||
安装好之后就可以尝试验证树莓派的生产力了,不过结果让我很失望……首先是我用的TF卡是UHS-1,写速度貌似是10MiB/s?读速度商家宣传是130MiB/s不过实际上我也不太清楚,随机读写估计就更慢了……这样的速度加载东西实在是有够慢……另外目前[在树莓派上使用的Windows驱动](https://github.com/worproject/RPi-Windows-Drivers)里并没有无线网卡和核显的驱动,所以体验也很差,移动窗口之类的操作CPU都占用了不少,我本来还想着考虑能不能比Macbook开虚拟机效果好一些,不过目前来看这个结果应该是只差不好吧……虽然价格上树莓派和Mac Mini M2差了4倍,不过体验这么差的话估计当生产力是没机会了。
|
||||
|
||||
# Linux的生产力对比
|
||||
相比之下用树莓派官方的系统感觉要流畅不少,毕竟官方系统的所有驱动都是正常工作的,应该也能使用硬件解码,只是有些桌面版的程序没有,比如MS Office,还有像7-Zip、WinSCP、XShell之类的软件 ~~(其实macOS也不行🤣)~~ ……用Wine怎么样呢?其实我觉得应该好不到哪里,毕竟大多数Windows的程序都是x86_64指令集,Wine想要运行这些软件照样得靠QEMU翻译,只不过可能调用的一些Windows的API可以原生执行而已,除了这些之外,我还试了试用Chromium播放Bilibili的视频,结果也令人大失所望,360p的视频都不能流畅播放,更别说1080p了(当然也不排除是因为Bilibili的视频用了硬件解码器不能解码的编码方式),虽然相比树莓派3B来说确实至少可以流畅浏览网页了,但是连视频都不能流畅播放那看来想当生产力还很远呢。
|
||||
|
||||
# 感想
|
||||
果然树莓派还是没有办法当作普通的电脑来用啊,更不用说生产力了,同样的价格至少还能组个能打游戏的电脑。尽管性能比树莓派3B好不少,但毕竟用的还是很低级的芯片,也许它就应该当作物联网的开发板来使用吧,但很奇怪的是如果是这样,树莓派3B就足够了吧,何必开发树莓派4B以及带键盘的树莓派400呢?还有就是树莓派CM4,他们不会真以为自己的芯片速度很快吧🤣?
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user