Skip to content

Instantly share code, notes, and snippets.

Avatar
🥐
危機管理!

Namorzyny

🥐
危機管理!
  • Pure Illusion
View GitHub Profile
View yahoo-mail-optimizer.user.js
// ==UserScript==
// @name Yahoo Mail Optimizer
// @namespace github.com/namorzyny
// @version 2021.1.2
// @match https://mail.yahoo.com/*
// @run-at document-start
// @grant none
// @author namorzyny
// ==/UserScript==
@Namorzyny
Namorzyny / weibo-default-font-family.user.css
Last active Jan 17, 2021
Reset Weibo.com default font family
View weibo-default-font-family.user.css
/* ==UserStyle==
@name Reset Weibo.com default font family
@namespace github.com/Namorzyny
@version 2021.1.17
@author Namorzyny
==/UserStyle== */
@-moz-document domain("weibo.com") {
html {
font-family: sans-serif !important;
@Namorzyny
Namorzyny / github-highlight-private-archived-repo.user.css
Created Oct 23, 2020
GitHub: Highlight private and archived repositories
View github-highlight-private-archived-repo.user.css
/* ==UserStyle==
@name GitHub: Highlight private and archived repositories
@namespace github.com/Namorzyny
@version 2020.10.24
@description Highlight private and archived repositories
@author Namorzyny
==/UserStyle== */
@-moz-document domain("github.com") {
h3.wb-break-all {
View github-gist-highlight-secret-gists.user.css
/* ==UserStyle==
@name GitHub: Highlight secret gists
@namespace github.com/Namorzyny
@version 2020.10.24
@description Highlight secret gists
@author Namorzyny
==/UserStyle== */
@-moz-document domain("gist.github.com") {
.gist-snippet-meta .d-inline-block > span {
@Namorzyny
Namorzyny / gist-ssh-sync
Last active Oct 23, 2020
Gist SSH Key Sync (by Namorzyny)
View gist-ssh-sync
#!/bin/bash
if [ ! -d "$HOME/.gist-ssh-sync" ]
then
echo "Directory does not exist, install first."
exit 1
fi
. ~/.gist-ssh-sync/config.conf
View ys-kai.zsh-theme.zsh
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# Mar 2013 Yad Smood
# Sep 2020 Namorzyny
# VCS
YS_KAI_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} "
@Namorzyny
Namorzyny / pkgops
Created Sep 12, 2020
AppOps tool for termux
View pkgops
#!/data/data/com.termux/files/usr/bin/bash
if [ "$1" = "" ]
then
echo "Please enter a package name."
exit 1
fi
pkg_list=($(pm list packages | grep -oP "(?<=package\:)(\w+.)+\w+" | grep -i "$1"))
pkg_count=${#pkg_list[@]}
@Namorzyny
Namorzyny / reconnect-wan6.sh
Last active Sep 18, 2020
Fix v6 interface does not go up when China Telecom PPPoE reconnection or reassigning v4 address
View reconnect-wan6.sh
PATH='/usr/sbin:/usr/bin:/sbin:/bin'
ubus call network.interface.wan status | grep '"up": true,' > /dev/null 2>&1 || {
echo "PPPoE is down."
exit 1
}
has_error=0
ubus call network.interface.wan6 status | grep '"code": "NO_DEVICE"' > /dev/null 2>&1 && has_error=1
View clink-powerline-prompt.lua
@Namorzyny
Namorzyny / AutoStartWindowsTerminal.ps1
Last active Apr 25, 2020
Automatically start Windows Terminal when opening PowerShell through explorer.exe
View AutoStartWindowsTerminal.ps1
function AutoStartWindowsTerminal {
# Retrieve information of the current process
$WindowTitle = (Get-Host).UI.RawUI.WindowTitle
$ProcessInfo = Get-WmiObject Win32_Process -Filter "ProcessId = $PID"
if ((Get-Process -Id $ProcessInfo.ParentProcessId).ProcessName -notcontains "explorer") { return }
# Get the path of the profile
$AppPath = Get-ChildItem "$($env:LOCALAPPDATA)\Packages\Microsoft.WindowsTerminal*"
if ($null -eq $AppPath) {
Write-Warning "Please install Windows Terminal first."