Skip to content

Instantly share code, notes, and snippets.

View LemonNekoGH's full-sized avatar

LemonNeko LemonNekoGH

View GitHub Profile
@LemonNekoGH
LemonNekoGH / TransferAllIntoOne.java
Created August 11, 2021 10:16
把指定文件夹中的所有指定后缀的文件转移到一个文件中(GC引入第三方库必备)
import java.io.File;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class TransferAllIntoOne {
public static void main(String[] args) throws Throwable {
File file = new File(".");
File to = new File("./Index.js");
@LemonNekoGH
LemonNekoGH / Loading.html
Last active August 30, 2021 09:32
尝试用 HTML 、 CSS 和 JS 复刻自己用 AE 做的加载动画
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>LemonNeko Loading Demo</title>
<style>
body {
padding: 0;
margin: 0;
}
@LemonNekoGH
LemonNekoGH / list_test.go
Last active June 29, 2022 08:17
Redis Commands Playground
package main
import (
"context"
"fmt"
"testing"
"github.com/go-redis/redis/v9"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@LemonNekoGH
LemonNekoGH / hideMouseAfter.ts
Last active March 16, 2023 10:01
A tool function use to hide cursor after specified time, show after move, and you can control this feature start and stop.
const useHideMouse = (time: number) => {
let timeoutId = -1
let lastElement
let lastElementCur = ""
const hideMouseAfter = (e: MouseEvent) => {
clearTimeout(timeoutId)
document.body.style.cursor = 'auto'
if (lastElement) {
lastElement.style.cursor = lastElementCur