Skip to content

Instantly share code, notes, and snippets.

@canghai118
canghai118 / iterm_smart_paste.sh
Created March 12, 2026 14:03
Paste Image to Remove Claude Code
#!/bin/bash
# iterm_smart_paste.sh — iTerm2 零配置剪贴板文件/图片粘贴
#
# 功能:
# 1. Finder 中复制的文件 → 保留原始文件名上传到远程
# 2. 截图/图片数据 → 以 clip_<时间戳>.png 上传
# 3. 自动检测当前 iTerm2 会话的 SSH 连接和远程主机
# 4. 超过 20MB 的文件自动跳过并提示
#
# iTerm2 快捷键设置:
@demonixis
demonixis / XRSubSystemTest.cs
Created January 13, 2020 13:28
A demonstration of how to use the all new XRSubsystem with Unity 2019.3+
using UnityEngine;
using UnityEngine.XR;
using UnityEngine.XR.Management;
public class XRSubSystemTest : MonoBehaviour
{
public void Start()
{
var xrSettings = XRGeneralSettings.Instance;
if (xrSettings == null)
@sdhzdmzzl
sdhzdmzzl / bj-unicom-iptv.m3u
Last active July 4, 2026 02:05
北京联通iptv列表
#EXTINF:-1,北京卫视4K
rtp://239.3.1.22:8001
#EXTINF:-1,云南卫视
rtp://239.3.1.26:8108
#EXTINF:-1,四川卫视
rtp://239.3.1.29:8288
#EXTINF:-1,广西卫视
@uraimo
uraimo / dnsovertls.md
Last active April 12, 2026 02:39
Configure your Mac to use DNS over TLS
@unitycoder
unitycoder / 0-win10-live-stream-server.txt
Last active April 16, 2022 11:26
Setting up Live Video Stream Server on Windows 10 (RTPM + HLS + OBS)
from http://zqdevres.qiniucdn.com/data/20170907091103/index.html
- download ngingx with RTPM module http://nginx-win.ecsds.eu/download/ *nginx 1.7.12.1 Lizard.zip
- unzip
- create start.bat script
@echo off
title Start Stream
cd /d "C:\nginx"
start nginx
exit
@enzinier
enzinier / install_jetbrains_on_ubuntu.sh
Last active December 29, 2019 04:15 — forked from zabidok/jb_install_update.sh
Install or update jetbrains products like PhpStorm, WebStorm, IntelliJ Idea, PyCharm, CLion, ReSharper, DataGrip on Ubuntu and fix problems with non latin hotkeys in gui java application
#!/bin/bash
# installation jetbrains
j_url="https://data.services.jetbrains.com/products/download"
tmp_dir="$HOME/tmp_jb"
install_dir="/opt"
if [ "$(whoami)" != "root" ]
then
echo "Sorry, you are not root."
exit 1
fi
@gexiao
gexiao / config-git-proxy.txt
Last active April 9, 2026 16:41
Use git over socks5 proxy
Port: 1080
1. Create a file /YOUR PATH/gitproxy.sh with content:
#!/bin/sh
nc -X 5 -x 127.0.0.1:1080 "$@"
2. Edit your ~/.gitconfig
# For git://
@fangpsh
fangpsh / 30_haproxy_stats.sh
Last active June 10, 2022 13:24
open-falcon agent haproxy plugin
#!/bin/bash
#requires: socat
#author: fangpsh
#关于采集的Haproxy指标和报警阈值设置请参考:https://github.com/iask/haproxymon
set -eu
STATS_SOCKET="/var/lib/haproxy/stats"
HOST=`cat /etc/hostname`
DATE=`date +%s`
tmp_info="/tmp/haproxy_info"
@fuyufjh
fuyufjh / cheatsheet.py
Last active December 12, 2025 11:05
My Python Cheatsheet
Python Cheatsheet
=================
################################ Input & Output ###############################
name = input('please enter your name: ')
print('hello,', name)
ageStr = input('please enter your age: ')
age = int(ageStr)
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy