Skip to content

Instantly share code, notes, and snippets.

View jinliming2's full-sized avatar
🐍
Lost in the maze......

Liming Jin jinliming2

🐍
Lost in the maze......
View GitHub Profile
@jinliming2
jinliming2 / README.md
Last active February 3, 2023 17:05
Steam in Chroot

You may follow Gentoo Wiki (or other guides) to install steam in chroot first. But you may failed to launch games like Dota2, because steam is using something called soldier and bwrap.

The steam.sh below can make soldier and bwrap work by mount chroot_dir twice. this works fine for me.

Save steam.sh file to /usr/local/bin/steam, so you can run steam command in terminal to launch steam, or add steam deeplink like steam steam://install/xxx.

To start steam without ask sudo password, add this to your sudoers file:

%wheel ALL=(ALL) NOPASSWD: /usr/local/bin/steam
@jinliming2
jinliming2 / index.html
Created July 29, 2022 15:31
Leaflet 地图,点聚合
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1/dist/leaflet.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet.markercluster@1/dist/MarkerCluster.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet.markercluster@1/dist/MarkerCluster.Default.min.css">
<style>
html, body, #map {
width: 100vw;
height: 100vh;
@jinliming2
jinliming2 / vscode-updater.sh
Last active July 9, 2023 15:03
Updater for VSCode on Linux. Check and Update VSCode for Linux. Support Visual Studio Code Stable and Visual Studio Code Insiders.
#!/bin/bash
# set -x
set -euo pipefail
# Required: curl and rsync
# Config
INSTALL_DIR=VSCode-linux-x64
INSTALL_PATH=/opt/${INSTALL_DIR}
[Unit]
Description=Minecraft Server %i
After=network.target
[Service]
Type=forking
WorkingDirectory=/srv/minecraft/%i
PrivateUsers=true
# Users Database is not available for within the unit, only root and minecraft is available, everybody else is nobody
@jinliming2
jinliming2 / Email Format Checker.md
Last active November 19, 2022 08:38
Email Format Checker

Email Format Checker

Check Email Format in Golang and JavaScript.

使用 Golang 和 JavaScript 检查 Email 格式的合法性。

Code From: GitLab