Skip to content

Instantly share code, notes, and snippets.

@sibosend
sibosend / vscode-tunnel-daemon-oracle-cloud.md
Last active November 11, 2025 11:09 — forked from nonkronk/vscode-tunnel-daemon-oracle-cloud.md
Setup an Always-on VSCode Tunnel on Ubuntu Server

Setup an Always-on VSCode Tunnel on Ubuntu Instance

Install VSCode

for arm64

wget -O vscode.deb https://code.visualstudio.com/sha/download\?build\=stable\&os\=linux-deb-arm64 && sudo apt install ./vscode.deb --fix-broken -y && rm vscode.deb
function FindProxyForURL(url, host) {
// ==================== 配置区域 ====================
// SOCKS5 代理配置
var PROXY = "SOCKS5 127.0.0.1:1080";
// 需要走代理的域名列表(支持通配符)
var proxyDomains = [
"server-urule-prod.tidbi-it.cc",
"server-urule-pre.tidbi-it.cc",

单机多用户 JupyterLab 环境搭建

概述

在这篇短文中,我们记录了如何在使用 [Ubuntu][] 1804 LTS 操作系统的单台服务器上,建立用户隔离的 [JupyterLab][] Web 环境。

目标是:

  • 操作系统的用户可以各自不受干扰的使用独立的 [JupyterLab][]
  • 各个用户的 [Conda][] 环境可以自动的出现在 [JupyterLab][] 的 Kernel 列表中
@sibosend
sibosend / extract.sh
Created February 29, 2024 10:47
extract audio track from multiple .mp4 files
#!/bin/bash
eval "files=($(ls ./*/*))"
for f in "${files[@]}"; do
# printf '%s\n' "$f"
# printf '%s\n' './wangwangduimp3/'"$f"'.mp3'
ffmpeg -i $f -map 0:a -acodec libmp3lame -y './wangwangduimp3/'"$f"'.mp3'
done
@sibosend
sibosend / parse_yaml.sh
Created July 2, 2020 03:06 — forked from pkuczynski/LICENSE
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}
@sibosend
sibosend / new_harddisk.md
Created April 27, 2020 06:39
virtualbox增加新硬盘的方法

在virtualbox中装好Ubuntu后,发现硬盘空间太小,怎样才能增加硬盘容量?那就是再建一个硬盘:

  1. 添加新硬盘

    设置 -> Storage -> SATA控制器->右击,选择“添加虚拟硬盘”

    然后,根据需求创建合适的硬盘

  2. 重启虚拟机

查看现有系统的磁盘空间

@sibosend
sibosend / readme.md
Created April 21, 2020 07:41
ModuleNotFoundError: No module named '_gdbm' for python in OSX

vim ~/lib/python3.6/dbm/gnu.py from

from _gdbm import *

to

from _dbm import *

@sibosend
sibosend / readme.md
Last active April 17, 2020 06:26
Install VirtualBox Guest Additions in CentOS, RHEL & Fedora

yum -y install epel-release

yum -y update

yum install make gcc kernel-headers kernel-devel perl dkms bzip2

export KERN_DIR=/usr/src/kernels/$(uname -r)

mount -r /dev/cdrom /media

@sibosend
sibosend / add.sh
Last active April 16, 2020 08:51 — forked from sdoro/add.sh
Howto add/remove in VirtualBox a fifth NIC (without GUI) in hostonly networking
VBoxManage modifyvm "vm" --hostonlyadapter5 vboxnetX
VBoxManage modifyvm "vm" --nic5 hostonly
VBoxManage modifyvm "vm" --hostonlyadapter6 vboxnetX
VBoxManage modifyvm "vm" --nic6 hostonly
@sibosend
sibosend / MANIFEST.in
Created April 2, 2020 02:02 — forked from jpmens/MANIFEST.in
Including git version in setup.py files. (Requires at least _one_ tag in the repo) Normally used to make things like, "python setup.py sdist" give you a predictable name for files. Normally used with tags on the repo like 0.1 or 2.3.0 You should add RELEASE-VERSION to MANIFEST.in so that end users of the tarball can use this too.
include RELEASE-VERSION
include version.py
# Anything else you normally use