Skip to content

Instantly share code, notes, and snippets.

#--- Uninstall unnecessary applications that come with Windows out of the box ---
Write-Host "Uninstall some applications that come with Windows out of the box" -ForegroundColor "Yellow"
#Referenced to build script
# https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update
# https://github.com/jayharris/dotfiles-windows/blob/master/windows.ps1#L157
# https://gist.github.com/jessfraz/7c319b046daa101a4aaef937a20ff41f
# https://gist.github.com/alirobe/7f3b34ad89a159e6daa1
# https://github.com/W4RH4WK/Debloat-Windows-10/blob/master/scripts/remove-default-apps.ps1
@nb5p
nb5p / Sip-RIME-BGR.json
Last active January 29, 2024 11:34
Get BGR format instantly.
{
"function" : "concat",
"x" : "0x",
"y" : {
"function" : "upper",
"x" : "hex[blue]hex[green]hex[red]"
}
}
@nb5p
nb5p / Panda Syntax Theme.json
Created December 23, 2019 06:54
Panda Syntax Theme for Windows Terminal
{
"name": "Panda Theme",
"foreground": "#CCCCCC",
"background": "#292A2B",
"black": "#000000",
"blue": "#4876D6",
"brightBlack": "#7A8181",
"brightBlue": "#5CA7E4",
"brightCyan": "#00C990",
"brightGreen": "#13FFDC",
#!/bin/bash
#
# This file echoes a bunch of color codes to the
# terminal to demonstrate what's available. Each
# line is the color code of one forground color,
# out of 17 (default + 16 escapes), followed by a
# test use of that color on all nine background
# colors (default + 8 escapes).
#
# Copied from http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
@nb5p
nb5p / InitGitCommitter.sh
Last active December 19, 2019 08:02
Rewrite Git Author And Committer After Rename GitHub Username.
git config --global user.name "nb5p"; git config --global user.email "2098464+nb5p@users.noreply.github.com"
@nb5p
nb5p / AllowDomainWindowsHello.reg
Last active December 26, 2019 01:49
Allow domain accounts to use Windows Hello.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System]
"AllowDomainPINLogon"=dword:00000001
@nb5p
nb5p / HackBaiduPanPlayer.user.js
Last active February 7, 2021 12:12
百度网盘播放器增强
// ==UserScript==
// @name 百度网盘播放器增强
// @namespace http://tampermonkey.net/
// @version 0.5
// @description 播放器增强
// @author nb5p
// @grant none
// @match *://*.pan.baidu.com/*
// ==/UserScript==
@nb5p
nb5p / gulpfile.templates.js
Last active November 7, 2019 04:33
Gulp Config File Templates
// gulp --version ==> 4.0.2
// .
// ├── dist/
// │ ├── css/
// │ ├── less/
// │ ├── js/
// │ └── index.html
// ├── src/
// │ ├── css/
// │ ├── less/
@nb5p
nb5p / getInfo.py
Created April 13, 2019 05:41
Get system info.
from subprocess import Popen, PIPE
def hostname():
hostname = Popen(["hostname"], stdout=PIPE)
hostname = hostname.stdout.read()
return hostname
def osversion():
with open("/etc/issue") as f:
osversion = f.read()
PS1='`a=$?;if [ $a -ne 0 ]; then a=" "$a; echo -ne "\[\e[1A\e[$((COLUMNS-2))G\e[31m\e[1;41m${a:(-3)}\]\[\e[0m\e[7m\e[2m\r\n\]";fi`${debian_chroot:+($debian_chroot)}\[\e[1;33m\]\u\[\e[1;31m\]@\[\e[1;35m\]\h\[\e[1;32m\][\t]\[\e[1;31m\]:\[\e[1;36m\]\w\[\e[1;34m\]\$\[\e[0;39m\]'