Skip to content

Instantly share code, notes, and snippets.

tools:
- name: Git-LFS Version
fileStarter: {command: '${git}', parameters: lfs --version}
useForOpen: false
waitUntilFinished: true
filePattern: '*'
- name: Open File
fileStarter: {command: rundll32.exe, parameters: 'URL.DLL,FileProtocolHandler ${filePath}'}
useForOpen: true
waitUntilFinished: false
// ==UserScript==
// @name GitHub Stars:隐藏我已 Star 的仓库
// @namespace https://github.com/
// @version 1.3
// @description 在 stars 页面(/stars/* 或 ?tab=stars)自动隐藏你已经 Star 的仓库,支持懒加载。
// @author You
// @include /^https:\/\/github\.com\/(?:stars\/[^\/?#]+|[^\/?#]+(?:\?.*?\btab=stars\b).*)$/
// @run-at document-idle
// @grant none
// ==/UserScript==
@pedoc
pedoc / performance_monitor.ps1
Last active August 10, 2025 08:31
performance monitor in windows
param(
[string]$ReportFile = "$(Join-Path $PSScriptRoot 'report.txt')"
)
Clear-Host
$ErrorActionPreference = "Stop"
try {
Start-Transcript -Path $ReportFile
@pedoc
pedoc / Open in Visual Studio.yml
Last active July 8, 2025 05:08
[SmartGit]Open in Visual Studio tool
tools:
- name: Open in Visual Studio
fileStarter: {command: 'C:\Program Files\PowerShell\7\pwsh.exe', parameters: '"C:\Users\pedoc\.scripts\openVS.ps1"
"${repositoryRootPath}"'}
useForOpen: false
waitUntilFinished: false
filePattern: '*'
# Use opendef https://github.com/pedoc/minitools/releases/tag/v1.0.0.0, fast
tools:
@pedoc
pedoc / install-vscode-server.sh
Last active June 2, 2025 03:48
install-vscode-server
#!/bin/bash
set -e
VER=${1:""}
if [ -z "$VER" ]; then
# shellcheck disable=SC2012
readarray -t versions < <(ls vscode-server_*_*.tar.gz 2>/dev/null | \
sed -n 's/^vscode-server_\([^_]*\)_[^_]*\.tar\.gz$/\1/p' | \
@pedoc
pedoc / install-zsh.sh
Last active April 23, 2025 05:19
Automatically install and configure zsh with one key
#!/bin/bash
set -e
PROXY="http://192.168.1.2:10808"
export https_proxy=$PROXY
export http_proxy=$PROXY
ARCH=$(uname -m)
case "$ARCH" in
@pedoc
pedoc / main.cs
Created September 24, 2024 07:57
UrlEncode eq php and java
using System;
using System.Net;
using System.Text;
public class Program
{
public static void Main()
{
Console.WriteLine(PhpLikeUrlHelper.UrlEncode("Hello World! 你好 #$&\'()*+,-./:;=?@[]!\'", Encoding.UTF8));
}
@pedoc
pedoc / tools.yml
Last active May 21, 2022 04:35 — forked from kohenkatz/tools.yml
Opening Windows Terminal and VSCode from SmartGit
# Add these entries to your `tools.yml` to be able to right-click to open
# things in VSCode (files and folders) and Windows Terminal (folders only) and Visual Studio(sln files).
# Make sure to change `YOUR_USERNAME` in the VSCode path.
tools:
- name: Open in VSCode
fileStarter: {command: 'C:\Users\YOUR_USERNAME\AppData\Local\Programs\Microsoft VS Code\Code.exe',
parameters: '"${filePath}"'}
useForOpen: true
waitUntilFinished: false
@pedoc
pedoc / MySqlConnectorConnectionProvider.cs
Created December 29, 2021 05:35
MySqlConnectorConnectionProvider for DevExpress.Xpo
using System;
using System.Data;
using System.Globalization;
using System.Reflection;
using DevExpress.Xpo.DB;
using DevExpress.Xpo.DB.Helpers;
// ReSharper disable InconsistentNaming
namespace SN.Instrument.DataAccess.Xpo.ConnectionProviders
{
public static Func<float,float> Line(PointF a, PointF b)
{
return x =>
{
var k = (b.Y - a.Y) / (b.X - a.X);
return k * (x - a.X) + a.Y;
};
}