Skip to content

Instantly share code, notes, and snippets.

View clansty's full-sized avatar
🐱
nyanyan~

凌莞~(=^▽^=) clansty

🐱
nyanyan~
View GitHub Profile
.bar {
--speed-factor: calc(1.5);
--speed-factor2: calc(100);
// 一条文字的宽度,包括 padding
--text-w: 330;
// 屏幕小会重叠,所以我们不能用屏幕宽度,我们要用所有字加起来的宽度
--single: calc(var(--text-w) * 10);
@clansty
clansty / activate-notification.applescript
Created April 2, 2022 13:26
用快捷键打开通知
tell application "Finder"
set screenResolution to bounds of window of desktop
end tell
set screenWidth to item 3 of screenResolution
tell application "System Events"
click at {screenWidth - 100, 100}
end tell
@clansty
clansty / nuist-avatar.user.css
Created February 10, 2022 06:12
i.nuist.edu.cn 头像
div.smallp-img {
background: url(https://cdn.lwqwq.com/pic/338886_dOfhnpC7.webp) !important;
background-size: cover !important;
}
@clansty
clansty / eatAndrocur.js
Created January 26, 2022 14:40
1.5 天吃 12.5 色,嘻嘻嘻
#!/usr/bin/node
const createDate = new Date('2022-01-26');
const nowDate = new Date();
const diff = nowDate - createDate;
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
const results = ["今天中午吃个色", "今天晚上吃个色", false];
const todayResult = results[Math.floor(days % 3)];
todayResult && console.log(todayResult);
@clansty
clansty / qcloud-serverless-3in1feed.js
Last active January 16, 2022 02:50
三合一投喂码(QQ,微信,支付宝),基于腾讯云函数部署。本来想做四合一的但是发现云闪付的收款码是临时的
function getRandomIntInclusive(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min; //含最大值,含最小值
}
const foods = ["吃薯片", "喝可乐", "吃海底捞", "吃肯德基", "打 maimai"];
const randomPickFood = () => foods[getRandomIntInclusive(0, foods.length - 1)];
const redir = (Location) => ({
isBase64Encoded: false,
pacstrap /mnt base base-devel linux-zen linux-zen-headers linux-firmware vim dhcpcd openssh
ln -s /usr/bin/vim /usr/bin/vi
# systemd-boot
bootctl --path=/boot install
bootctl update
vi /boot/loader/entries/arch.conf
# 全套 cjk 字体