Skip to content

Instantly share code, notes, and snippets.

View zjffun's full-sized avatar
:octocat:
I may be slow to respond.

Jufeng Zhang zjffun

:octocat:
I may be slow to respond.
View GitHub Profile
@zjffun
zjffun / github-pr-changelog.js
Created February 9, 2024 03:48
GitHub PR Changelog
// ==UserScript==
// @name GitHub PR Changelog
// @version 0.1
// @description Get the changelog of a PR in GitHub
// @match https://github.com/*/*/pull/*
// @run-at context-menu
// ==/UserScript==
function getPathInfo(pathname) {
const paths = pathname.split("/");

5-4

I continued finding remote jobs today. I prepare to complete my information on 3 platform tomorrow. There are 3 small cats out of my window today. It seemed no one was adopting them, so I bought some food for them. In the afternoon, there left 2 kitties, may be one of them has been adopted.

5-3

I bought some strawberries for my friend. I start finding remote jobs today. This is the first step for tomorrow.

5-2

@zjffun
zjffun / name-spell-checker-dic.txt
Last active January 23, 2023 17:04
name-spell-checker-dic
# front-end
HTTP
HTTPS
WebSocket
Stylus
pnpm
UnoCSS
Vite
rollup.js
function debounce(func) {
return function (...args) {
console.log("args", args);
func(...args);
};
}
let password = document.querySelector('[name="password"]');
const debouncedFn = debounce(function (e) {
@zjffun
zjffun / character_classes-diff.md
Last active July 24, 2022 16:15
character_classes diff

title: Character classes slug: Web/JavaScript/Guide/Regular_Expressions/Character_Classes tags:

  • Guide
  • JavaScript
  • Reference
  • RegExp
  • Regular Expressions
  • character classes
// ==UserScript==
// @name Set contentEditable
// @version 0.1
// @description Set contentEditable
// @match *://*/*
// @run-at context-menu
// ==/UserScript==
document.body.contentEditable = "true"
@zjffun
zjffun / loading.html
Last active March 2, 2022 12:10
loading
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Loading</title>
<style>
svg {
display: block;
@zjffun
zjffun / diary.md
Last active January 1, 2024 11:22
Diary
@zjffun
zjffun / set-level-for-loglevel.js
Last active January 19, 2022 09:38
Set Level For Loglevel
// ==UserScript==
// @name Set Level For Loglevel
// @version 0.1
// @description Set Level For Loglevel
// @match *://*/*
// @run-at context-menu
// ==/UserScript==
// "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3, "ERROR": 4, "SILENT": 5
window.localStorage.setItem('loglevel', 'INFO')
@zjffun
zjffun / download-html.js
Created January 19, 2022 09:30
Download HTML
// ==UserScript==
// @name Download HTML
// @version 0.1
// @description Download HTML
// @match *://*/*
// @run-at context-menu
// ==/UserScript==
(()=>{
function download(blob, fileName) {
var a = document.createElement("a");