Skip to content

Instantly share code, notes, and snippets.

View myfingerhurt's full-sized avatar

myfingerhurt myfingerhurt

View GitHub Profile
myfingerhurt /
Created October 5, 2021 06:50
Choosing between .bashrc, .profile, .bash_profile,

For better understanding, you may need inotifywait to verify it by yourself, mine is running under Ubuntu 20.04 LTS.

  1. Install sudo apt-get install -y inotify-tools
  2. Run inotifywait in a tmux tab as below.
  3. Start a new pane in tmux by CTRL^B + "
  4. You may see .bash_profile get OPENED
  5. Exit the tmux pane.
  6. You may see .bash_logout get OPENED
myfingerhurt / Remove-Obsoleted-Network-Num.ps1
Created October 2, 2021 14:12
Remove any that begin with Network 1 2 3 4 5 6 7 8 9 for ZeroTie with self-elevating
# PowerShell script that goes through all the network profiles in the registry and attempts to remove any that begin with "Network ".
# Must be run as admin. You need to remove the "-Whatif" parameter for the cmndlet to actually make changes.
# Self-elevate the script if required
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) {
if ([int](Get-CimInstance -Class Win32_OperatingSystem | Select-Object -ExpandProperty BuildNumber) -ge 6000) {
$CommandLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CommandLine
myfingerhurt /
Created October 2, 2021 14:06
WAN instant message notification based on Matrix-bot much better than E-mail notification for AC68U AC86U AX86U (Asus Merlinwrt)
#CURL_EX_PARAM=" --resolve --resolve"
#-----------Fixed TOKEN-----------------
myfingerhurt /
Created October 2, 2021 13:53
Install R 4.1 on Ubuntu Server 20.04 arm64 (Raspberry Pi)
  1. Enable source code repositories and building essentials
v   sudo sed -i "s/# deb-src/deb-src/g" /etc/apt/sources.list
v   sudo apt-get update
v   sudo apt-get build-dep r-base-dev
  1. Downloading R source code
v   wget -c
v tar -xf R-4.1.1.tar.gz
myfingerhurt /
Created October 2, 2021 13:45
Install RStudio Server v1.4.1106 for arm64
  1. Install R; Debian stretch has latest version
v   sudo apt-get update
v   sudo apt-get install -y r-base r-base-dev
v   sudo apt-get install -y git r-recommended python-dev
  1. Download RStudio source
v   git clone --depth 1 --branch v1.4.1717
myfingerhurt /
Created October 2, 2021 13:37
reverse proxy configuration guide for v2ray behind a http-proxy and nginx

This should be working on most of enterprise network environment which usually behinds a http-proxy.

  • Network Topology
Services(port:8888) <--> Bridge-Node(Win) <-->  HTTP-Proxy(Crop.) <-->  Protal-Node(VPS) <--> V2RayN(7890) <--> Client(curl)
                         Vmess                                          Vmess                 Vmess
  • C:\Windows\System32\drivers\etc\hosts