This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[string]$ReportFile = "$(Join-Path $PSScriptRoot 'report.txt')" | |
) | |
Clear-Host | |
$ErrorActionPreference = "Stop" | |
try { | |
Start-Transcript -Path $ReportFile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' | \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using System.Text; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine(PhpLikeUrlHelper.UrlEncode("Hello World! 你好 #$&\'()*+,-./:;=?@[]!\'", Encoding.UTF8)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
}; | |
} |
NewerOlder