Skip to content

Instantly share code, notes, and snippets.

View aspirantzhang's full-sized avatar
🎯
Focusing

Aspirant Zhang aspirantzhang

🎯
Focusing
View GitHub Profile
@aspirantzhang
aspirantzhang / vscode-server-update.sh
Created September 15, 2023 01:25
VSCode Server Manual Update Script (WSL)
#!/bin/bash
echo "Enter commit hash:"
read hash
mkdir -p /root/temp
cd /root/temp
wget https://update.code.visualstudio.com/commit:$hash/server-linux-x64/stable -O vscode-server-linux-x64.tar.gz
tar zxvf vscode-server-linux-x64.tar.gz
rm -rf ~/.vscode-server/bin/*
@aspirantzhang
aspirantzhang / searchTree.test.ts
Created May 7, 2021 09:08
[function] searchTree - find a node in a tree
import { searchTree } from '../searchTree';
const validTree = [
{
id: 1,
parent_id: 0,
title: 'Level 1',
value: 1,
children: [
{