Skip to content

Instantly share code, notes, and snippets.

@ninehills
ninehills / chatpdf-zh.ipynb
Last active April 9, 2024 06:40
ChatPDF-zh.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lyc8503
lyc8503 / clash_config.yml
Last active March 19, 2024 13:31
~~自用的 clash 分流.~~ 现在是 Clash Meta 啦, 简洁优雅++
mode: rule
ipv6: true
log-level: info
allow-lan: false
mixed-port: 7890
unified-delay: false
tcp-concurrent: true
external-controller: 127.0.0.1:9091
external-ui: ui
@mattbell87
mattbell87 / remote-wsl.md
Last active May 14, 2024 13:32
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
@neggles
neggles / New-GPUPDriverPackage.ps1
Last active April 4, 2024 17:49
Hyper-V GPU Virtualization
<#
.SYNOPSIS
Create a GPU-P Guest driver package.
.DESCRIPTION
Gathers the necessary files for a GPU-P enabled Windows guest to run.
.EXAMPLE
New-GPUPDriverPackage -DestinationPath '.'
.EXAMPLE
New-GPUPDriverPackage -Filter 'nvidia' -DestinationPath '.'
.INPUTS
@BenjaminPoncet
BenjaminPoncet / ffmpeg-wrapper
Last active March 29, 2024 10:11
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support. This project is no longer maintained: Please see the following projects: https://github.com/darknebular/Wrapper_VideoStation/ - https://github.com/AlexPresso/VideoStation-FFMPEG-Patcher
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
@obstschale
obstschale / autostart
Last active December 21, 2020 18:36
Raspberry Pi Script to autostart Chromium
# /home/pi/.config/lxsession/LXDE-pi/autostart before Buster
# /etc/xdg/lxsession/LXDE-pi/autostart on Buster
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi
@sh /home/pi/bin/start-chromium.sh
@sdhzdmzzl
sdhzdmzzl / bj-unicom-iptv.m3u
Last active May 8, 2024 10:36
北京联通iptv列表
#EXTM3U name="bj-unicom-iptv"
#EXTINF:-1,CCTV1
rtp://239.3.1.1:8000
#EXTINF:-1,CCTV2
rtp://239.3.1.2:8004
#EXTINF:-1,CCTV4
rtp://239.3.1.4:8216
#EXTINF:-1,CCTV7
rtp://239.3.1.7:8024
#EXTINF:-1,CCTV9
/**
* Bear Theme with Typora
*
* @version : 0.0.1
* @update : 2018/09/08
* @homepage: https://gist.github.com/Kenshin/e5adc79da3149315bdfd72a35b70d65e
* @license : MIT https://github.com/kenshin/mduikit/blob/master/LICENSE
* @author : Kenshin Wang <kenshin@ksria.com>
*
* @copyright 2018
@Informatic
Informatic / domain.xml
Last active April 7, 2024 23:20
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@sukovec
sukovec / Makefile
Last active August 30, 2023 14:06
OpenWRT Wireshark package makefile.
include $(TOPDIR)/rules.mk
PKG_NAME:=wireshark
PKG_RELEASE:=1
PKG_VERSION:=2.6.6
# https://www.wireshark.org/download/src/all-versions/wireshark-2.6.6.tar.xz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=https://www.wireshark.org/download/src/all-versions/
PKG_MD5SUM:=b30ba5b9b48ed2ff91c0ce357d33b46b