Table of Contents

02 : Computers

Code & Command Snippets

Windows WiFi Disconnect

Windows will disconnect a WIFI connection when it discovers there's no WAN internet - presumably Windows thinks ALL networks are connected to the Internet and this prevents using WIFI for an isolated LAN, and also throws you off the WLAN whenever the ADSL connection fails, even when you're busy using only internal LAN sessions.

THIS IS WRONG BEHAVIOUR.

I found a solution, and typically it's a REGEDIT task:

From : https://superuser.com/questions/1650052/how-to-keep-windows-10-connected-to-wifi-without-internet

Add a Registry DWORD “NoActiveProbe” value “1” at Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\NetworkConnectivityStatusIndicator

Job Done. You stay on your LAN even when the interwebs is down.

Chrome redirects

To remove a “permanent redirect” - e.g. from an http to an https URL - I found the answer here:

https://www.neilwithdata.com/chrome-redirect-forget

John Pumford-Green 27/04/23 06:12

Vim Pasting

I recently had problems pasting text into Vim by the traditional RIGHT click method. Vim would enter Insert(VISUAL) mode instead.

One solution when using Putty is to use its own mechanism :

SHIFT+INS

I prefer to use RIGHT click, as it's more natural so I found the solution is to add

set mouse-=a

to ~/.vimrc

This solves the problem, and I don't need to use nano when editing text files on my remote server via SSH using Putty.

Raspberry Pi Stuff

gm4slv@laptop:~/piimg $ sudo losetup -Pf igate.img
gm4slv@laptop:~/piimg $ lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0       7:0    0   4.3G  0 loop
├─loop0p1 259:0    0   256M  0 part
└─loop0p2 259:1    0     4G  0 part
sda         8:0    0 298.1G  0 disk
├─sda1      8:1    0 235.1G  0 part /
├─sda2      8:2    0     1K  0 part
├─sda3      8:3    0  50.9G  0 part
└─sda5      8:5    0  12.1G  0 part [SWAP]
sr0        11:0    1  1024M  0 rom
gm4slv@laptop:~/piimg $ sudo mount /dev/loop0p2 /mnt
gm4slv@laptop:~/piimg $ sudo umount /mnt
gm4slv@laptop:~/piimg $ sudo losetup -D

Git

Basic Workflow

Windows Host File

Auto SSH Tunnels

Used on remote installations to create persistent SSH reverse tunnels.

An example

svxlink hotspot

Page Info

Page created Thu May 26 14:00:21 2022 by John Pumford-Green

Page last updated: 04/04/24 21:27 BST