Skip to content

Instantly share code, notes, and snippets.

View hyoban's full-sized avatar
🏠
Working from home

Stephen Zhou hyoban

🏠
Working from home
View GitHub Profile
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Battery Notification
# @raycast.mode inline
# @raycast.refreshTime 30s
# Optional parameters:
# @raycast.icon 🔋
@hyoban
hyoban / .gitconfig
Last active April 21, 2024 07:07
Hyoban's dotfiles
[user]
name = Stephen Zhou
email = hi@hyoban.cc
signingkey = /Users/hyoban/.ssh/id_ed25519.pub
[init]
defaultBranch = main
[core]
excludesfile = ~/.gitignore_global
quotepath = false
[gpg]
@hyoban
hyoban / comment.tsx
Created March 31, 2023 06:31
giscus next.js 组件
"use client"
import { useDark } from "@/app/hooks/useDark"
import siteMetadata from "@/site.config.cjs"
import { useEffect } from "react"
export const Giscus = () => {
const {
repo,
repositoryId,
{
"basics": {
"name": "Stephen Zhou",
"label": "Next.js fullstack developer",
"image": "https://hyoban.cc/hyoban.png",
"email": "hi@hyoban.cc",
"phone": "15555318352",
"url": "https://hyoban.cc",
"summary": "My name is Zhou Yunliang, and Hyoban is my online ID, Stephen Zhou is my English name. I was born in September 1999, making me 23 years old. I am currently pursuing a master's degree in Computer Science and Technology at North China University of Technology. As a front-end developer, I specialize in Next.js and TypeScript. I am passionate about open-source and am one of the maintainers of memos. I strive for code quality and remain enthusiastic about front-end development. I am eager to learn new technologies and apply them to my work.",
"location": {
// @deno-types="https://unpkg.com/xlsx@0.18.5/types/index.d.ts"
import * as XLSX from "https://unpkg.com/xlsx@0.18.5/xlsx.mjs";
// convert excel to csv
const workbook = XLSX.readFile(
"D:\\traffic\\云瞳在用卡口设备(含综合设备).xlsx",
);
XLSX.writeFile(workbook, "D:\\traffic\\云瞳在用卡口设备(含综合设备).csv");
https://rsshub.app/openai/blog
https://astro.build/rss.xml
https://zed.dev/blog.rss
https://devblogs.microsoft.com/typescript/feed
https://www.warp.dev/blog/rss.xml
https://unjs.io/rss.xml
https://www.ximalaya.com/album/53875103.xml
https://bytetalk.fm/index.xml
https://feeds.fireside.fm/echojs/rss
@hyoban
hyoban / main.py
Created June 8, 2022 13:28
迁移 github 仓库到自建 gitea 仓库
import requests
token = ''
gitea_server = ''
gitea_token = ''
def get_repositories():
url = 'https://api.github.com/user/repos'
headers = {'Authorization': 'token {}'.format(token)}
const fs = require('fs')
const chokidar = require('chokidar')
const appBaseWxssPath = './appbase.wxss'
const tailwindFilePath = './dist/tailwind.css'
fs.readFile(appBaseWxssPath, (readError, data) => {
if (readError) {
console.error(readError)
}
@hyoban
hyoban / TimeDemo.java
Created February 21, 2022 14:23
java time 相关的类
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Clock;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.Calendar;

使用 Selenium 以及 Xpath 进行爬虫实战

环境准备

下载安装 chrome 浏览器,需要注意的是要使用 apt install -f 来安装软件需要的依赖。 安装完成之后请尝试打印软件版本,之后下载驱动的版本要和输出的版本号一致。

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb

sudo apt install -f