ITPub博客

首页 > 数据库 > 数据库开发技术 > 【Rust 日报】2023-1-22 支持VR的围棋游戏

【Rust 日报】2023-1-22 支持VR的围棋游戏

原创 数据库开发技术 作者:Rust语言中文社区 时间:2023-01-23 23:38:29 0 删除 编辑

支持VR的围棋

Rust 实现的支持 VR 和球状棋盘。

App:https://dgs.dominux.site/

GitHub:https://github.com/Dominux/DGS

Find+Grep

类 SQL 的 Find+Grep。示例:

# 找到当前目录下名字等于 sample 的所有文件
fgr -e name=sample

#
找到文件名包含 s 且权限为 777 的文件
fgr /home /bin -e 'name=*s* and perm=777'

#
找到文件名包含 SAMPLE 的文件
fgr /home -e 'name="*SAMPLE*"'

#
同上,忽略大小写
fgr /home -e 'name=i"*SAMPLE*"'

#
同上,正则
fgr /home -e 'name=r".+SAMPLE.+"'

#
同上,正则+忽略大小写
fgr /home -e 'name=ri".+SAMPLE.+"'

#
找到 /bin 下不属于 root 的文件
fgr /bin -e 'user > 0'

#
找到 /bin 下拥有 suid bit (但不限于) 的文件
fgr /bin -e 'perms>4000'

#
找到最近访问过的文件 (不是未来):
fgr /home -e 'atime > now - 1h and atime < now'

#
在文件中查找 stuff:
fgr /home -e 'type=text and contains=*stuff*'

GitHub:https://github.com/night-crawler/fgr

Airsim客户端

Airsim 是什么?它是来自 Microsoft AI & Research 团队的基于虚拟引擎/Unity 构建的自动驾驶汽车开源模拟器。

Airsim 启动后可以执行下面的样例:

use airsim_client::{DrivetrainType, MultiRotorClient, NetworkResult, Path, Vector3, YawMode};
use async_std::task;

async fn connect_drone() -> NetworkResult<()> {
let address = "<Airsim IP here>:41451"; // set with env variable
let vehicle_name = ""; // use default vehicle name
log::info!("Start!");

// connect
log::info!("connect");
let client = MultiRotorClient::connect(address, vehicle_name).await?;

// confirm connect
log::info!("confirm connection");
let res = client.confirm_connection().await?;
log::info!("Response: {:?}", res);

// arm drone
log::info!("arm drone");
client.arm_disarm(true).await?;
log::info!("Response: {:?}", res);

// take off
log::info!("take off drone");
client.take_off_async(20.0).await?;
log::info!("take off completed");

log::info!("move on path");
client
.move_on_path_async(
Path(vec![
Vector3::new(-25.0, 0.0, -20.0),
Vector3::new(-50.0, 50.0, -20.0),
Vector3::new(-50.0, -50.0, -25.0),
]),
5.0,
1000.0,
DrivetrainType::MaxDegreeOfFreedom,
YawMode::new(false, 90.0),
None,
None,
)
.await?;
log::info!("done!");

log::info!("go home");
client.go_home_async(20.0).await?;
log::info!("got home");

log::info!("land drone");
let landed = client.land_async(20.0).await?;
log::info!("drone landed: {landed}");

log::info("Disarm drone")
client.arm_disarm(false).await?;
client.enable_api_control(false).await?;
Ok(())
}

fn main() -> NetworkResult<()> {
env_logger::init();
task::block_on(connect_drone())
}

GitHub:https://github.com/Sollimann/airsim-client

ScyllaDb和Cassandra的ORM

Catalytic 是 ScyllaDb 和 Cassandra 的 ORM,它为基于数据库查询和生成 Rust structs 提供了零成本抽象。Scylla 和 Cassandra 都是NoSQL 数据库,可以水平扩展并保存大量数据。

GitHub:https://github.com/Jasperav/Catalytic

k8s周五不发布

此控制器会在某些日期阻止部署。

Demo:https://asciinema.org/a/1rndARD0wS2B0AcWAIf1yiKZG

GitHub:https://github.com/Razikus/its-friday-k8s-admission-controller

Windows热键守护

whkd 是一个简单的 Windows 热键守护程序,它通过执行命令对输入事件做出反应。示例:

.shell pwsh # can be one of cmd | pwsh | powershell

# reload configuration
alt + o : taskkill /f /im whkd.exe && Start-Process whkd -WindowStyle hidden

# app shortcuts
alt + f : if ($wshell.AppActivate('Firefox') -eq $False) { start firefox }

# focus windows with komorebi
alt + h : komorebic focus left
alt + j : komorebic focus down
alt + k : komorebic focus up
alt + l : komorebic focus right

GitHub:https://github.com/LGUG2Z/whkd

socks5 代理服务器

一个轻量的 SOCKS5 代理服务器:

  • 多用户

  • 可配置

  • 无认证

  • 用户名/密码认证

安装启动:

cargo install koblas
koblas -a 0.0.0.0 --auth -u /path/to/users.toml

GitHub:https://github.com/ynuwenhof/koblas


From 日报小组 长琴

社区学习交流平台订阅:

  • Rustcc 论坛:支持 rss

  • 微信公众号:Rust 语言中文社区


原文作者:Rust语言中文社区;如有侵权,请联系管理员删除。

请登录后发表评论 登录
全部评论

注册时间:2020-06-11

  • 博文量
    1769
  • 访问量
    718639