upaste-rs: 一个 Ubuntu Pastebin 的命令行程序

简介

UPaste-Rs 是一个命令行应用程序,允许您更快速的、直接在终端上创建 Paste

用法

upaste-rs [选项] [文本]

参数:
  [文本]  将要提交的文本

Options:
  -s, --syntax <SYNTAX>          语法高亮类型 [默认: text]
  -e, --expiration <EXPIRATION>  过期时间 [默认: ]
  -p, --poster <POSTER>          Ubuntu Pastebin 用户名
  -h, --help                     查看帮助
  -V, --version                  查看版本
不指定文本时,将从系统默认编辑器输入

许可证

upaste-rs - A CLI Application for Ubuntu PasteBin
Copyright (C) 2024  XiaoDeng3386, Shirasawa-CN

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

OneDisc: Discord 平台的 OneBot 实现

简介

OneDisc 是一个 Discord 平台的开源 OneBot 实现

在 Discord 上实现了 OneBot V11 / V12 标准,并做了一些拓展

理论支持连接 NoneBot2、koishi 等所有支持 OneBot V11 / V12 标准的框架

使用

快速开始

性能

内存占用约 70MB1,稳定运行无报错


  1. 启用了心跳事件、合并转发转图片等功能,所以内存占用偏大

Docker 搭建 GitHub Actions Runner 配置参考

我们相信您已经对 Docker 有了一定了解,如果没有,请自行百度。以下脚本为作者自用,仅供参考,不保证绝对的通用性

Dockerfile

FROM ubuntu:latest

# set the github runner version
ARG RUNNER_VERSION="2.309.0"

# update the base packages and add a non-sudo user
RUN apt-get update -y && apt-get upgrade -y && useradd -m docker &&\
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends curl libssl-dev python3 python3-pip\
    && cd /home/docker && mkdir actions-runner && cd actions-runner \
    && curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
    && tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \
    && rm ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz\
    && chown -R docker ~docker && /home/docker/actions-runner/bin/installdependencies.sh \
    && apt remove curl libssl-dev python3 python3-pip -y \
    && apt autoremove -y && apt clean\
    && apt-get update && apt-get install -y sudo lsb-release && apt-get clean all \
    && echo "docker ALL=(ALL:ALL)  NOPASSWD:ALL" >> /etc/sudoers \
    && sudo -u docker ./config.sh --url https://github.com/<YOUR_ORG_OR_REPO_HERE> --token <YOUR_TOKEN_HERE>

# since the config and run script for actions are not allowed to be run by root,
# set the user to "docker" so all subsequent commands are run as the docker user
USER docker

WORKDIR /home/docker/actions-runner

COPY start.sh start.sh

# set the entrypoint to the start.sh script
CMD ["/home/docker/actions-runner/start.sh"]

start.sh

请在构建前确保此脚本有执行权限
#!/bin/sh

./run.sh

reset.sh

请在开启自动重置前确认此脚本有执行权限
#!/bin/sh

# 定义容器和镜像的名称
CONTAINER_NAME="actions-runner"
IMAGE_NAME="actions-runner"

# 停止并删除容器(如果存在)
docker stop $CONTAINER_NAME
docker rm $CONTAINER_NAME

# 创建并启动新容器
docker run --name $CONTAINER_NAME -d $IMAGE_NAME

# 输出提示信息
echo "The container $CONTAINER_NAME has been reset."

auto_reset.sh

自动重置脚本,需要 root 权限
while (true);
do
    ./reset.sh
    sleep 86400
done

从U盘翻出的古早的项目

没错,我还活着

今天在整理 U 盘的时候突然翻出来了一些很久以前写的项目,因为太闲所以发出来。

下载地址

链接: https://pan.baidu.com/s/1-pci\_AYao2FdzJhon0vPNw
提取码: 83sy

链接: https://pan.baidu.com/s/10CRh1uLjSiqhYysz04AxLw
提取码: c7zu

温馨提示

其中大部分项目已停止维护,不保证其可用性,请秉着「能跑就行,不能跑就算了」理念阅读这些项目的代码。不建议学习代码的写法。

我也没认真翻过,所以我不知道会翻出什么奇奇怪怪的东西。

Minecraft 或将停止在中国大陆的服务

{% alertbox info "以下内容来自 https://www.mcrjun.cn/archives/484" %}

本文中提到的所有 Minecraft 均指的是由 Microsoft Corporation 运营的一款游戏,与网易公司代理的游戏《我的世界》无关联

近日部分中国玩家在自己的 Xbox 上打开 Minecraft 时收到了一条通知:「在您所在的地区内,我们即将无法支持此设备。」
Minecraft For Windows/Xbox 现在也已经无法从中国大陆购买,这可能代表着 Minecraft 即将停止在中国大陆的服务

部分中国玩家在自己的 Xbox 上打开 Minecraft 时收到了这样的通知:

该通知提到:最终版本发布后,您的地区无法再联网购买内容,但仍可下载已购项目或本地游玩,设备上的 Realm 服务器在 2023 年 9 月 30 日之后会停服

目前只有 Xbox 用户收到此通知,Windows 玩家则未收到这个通知,但是这段提示已经可以在 Minecraft For Windows 的数据文件中找到:

现在尝试在官网购买 Minecraft,如果你的 IP 地址在中国境内,付款时则会出现报错,无法购买,在官网查询 Minecraft 相关信息时,也出现了 502 报错:

Microsoft Store 目前也无法购买 Minecraft,但是已经购买 Minecraft 的玩家仍然可以下载,如果你担心未来无法正常更新 Minecraft,建议将 Microsoft 账户地区设置为中国大陆以外的地区

虽然 Microsoft 尚未发出官方通知,但是根据 Xbox 上的提示以及游戏数据中的文字可以推测,国际版的 Minecraft 可能无法再在中国大陆更新了。

此前,Microsoft/Mojang 运营的 Minecraft 虽然可以在中国下载,但是未按照国家相关要求添加防沉迷等保护措施,而网易代理的《我的世界》遵守了这一规定,这可能是 Minecraft 发出此通知的一个原因。

{% alertbox warning "以下内容不属于 https://www.mcrjun.cn/archives/484" %}

也有一定迹象表明,Minecraft 本次 “锁区” 很可能只是一个临时性的操作,一段时间过后可能会恢复正常。