Skip to content

Instantly share code, notes, and snippets.

View shijiezhou1's full-sized avatar

Shijie Zhou shijiezhou1

View GitHub Profile
@shijiezhou1
shijiezhou1 / index.jsx
Created May 26, 2025 06:52
react-select + react-window
import CreatableSelect from "react-select/creatable";
import { FixedSizeList as List } from "react-window";
const Home = () => {
// Generate 10,000 random string options
const options = Array.from({ length: 10000 }, (_, i) => ({
value: Math.random().toString(36).substring(2, 10) + i,
label: Math.random().toString(36).substring(2, 10) + i,
}));
@shijiezhou1
shijiezhou1 / handsontable.html
Last active December 18, 2024 14:07
Teach you how to make a simple handsontable
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.css" />
<script src="https://cdn.jsdelivr.net/npm/handsontable/dist/handsontable.full.min.js"></script>
<style>
@shijiezhou1
shijiezhou1 / client.py
Created May 27, 2024 13:53
Client site command sender
import socket
HOST = '127.0.0.1'
PORT = 65432
def send_command(conn, command):
conn.sendall(command.encode())
while True:
data = conn.recv(1024)
if not data:
@shijiezhou1
shijiezhou1 / server.py
Created May 27, 2024 13:52
listen on command server
import socket
import subprocess
HOST = '127.0.0.1'
PORT = 65432
def handle_client(conn):
try:
while True:
# 接收数据
@shijiezhou1
shijiezhou1 / ABOUTME.gif
Last active April 19, 2023 13:15
AboutMe
ABOUTME.gif
@shijiezhou1
shijiezhou1 / img_gist
Created December 15, 2022 03:53
img_gist
img_gist
@shijiezhou1
shijiezhou1 / re-assign.js
Created March 8, 2022 06:18
Reassign const value
Reassign const
const { type, title, description } = MAP[status];
({ type, description } = MAP[status]);
@shijiezhou1
shijiezhou1 / script.sh
Created March 15, 2022 08:13
Moving all file with same extension in mac terminal
find ~/Desktop/xxx/ -name "*.ext" -exec mv -i {} -t ~/Desktop/xxx \;
@shijiezhou1
shijiezhou1 / container.js
Last active January 10, 2022 01:27
Vue3 Todo
<template>
<div class="container">
<input
type="text"
v-model="msg"
>
<button @click="Create">Create</button>
<TodoList
:TodoLists="TodoLists"
:Delete="Delete"
@shijiezhou1
shijiezhou1 / calculator.js
Last active November 7, 2021 06:25
calculator.js
var calculate = function (s) {
const stackData = lexer(s);
// console.log({stackData});
return run(stackData);
};
function run(stack) {
let pos = 0;