Skip to content

Instantly share code, notes, and snippets.

@flyqie
flyqie / reset-terminal-services.ps1
Created May 4, 2025 17:40 — forked from heywoodlh/reset-terminal-services.ps1
Script for renewing RDP License
## This Script is intended to be used for Querying remaining time and resetting Terminal Server (RDS) Grace Licensing Period to Default 120 Days.
## Developed by Prakash Kumar ([email protected]) May 28th 2016
## www.adminthing.blogspot.com
## Disclaimer: Please test this script in your test environment before executing on any production server.
## Author will not be responsible for any misuse/damage caused by using it.
Clear-Host
$ErrorActionPreference = "SilentlyContinue"
## Display current Status of remaining days from Grace period.
@flyqie
flyqie / info.md
Created April 19, 2025 01:49 — forked from vilusa/info.md
Xcode iPhone USB disconnect problem resolve

Run terminal below commands

$ sudo pkill usbmuxd
$ sudo killall -STOP -c usbd
```
@flyqie
flyqie / change-machine-id.md
Created December 15, 2024 02:48 — forked from dllud/change-machine-id.md
How to change a cloned GNU/Linux machine's identity

How to change a cloned GNU/Linux machine's identity

You've just finished installing and configuring all those packages on your first machine. Now it's just a matter of cloning the hard drive into all the others and changing the hostname. Right?

Well, not so easy. If you wish to avoid conflicts on your network, backups and elsewhere, i.e. if you wanna end up with a unique fingerprint for each machine, you must go a few steps further.

Here follows a checklist to help you out. It's aimed at Debian and derivates (e.g. Ubuntu), though other distros won't be much different.

The old way: edit /etc/hostname and /etc/hosts

@flyqie
flyqie / push.sh
Created November 26, 2022 04:54 — forked from Yash089610/push.sh
remote: fatal: pack exceeds maximum allowed size
# Adjust the following variables as necessary
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=500
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
else
#/bin/bash
# Ubuntu20 桌面环境配置(arm兼容)
# 2021 flyqie
# 遇到错误马上退出,避免出现其他问题
set -e
# ...
set -x
# Xrdp