Tuesday, October 21, 2025

windows firewall - minimum rules

run wf.msc as Administrator:

Always do backup: (right click the highlighted)



 By default Windows allow outgoing connection for all apps. Change it to block Outbound connection.
(right click the highlighted then choose Properties)


Click Inbound Rules, then select all rules, right click to select "Disable Rule". This block all incoming connection. Thus you may not be able to share files, printer to others.

Click Outbound Rules, select all rules, right click to select "Disable Rule".
You would need to enable back a few rules for minimum working networking.


To ping other pc. This is for ipv4 only, enable for ipv6 if needed:

To access other's file share:

For weather widget at lock screen to update:
                    




 








Thursday, September 18, 2025

OBS to stream directly to VLC, using own custom server(Monaserver), Windows

https://sourceforge.net/projects/monaserver/
Download & extract zip to a folder, double click to run: MonaServer.exe


get you pc ip address says it's 192.168.0.11
In OBS -- Settings -- Stream -- Service:Custom -- Server:rtmp://192.168.0.11:1935  -- OK
click Start Streaming


In VLC menu -- Media -- Stream -- Network: rtmp://192.168.0.11:1935
click the drop down arrow of [Stream] button, click [Play]

or use cmd:
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"  rtmp://192.168.0.11:1935  --fullscreen

If you have external monitor and wanna play full screen on it, manually change in VLC Simple Preferences -- Video -- Fullscreen Video Device=\\.\DISPLAY2  -- Save

VLC to VLC direct streaming

 1st VLC:   
find your ip address, says it's 192.168.0.11
VLC menu [Media] -- [Stream] -- [File] -- [Add] -- choose your media file -- [Stream] -- [Next]
in [New destination] choose=[Http] -- [Add] -- accept port 8080 [Next] - click [Activate Transcoding] (Video H.264 + MP3 MP4) -- [Next] -- check [Stream all elementary streams] -- [Stream]



2nd VLC:
VLC menu [Media] -- [Stream] -- [Network] tab -- [network URL]: http://192.168.0.11:8080
click the drop down arrow of [Stream] button, click [Play]

or use cmd:
"C:\Program Files (x86)\VideoLAN\VLC\vlc.exe"  http://192.168.0.11:8080/  --fullscreen

If you have external monitor and wanna play full screen on it, manually change in VLC Simple Preferences -- Video -- Fullscreen Video Device=\\.\DISPLAY2  -- Save


At times, VLC not reliable, would need to repeat above for both VLC. Also, you may need to configure firewall to allow remote connection.

download assets from github till success

in Linux:

 until wget -c https://github.com/something/releases/installer.zip; do :; done

Thursday, February 16, 2023

laptop auto wake up right after hibernate or sleep

 steps to troubleshoot:
admin cmd:  powercfg -lastwake

    Friendly Name:

    Description: High Definition Audio Controller

    Manufacturer: Microsoft


This showed sound card is causing the problem, but this one in fact is not the sound card(realtek in my case). The culprit is "Intel(R) Display Audio" in Device Manager - Sound video and game controllers.

As of 2023, update Intel graphic card drivers did not solve the issue. 

Disable this "Intel(R) Display Audio" would solve the problem. It is used by hdmi / direct Wifi to allow tv to play sound.

disable windows 10 update

In file Property - Security - Advanced , edit to add DENY Read,Write permissions:
(Administrators should allow to Read/Change Permissions though)
C:\windows\system32\wuaueng.dll
C:\windows\system32\wuauclt.exe   
C:\windows\system32\usosvc.dll
C:\windows\system32\WaaSMedicSvc.dll

Windows 10 optimization & some windows registry keys

open lid option: admin cmd:
powercfg -attributes SUB_BUTTONS 99ff10e7-23b1-4c07-a9d1-5c3206d741b4 -ATTRIB_HIDE
powercfg -attributes SUB_BUTTONS 99ff10e7-23b1-4c07-a9d1-5c3206d741b4 +ATTRIB_HIDE

powershell: Set-MpPreference -DisableScanningNetworkFiles 1

multiple "Language Pack Removal" found in RestorePoint:
in Task Scheduler: disable Microsoft\Windows\MUI\LPRemove

disable service:  (minimal/limited networking)
SysMain  (superfetch)
Print Spooler (if not using printer)
Connected user experiences and telemetry
nahimic service (if any)
net.tcp port sharing service
routing and remote access
windows push notification system service
   ~ user service (might affect Alarm&Clock countDown)

which scheduler run at idle:
powershell: Get-ScheduledTask | Where-Object { $_.State -ne "Disabled" } | Select-Object TaskName, TaskPath, Triggers | Where-Object { $_.Triggers -match "MSFT_TaskIdleTrigger" }


HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Window Search
DWORD "AllowCortana"=0

HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\DisableRemoteShutdownRPCInterface=1

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\DisableRpcOverTcp=1

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender\
DWORD DisableRealtimeMonitoring=1    use at your own risk

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting
DWORD Disabled=1

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}\Commands\on-logon-autolaunch
DWORD AutoRunOnLogon=0

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\Clients\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}\Commands\on-logon-startup-boost
DWORD AutoRunOnLogon=0

Chrome to disable periodically scan malware:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
this key exist wld cause "browser is managed by your organization"

HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\DataCollection\
"AllowTelemetry"=0
"DisableOneSettingsDownloads"=1
DoNotShowFeedbackNotifications=1

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
DWORD DisableBandwidthThrottling=1


Windows 10 clock to show Seconds

 (dont run as admin)  HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced   ->  New > DWORD (32-bit)  ->  ShowSecondsInSystemClock=1

Sunday, December 31, 2017

trim mp3 files using ffmpeg, works for video too

ffprobe.exe to get duration of MP3 in number of seconds.
   ffprobe  -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 file.mp3

ffmpeg.exe to trim away first 8 seconds, end at 999 seconds of All mp3 files in the working folder.
  ffmpeg.exe -ss 8 -t   999  -i input.mp3 -acodec copy output.mp3

Trim from 00:02:54.583 to end of file:
 ffmpeg  -ss 00:02:54.583 -i input.mp3 -acodec copy output.mp3

Works for video too:
ffmpeg -ss [start] -i in.mp4 -t [duration] -c copy out.mp4
ffmpeg -ss [start] -i in.mp4 -t [duration] -c:v libx264 -c:a aac -strict experimental -b:a 128k out.mp4


C:\ffmpeg Folder\mp3files\go.bat

echo "==========" > done.txt
for %%f in (*.mp3) do  (
    echo|set /p="..\ffmpeg.exe                         %%f                           " >> done.txt   
  ..\ffprobe  -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1  %%f  >> done.txt
)
rem Open done.txt in Excel, deduct 18 from the -t seconds     
rem (objective is to cut first 8 seconds, trim last 10 seconds of each mp3) 
rem use =concate() to reconstruct the command list, to put to new.bat
rem rearrange param, -ss and -t must precede -i

Saturday, December 30, 2017

how to turn off Accessibility button function at Windows 7's login screen

reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Utilman.exe" /v "Debugger" /t REG_SZ /d "systray.exe" /f

source: https://superuser.com/questions/196989/how-to-remove-or-disable-ease-of-access-button-on-windows-7-login-screen

Friday, November 13, 2015

turn your Linux into a router

to forward Internet request from network socket rj45 (eth0)  to wireless card (wlan0) :


su
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
/sbin/iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT



done. u might need to manually configure ip address for eth0:
sudo ifconfig eth0 192.168.0.1 netmask 255.255.255.0

Friday, January 9, 2015

burn ISO file to usb drive

rufus - may use virtual OS XP in virtualBox

WinToUSB - to burn Windows >= 7, 8, 10 onto usb drive/hdd/sdd  --> portable windows

Tuesday, June 17, 2014

mklink

MKLINK [[/D] | [/H] | [/J]] Link Target

/D Creates a directory symbolic link. Default is a file symbolic link.
/H Creates a hard link instead of a symbolic link.
/J Creates a Directory Junction. (can survive remote location)
Link specifies the new symbolic link name.
Target specifies the path (relative or absolute) that the new link refers to.


in non-administrative cmd, make a new link folder (at other drive/folder) that links to C:\myFolder
mklink /J "myFolder" "C:\myFolder"


"junctions are processed at the server and directory symbolic links are processed at the client"

symbolic link:
\\Alice\c$\myjp -> \\Alice\c$\targetfolder
Junction (survive remote access):
\\Alice\c$\mysymlink -> \\Bob\c$\targetfolder

JD SimWheel use your droid as steering wheel in pc games

https://play.google.com/store/apps/details?id=jd.simwheel

It uses vjoystick as virtual device in windows, then an app in android to connect to pc & play the game!

Tuesday, September 17, 2013

to fix windows 7 's Pinned item errors on Start Menu

In cmd:
find /C "yourItemsName" %appdata%\microsoft\windows\recent\automaticdestinations\*

or in windows explorer, just delete those file size more than 1MB:
%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations




source:
www.howtogeek.com/howto/5245/fix-for-when-pinned-jump-list-items-get-stuck-in-windows-7/

Monday, May 20, 2013

enable FTP on IIS (Windows 7 Home Premium )

-Click Start -> Control Panel -> Programs. Then click on "Turn Windows features On or Off"

-Enable "Internet Information Services" and "FTP Server" (click + sign and ensure FTP Service is enabled)

-Click Start -> Administrative Tools -> Internet Information Services (IIS) Manager

-Right click your computer's name on the Left most -> Add FTP Site -> Specify a site name, physical path -> you might click No SSL to simplify things.

-at cmd prompt: ftp localhost

Monday, March 18, 2013

to show network interface in cmd

in elevated cmd window type this:

netsh wlan show interfaces


netsh wlan show driver

Wednesday, November 21, 2012

command line to connect wifi in Linux


=============== WPA only ============
step 1:
ifconfig wlan0 up
wpa_passphrase yournetworkessid passphrase > /opt/wpa_configure.conf

step 2, vi to edit more info into it:   (vi quick guide: start "vi filename" then press "i" for insert mode, after edit press ESC for cmd mode, type :w to write, :q to quit)
ssid=yournetworkessid
      proto=WPA
      key_mgmt=WPA-PSK
      pairwise=TKIP
      group=TKIP
      psk=f242925f83787084d58101d5eb52485989e2a553983bfe6fc5b8d27fdfa063bd

step 3, connect:
wpa_supplicant -iwlan0 -c/opt/wpa_configure.conf &

step 3, dhcp to get IP:
udhcpc -i wlan0

=============== WEP only =============
Tools to use:
ifconfig: Enable your wireless device.
iwlist: List the available wireless access points.
iwconfig: Configure your wireless connection.
dhclient: Get your IP address via dhcp.


Step 1: enable your wifi device (ifconfig wlan0 down)
ifconfig wlan0 up

Step 2: scan wifi network
iwlist wlan0 scan

Step 3: connect to the wifi (WEP only) network
iwconfig wlan0 essid NETWORK_ID key s:WIRELESS_PASSWORD

Step 4: dhcp to get IP address
udhcpc -i wlan0
OR dhclient wlan0

manual IP, gateway:
ifconfig wlan0 192.168.1.9 netmask 255.255.255.0 up
route add default gw 192.168.1.1

============== to change mac address ========

ifconfig eth0 down hw ether 00:00:00:00:00:01
ifconfig eth0 up