Skip to content

Instantly share code, notes, and snippets.

@stenuto
stenuto / hls.sh
Created November 7, 2024 16:58
HLS ffmpeg script
#!/bin/bash
# Function to display usage information
usage() {
echo "Usage: $0 /path/to/input.mp4 [ /path/to/output_directory ]"
exit 1
}
# Check if at least one argument (input file) is provided
if [ $# -lt 1 ]; then
@okatu-loli
okatu-loli / bat
Last active November 11, 2024 17:55
临时解决“百度网盘的插件导致 Windows 资源管理器持续占用高 CPU,进而导致资源管理器进程的稳定性下降、系统卡顿”的问题
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
:: 作者: 千石
:: 来源: 蓝点网(https://mp.weixin.qq.com/s/2t9TqXFHkhDcMaVXSvuxnQ)
:: V2EX(https://www.v2ex.com/t/1007324#reply11)
:: 开源地址: https://gist.github.com/okatu-loli/556533c9d925b80eaff86094d5e949f9
echo 作者: 千石
echo 来源: 蓝点网(https://mp.weixin.qq.com/s/2t9TqXFHkhDcMaVXSvuxnQ)
@abc1763613206
abc1763613206 / bvtest.py
Last active August 31, 2024 01:43
BVID Validate
import requests
import json
import random
Back_URL = 'https://api.bilibili.com/x/web-interface/archive/stat?aid='
headers = {
'Cookie': "Replace Me With REAL COOKIE" ,
'Pragma': 'no-cache',
powershell (Add-Type '[DllImport(\"user32.dll\")]^public static extern int PostMessage(int hWnd, int hMsg, int wParam, int lParam);' -Name a -Pas)::PostMessage(-1,0x0112,0xF170,2)
@mendeza
mendeza / .vimrc
Last active September 14, 2024 06:37
Simple .vimrc or init.vim for nvim (neovim)
" (N)Vim Configuration File
" vim : place in $HOME/.vimrc
" nvim : place in $HOME/.config/nvim/init.vim
" $ ln -s $HOME/.config/nvim/init.vim $HOME/.vimrc
" General settings
" https://learnvimscriptthehardway.stevelosh.com/
" ---------------------------------------------------------------------------
" drop vi support - kept for vim compatibility but not needed for nvim
" Probably not needed with Vim 8+
"set nocompatible
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y
sudo apt-get install libfreetype6 libfreetype6-dev -y
sudo apt-get install libfontconfig1 libfontconfig1-dev -y
cd ~
export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64"
wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2
sudo tar xvjf $PHANTOM_JS.tar.bz2
sudo mv $PHANTOM_JS /usr/local/share
sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin
@mobzystems
mobzystems / 7-zip.psm1
Last active September 21, 2024 03:31
7-Zip commands for PowerShell
<#
Powershell Module 7-Zip - 7-Zip commands for PowerShell
The functions in this module call 7za.exe, the standAlone version of 7-zip to perform various tasks on 7-zip archives.
Place anywhere, together with 7za.exe and 7zsd.sfx. 7za.exe is required for all operations; 7zsd.sfx for creating self
extracting archives.
http://www.7-zip.org
Import-Module [Your path\]7-Zip
@mondain
mondain / public-stun-list.txt
Last active November 8, 2024 12:37
Public STUN server list
23.21.150.121:3478
iphone-stun.strato-iphone.de:3478
numb.viagenie.ca:3478
s1.taraba.net:3478
s2.taraba.net:3478
stun.12connect.com:3478
stun.12voip.com:3478
stun.1und1.de:3478
stun.2talk.co.nz:3478
stun.2talk.com:3478
  1. 开启ipv4转发
vi /etc/sysctl.conf
# 将net.ipv4.ip_forward=0更改为net.ipv4.ip_forward=1
sysctl -p
  1. 安装dnsmasq 和pdnsd解决dns污染

DNS的解析方案为 resolve.conf ==> dnsmasq ==> pdnsd

@DraTeots
DraTeots / ComPort over Network.md
Last active November 15, 2024 13:34
ComPort over Network