Skip to content

Instantly share code, notes, and snippets.

View simonchen's full-sized avatar

Envy Chen simonchen

View GitHub Profile
@simonchen
simonchen / ProcessExtensions.cs
Created March 27, 2024 09:09 — forked from heri16/ProcessExtensions.cs
Powershell / C# class to start a GUI Windows Process on the desktop/session of any logged-in RDP/TS user.
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using System.IO;
namespace heri16
{
/// <summary>
/// Static class to help Start a GUI/Console Windows Process as any user that is logged-in to an Interactive Terminal-Session (e.g. RDP).
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@al0rid4l
al0rid4l / power.ps1
Created December 22, 2023 06:39
大小核电源管理
# P核即大核,也叫高性能处理器,E核即小核,也叫高效处理器,高能效处理器,超线程,即逻辑核,是比小核更轻量的存在
# 大核小核超线程都能休眠,休眠省电但是唤醒的时间开销更大,超线程的单核性能也略有损失,大约5%-15%损失
#
# 不要在平衡电源方案下设置, 在省电或者高性能下设置, 当电源计划是平衡时. Windows还有一个叫overlay的层级允许微软和OEM的默认调度覆盖部分自定义设置
# 因此从省电或高性能下复制一个电源方案, 然后重命名, 也就是新建一个电源方案, 在里面修改, 而不要在平衡方案中修改
#
# 下面命令用来设置显示/隐藏电源选项
# powercfg -attributes <一级展开分组的GUID或别名> <二级展开分组的GUID> -ATTRIB_HIDE
# 如处理器电源管理/Processor power management是一级展开分组, 别名是SUB_PROCESSOR,小核放置最小核心数量的GUID为0cc5b647-c1df-4637-891a-dec35c318583
# +ATTRIB_HIDE表示隐藏该选项,-ATTRIB_HIDE表示显示/去掉隐藏的选项
@shawnli87
shawnli87 / download_gofile.sh
Last active February 12, 2025 11:55 — forked from MCOfficer/README.md
Bash script to download files from gofile.io
#!/bin/bash
url="$1"
#prompt for url if not provided
until [ ! -z "$url" ] ; do
read -p "url=" url
done
id=$(sed 's|.*gofile.io/d/||g' <<< "$url")
@heri16
heri16 / ProcessExtensions.cs
Created July 13, 2016 16:17
Powershell / C# class to start a GUI Windows Process on the desktop/session of any logged-in RDP/TS user.
using System;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using System.IO;
namespace heri16
{
/// <summary>
/// Static class to help Start a GUI/Console Windows Process as any user that is logged-in to an Interactive Terminal-Session (e.g. RDP).
@aa65535
aa65535 / dnsmasq.conf
Last active December 24, 2022 07:12
dnsmasq config
# 并发查询所有上游DNS服务器
all-servers
# 本地DNS缓存最小有效期
min-cache-ttl=3600
# 本地DNS缓存数目
cache-size=65535
# 上游DNS服务器, 可设置多个
server=8.8.4.4
#server=8.8.8.8
server=114.114.114.114