Skip to content

Instantly share code, notes, and snippets.

View yunyuyuan's full-sized avatar
💤
hi

云与原 yunyuyuan

💤
hi
View GitHub Profile
@yunyuyuan
yunyuyuan / .zshrc
Created September 21, 2023 01:29
nvm setup
lazy_load_nvm() {
unset -f npm node nvm
export NVM_DIR=~/.nvm
[[ -s "$NVM_DIR/nvm.sh" ]] && source "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion"
}
npm() {
lazy_load_nvm
npm $@
@yunyuyuan
yunyuyuan / init.md
Last active January 10, 2024 08:01
stardust ipv6初始化

命令行脚本

scw instance server create type=STARDUST1-S zone=fr-par-1 image=arch_linux root-volume=l:10G name=v6instance ip=none ipv6=true project-id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx

基本初始化

  • 安装keyring:pacman -S archlinux-keyring
  • 全面更新系统:pacman -Syu
  • 安装vi并编辑DNS64:
pacman -S vi
@yunyuyuan
yunyuyuan / arror.ahk
Last active November 15, 2023 12:42
arrow auto hot key
#NoTrayIcon
^j::Send "{DOWN}"
^k::Send "{UP}"
@yunyuyuan
yunyuyuan / quick_sort.rs
Created April 15, 2022 02:31
rust quick sort
fn main() {
let mut list = vec![
12, 43, 54, 324, 1, 5, 6, 23, 98, 34, 65, 32, 58, 31, 4, 673,
];
let len = list.len();
quick_sort(&mut list, 0, len);
println!("{:?}", list);
}
@yunyuyuan
yunyuyuan / resignation.md
Created March 21, 2022 02:35
离职通知模板

《解除劳动合同通知书》

尊敬的领导:

您好!

现由于个人原因,经过郑重的思考,决定辞去■■■■■■一职,特此通知。

首先感谢公司对我的培养,长期以来对我的关心和照顾,使我得到了家庭般的温暖。和大家在一起的日子里,让我学到了很多知识,感谢过去■年时间内公司对我的培养和关怀。交接期间,我将全力配合公司做好交接工作,尽量减轻因我个人的原因而对公司造成的影响。

@yunyuyuan
yunyuyuan / dateParse.js
Last active March 21, 2022 02:36
日期差友好显示
function parseDate(stamp) {
const dayOld = dayjs.utc(stamp);
const dayNew = dayjs.utc();
const subDay = dayNew.diff(dayOld, 'day');
const subWeek = dayNew.diff(dayOld, 'week');
const subMonth = dayNew.diff(dayOld, 'month');
const subYear = dayNew.diff(dayOld, 'year');
if (dayOld.isToday()) {
return '今天'
}