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
{ | |
"Sys": { | |
"Group": "sys", | |
"Values": [ | |
{ "Id": "SDATE", "Label": "Date", "Value": "2021-08-11" }, | |
{ "Id": "STIME", "Label": "Time", "Value": "01:15:16" }, | |
{ "Id": "STIMENS", "Label": "Time (HH:MM)", "Value": "01:15" }, | |
{ "Id": "SUPTIME", "Label": "UpTime", "Value": "03:10:12" }, | |
{ "Id": "SUPTIMENS", "Label": "UpTime (HH:MM)", "Value": "03:10" }, | |
{ "Id": "SCPUCLK", "Label": "CPU Clock", "Value": "3498" }, |
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
function Is-Admin { | |
$myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent(); | |
$myWindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($myWindowsID); | |
$adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator; | |
if (!$myWindowsPrincipal.IsInRole($adminRole)) | |
{ | |
throw '请使用管理员权限运行' | |
} | |
} |
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.Linq; | |
var folder = @"F:\git\blog\ugc\datacolor-spyderx"; | |
var files = new[] { | |
Path.Combine(folder, "xsmax.xml"), | |
Path.Combine(folder, "xsmax1.xml"), | |
}; | |
var file = files[0]; | |
var doc = new XmlDocument(); |
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 Data Validator Helper v2 | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2 | |
// @description Data Validator Helper | |
// @author Eric Liu <[email protected]> | |
// @match https://data.veracity.com/dataValidator/* | |
// @match https://datatest.veracity.com/dataValidator/* | |
// @match https://datadevtest.veracity.com/dataValidator/* | |
// @grant GM.xmlHttpRequest |
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
void Main() | |
{ | |
var text = File.ReadAllText(@"C:\Users\Eric\Desktop\5000-random-people.json"); | |
var users = JsonConvert.DeserializeAnonymousType(text, new { Results = default(IList<UserProfile>) }).Results; | |
using var sw = new StreamWriter(@"C:\Users\Eric\Desktop\5000-random-people.vcf"); | |
foreach(var u in users){ | |
sw.WriteLine(ConvertToVCard(u)); | |
} | |
} |
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
@echo off | |
set DPS=%~dp0dps | |
:start | |
color 07 | |
cls | |
echo -------------------------------------------------------------------------------- | |
echo 排骨的 Win10 系统迁移脚本 | |
echo. | |
echo 1. 系统备份 |
OlderNewer