This will cover a lot of topics to do with ISO and burning.
.vhd/.vhdx images just like it can open .iso images."Bootable_NoEmulation.img".Bootable_NoEmulation.img to BOOTSECT.BIN"C:\WINPE"BOOTSECT.BIN in the folder "C:\WINPE\I386".7z e isofile.iso '[BOOT]'
.BIF from an existing Bootable ISO and use that..iso that I could use with Ventoy directly.boot.wim file to the Ventoy USB disk and boot to the boot.wim directly from Ventoy - no need to make an ISO. You will need to add Wimboot Plugin too.oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bd:\iso_files\boot\etfsboot.com#pEF,e,bd:\iso_files\efi\microsoft\boot\efisys.bin d:\iso_files d:\14986PROx64.iso becomes oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bE:\boot\etfsboot.com#pEF,e,bE:\efi\microsoft\boot\efisys.bin E:\ C:\users\myname\myiso.iso You can create a one line batch file to do above.
sudo mkisofs -o /path/to/image. iso /dev/sdb
Boot.wim from the folder DiskGenius - Boot (and optionally rename the file to something like, e.g., DiskGenius 5.5.1.1508 x64.wim to make it easier for you to see what exactly this one is) to the root of the VENTOY partition that's on your USB flash drive. Aside from this, you also need to make sure that you have installed the Wimboot plugin for Ventoy before you boot from the USB flash drive. (For this, you need to create a new folder named ventoy in the root of the VENTOY partition, and then copy the file ventoy_wimboot.img into this folder like has been explained here.)
0x55AA)BOOTMGRBOOTMGR) is the bootloader provided by Microsoft for Windows NT versions starting with Windows Vista and Windows Server 2008. It is the first program launched by the BIOS or UEFI of the computer and is responsible for loading the rest of Windows. It replaced the NTLDR present in older versions of Windows.BOOTMGR on either the system or the boot partition), accesses the Boot Configuration Data store and uses the information to load the operating system through winload.exe or winresume.exe on BIOS systems, and winload.efi and winresume.efi on UEFI systems.bootmgfw.efi from an EFI system partition at startup, starting the Windows Boot Manager.BOOTMGR / VBR) from the active paritition.\windows\system32\winload.exe \windows\system32\boot\winload.exe
\EFI\Microsoft\Boot\bootmgfw.efi
\windows\system32\winload.efi \windows\system32\boot\winload.efi
Links
USB drives:
Some BIOSes have a feature where a USB drive can be:
dd..ima, is also used to refer to floppy disk image files by some programs. A variant of raw image, called IMZ, consists of a gzipped version of a raw floppy disk image. These files use the .imz file extension, and are commonly found in compressed images of floppy disks created by WinImage..img file extension for a raw image of a hard disk drive and calls the format "raw".There will be cross over between software functionality and their category.
VBoxManage convertfromraw source.img output.vdi --format VDI
qemu-img convert -f raw -O vhdx source.img output.vhdx
Convert-VHD –Path c:\VM\my-vhdx.vhdx –DestinationPath c:\New-VM\new-vhdx.vhdx –VHDType Dynamic
## Fixed --> Dynamic Convert-VHD -Path "D:\Path\To\Fixed-Disk.vhd" -DestinationPath "D:\Path\To\Dynamic-Disk.vhd" -VHDType Dynamic ## Dynamic --> Fixed (For Reference Only) Convert-VHD -Path "D:\Path\To\Disk-dynamic.vhd" -DestinationPath "D:\Path\To\Disk-trimmed-fixed.vhd" -VHDType Fixed
Optimize-VHD -Path "Path\To\Your\VHDfile.vhdx" -Mode Full
diskpartelect vdisk file="<path>"attach vdisk readonlycompact vdiskdetach vdiskCtrl+L = Show the logCtrl+Z
.vhd as a .img). .vhd that was created by Rufus as a DD image.dd (At least the Linux version of dd doesn't care much if you try to write more data that the drive can hold - it'll report it, but it will not have any kind of impact on the data written), leaving you with a 1:1 copy of the original drive. .vhd exactly as you would use a standard DD image. There REALLY is no "What if...?" or "But surely..." associated to using an uncompressed .vhd as you would a DD image..vhdx format. But:
Get-VHD -Path "C:\path\to\your.vhdx"
vhdxinfo mydisk.vhdx
type: fixed or type: dynamic explicitly.New-VHD -Path "C:\fixed-compliant.vhdx" -SizeBytes 10GB -Fixed
dd or xcopy to clone contents to the new disk.## Mount WIM DISM /Mount-Wim /WimFile:"d:\boot.wim" /index:1 /MountDir:"d:\chicken" ## Make changes # Unmount WIM (Discarding Changes): DISM /unmount-wim /MountDir:"d:\chicken" /discard # Unmount WIM (Keeping Changes): DISM /unmount-wim /MountDir:"d:\chicken" /commit
osfdisk.vmdk image filesVMware Workstation vmware-mount.exe X: “C:\Temp\TestVM.vmdk”
select vdisk file=""
compact vdisk
Optimize-VHD -Path .ext4.vhdx full
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser iwr -useb https://raw.githubusercontent.com/okibcn/wslcompact/main/setup | iex
wslcompact -c ubuntu
Remove-Item "$($env:PSModulePath.split(';')[0])/WslCompact" -Recurse -Force
Open Powershell and run the following: wsl --shutdown diskpart select vdisk file="path-to-your-virtual-disk\ext4.vhdx" attach vdisk readonly compact vdisk detach vdisk exit
## Convert VBoxManage clonemedium disk --format VDI [drive]:[\path_to_file\sourceFile.vmdk] [drive]:[\path-to\destinationFile.vdi] ## Compact VBoxManage modifyhd --compact "[drive]:\[path_to_image_file]\[name_of_image_file].vdi"
VBoxManage modifyhd "[drive]:\[path_to_image_file]\[name_of_image_file].vdi" --resize 81920
VBoxManage internalcommands createrawvmdk command in VirtualBox allows you to create a virtual disk that maps to a physical disk or partition. This is useful for accessing a physical disk directly from a virtual machine.VBoxManage internalcommands createrawvmdk -filename "C:\path\to\file.vmdk" -rawdisk \\.\PhysicalDrive0
.vmdk file that represents the physical disk PhysicalDrive0/dev/sda on a Linux host:
VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda -partitions 1,5
.vmdk file that provides access to partitions 1 and 5 of /dev/sda\\.\PhysicalDrive0 for Windows, /dev/sda for Linux).VBoxManage internalcommands createrawvmdk, you can effectively utilize physical disks within your VirtualBox VMs, providing flexibility and direct access to hardware resources.vboxManage internalcommands createrawvmdk -filename "C:\Users\Public\Documents\VirtualBox\Raw Disk Images\spinrite.vmdk" -rawdisk "\\.\PhysicalDrive2" vboxManage internalcommands createrawvmdk -filename "C:\rawdisks\spinrite.vmdk" -rawdisk "\\.\PhysicalDrive2"
Get-VHD -Path "C:\path\to\your.vhdx"
sudo apt install libvhdi-utilsbrew install libvhdivhdxinfo yourfile.vhdx
00000000 76 68 64 78 66 69 6c 65 # "vhdxfile"
0x20000, which lists metadata regions.Get-VM | Where { $\_.State -eq 'Off' } | Get-VMHardDiskDrive | Optimize-VHD -Mode Full
- I have not have much success with it.
- VHD images cannot be compressed or have their size reduced.
select vdisk file="<PathToYourDesktop>\DiskGenius v6.0.1.1645.vhdx"sdelete to zero out unused space on the image's volume<PathToYourDesktop>\DiskGenius v6.0.1.1645.vhdxInstructions
VHD and VHDX are interchangeable for these commands.
Mount-VHD -Path "D:\Path\To\Fixed-Disk.vhdx" -ReadOnly Or Mount through the GUI (Disk Management, Right Click)
-ReadOnly: This should protect the volume being written to by the OS, but not this command. I am not 100% on this.sdelete64.exe -z X:
X: with the drive letter assigned to the mounted VHD.z: This flag instructs ‘sdelete’ to write zeros over the available free space, a less intensive option than multiple passes and suitable for non-critical data.Dismount-VHD -Path "D:\Path\To\Fixed-Disk.vhdx" Or Unmount through the GUI (Disk Management, Right Click)
Convert-VHD -Path "D:\Path\To\Fixed-Disk.vhd" -DestinationPath "D:\Path\To\Dynamic-Disk.vhd" -VHDType Dynamic
Optimize-VHD -Path "D:\Path\To\Dynamic-Disk.vhdx" -Mode Full
diskpart select vdisk file="D:\Path\To\Dynamic-Disk.vhdx" attach vdisk readonly compact vdisk detach vdisk exit
readonly: This should protect the volume being written to by the OS, but not this command. I am not 100% on this.Optimize-Volume -DriveLetter YourDriveLetter -ReTrim -Verbose Optimize-Volume -DriveLetter E -ReTrim -Verbose
## Check TRIM Timer/Schedule Status: sudo systemctl status fstrim.timer ## Check TRIM Service Status: sudo systemctl status fstrim If TRIM is enabled, an operation will run at the next scheduled time. If TRIM is not enabled, you can ## Run a manual TRIM using: sudo fstrim -av ## Info It is recommended to enable automatic TRIM to ensure that data usage is reflected accurately between VergeOS and the guest OS. ## To enable automatic TRIM, run: sudo systemctl enable fstrim.timer
Is htis best ehre or antoher article
TL;DR = Might not be possible any more, and if it is, it is not worth the hassle.
My DiskGenius Notes
A.DiskGenius supports to making a bootable USB version based on Windows PE so that you can recover lost data, manage disk or backup data when system cannot boot.
- When you create your USB drive I think the build process uses your PC for the drivers and the WinPE files, so the resulting data size on the USB drive will change depending on your system (Win10 = 1GB, Win11 = 2GB)
- I don't know if the DiskGenius USB drives are tied to the PC they were created on.
Although DiskGenius can use a USB drive in either the "Supper Floppy" (FDD) or Hard drive mode (HDD) it is easier to work with a HDD version where it has an MBR and Partition table like a traditional hard drive.
When you format a USB drive in Windows the "Super Floppy" format is used by default. I am not sure what happens when you use Windows to format a USB drive taht has a partition table, perhaps ot leaves it alone.

Non bootableMBRBIOS or UEFIDISKGENIUS (or whatever you want)FAT32Default (this might vary depending on the size of the USB drive)This is non-destructive process, so if there were files on the USB before, they should still be there after the creation of the WinPE environment.
- I would recommend getting a 2GB USB drive to keep the image size down and reduce the number of steps required.
- (Win10 WinPE = 550mb)
- (Win11 WinPe = 1GB+)
- The size difference between the images created by these formats is minimal.
- Only use VHDX
Alt-Z in Rufus to zero a physical drive.
DiskGenius v6.0.1.1645.vhdxDiskGenius v6.0.1.1645.vhdx to your ventoy images partition.diskmgmt.mscC:\Users\quantunwarp\Desktop\DiskGenius v6.0.1.1645.vhdx2GBVHDXDynamically expanding (Recommended)Initialise DiskMBR partition styleFAT32DefaultDisk GeniusDiskGenius v6.0.1.1645.vhdx to your ventoy images partition.
- This only works when using EFI/UEFI boot environments.
- If you try and boot the WIM when using MBR/CSM/Legacy, it will start to load and then a black screen will overlay the Ventoy loader and it will crash.
...\DiskGenius - Boot\boot.wimboot.wim to something human readable like DiskGenius v6.0.1.1645.wimDiskGenius v6.0.1.1645.vhdx to your ventoy images partition.
- This is a very trick and time consuming option and is not really needed
- Try and find and ISO already done, and then use this.
method 1 get a windows disk and swap out the contents, keeping the boot sector
DiskGenius v6.0.1.1645.iso to your ventoy images partition.There are a couple of methods outlined below.
diskpart list disk select disk # detail disk
Microsoft DiskPart version 10.0.26100.1150 Copyright (C) Microsoft Corporation. On computer: WIN11PC DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 1863 GB 4096 KB * Disk 1 Online 7651 MB 0 B DISKPART> select disk 1 Disk 1 is now the selected disk. DISKPART> detail disk General USB Flash Disk USB Device Disk ID: 6F20736B Type : USB Status : Online Path : 0 Target : 0 LUN ID : 0 Location Path : UNAVAILABLE Current Read-only State : No Read-only : No Boot Disk : No Pagefile Disk : No Hibernation File Disk : No Crashdump Disk : No Clustered Disk : No Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 5 E PICTURES FAT32 Removable 7651 MB Healthy DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- * Partition 1 Primary 14 GB 0 B DISKPART> select partition 1 There is no partition selected. DISKPART>
There is no partition selected., indicating it has an error accessing the partition table, which do not exist on "Super Floppy" USB drives.

- TL;DR this error is caused by the source USB formatted as a "Super Floppy"
- Starwind P2V does not support "Super Floppy" for live copying as it expects a partition table.
- A USB drive can be formatted as a traditional hard drive (HDD) or in a "Super Floppy" format akin to a traditional floppy disk (FDD).
- "Super Floppy" does not have a MBR or a Partition Table which is what Starwind is looking for when copying from the mounted Disk image.
- Starwind wiil not present/see Removable Media disks or their Volumes, only hard disks. This is intentianal by the software developers.

Log File
7/21 16:24:49.493 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: SetDllDirectory: C:\Program Files\StarWind V2V Converter\lib 7/21 16:24:49.493 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: File Version: 9.0.1.757 7/21 16:24:49.508 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: Load language IDR_XML_ENGLISH 7/21 16:24:49.508 2b68 Facility ???INFO: CV2V_ConverterApp::InitInstance: Set current language English 7/21 16:24:49.508 2b68 Facility ???INFO: CPS_V2V_Converter::CPS_V2V_Converter: Version MajorVersion 10, MinorVersion 0, BuildNumber 19045 7/21 16:24:49.508 2b68 Facility ???INFO: WrapperHyperV::WrapperHyperV: LoadLibrary C:\Windows\system32\wbem\wmiutils.dll - 94cb0000 7/21 16:24:49.508 2b68 Facility ???INFO: WrapperHyperV::WrapperHyperV: LoadLibrary C:\Windows\system32\wbem\wmiutils.dll - 94cb0000 7/21 16:24:53.723 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eSynchronization 7/21 16:24:57.926 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eAzureConnectionTo 7/21 16:25:06.162 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eLocationTo 7/21 16:25:09.053 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eFormat 7/21 16:25:12.381 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eOptionsHyperV 7/21 16:25:17.914 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eConverting 7/21 16:25:43.043 2b68 Facility ???INFO: CPPOutputFile::onNext: Out path: C:\Users\quantumwarp\Desktop\DiskGenius-Dynamic.vhdx, Out format 11 7/21 16:25:43.043 2b68 Facility ???INFO: ICPPage::OnWizardNext: SetActivePage - eHYPERVConnectionTo 7/21 16:25:43.043 1788 Facility ???INFO: CPPConverting::Convert: InConvertType: 2, OutConvertType: 4 7/21 16:25:43.043 1788 Facility ???INFO: CPPConverting::ConvertDisks: pathInput: 1, pathOutput: C:\Users\quantumwarp\Desktop\DiskGenius-Dynamic.vhdx 7/21 16:25:43.043 1788 Facility ???INFO: P2V::CreateInputImage: path 1 7/21 16:25:43.043 1788 Facility ???INFO: P2V::CreateInputImage: Size 1 - 15518924800, BytesPerSector - 512 7/21 16:25:48.090 1788 Facility ???INFO: CPPConverting::ConvertDisks: CreateInputImage: 0 7/21 16:25:48.090 1788 Facility ???INFO: CPPConverting::ConvertDisks: CreateOutputImage: 0 7/21 16:25:48.090 1788 Facility ???ERROR: CPPConverting::ConvertImage: Read 3 7/21 16:32:00.054 1788 Facility ???ERROR: CPPConverting::ConvertDisks: ConvertImage - 2 7/21 16:32:00.054 1788 Facility ???ERROR: CPPConverting::Convert: FAILED
Log Explained
Here's what the log tells us:
9.0.1.757 - This is a relatively recent version, so it's unlikely to be a bug in an old release.InConvertType: 2 - This indicates a Physical Disk source.OutConvertType: 4 - This indicates a Hyper-V (VHDX) destination.pathInput: 1 and Size 1 - 15518924800, BytesPerSector - 512
pathInput: 1 likely refers to the "Disk 1" as seen by Windows Disk Management. This corresponds to the virtual disk presented by OSFMount.15,518,924,800 bytes (approx 14.45 GB) and BytesPerSector - 512 are correctly identified by the converter from the virtual disk.CPPConverting::ConvertDisks: CreateInputImage: 0 - This line means StarWind successfully initialized the connection to the source disk.CPPConverting::ConvertDisks: CreateOutputImage: 0 - This line means StarWind successfully initialized the connection to the destination VHDX file.CPPConverting::ConvertImage: Read 3 - This is the critical error. It happens immediately after the input and output images are created, right at the point where StarWind tries to read the actual data from the source disk. This confirms a low-level read error from the OSFMounted virtual disk.ConvertImage - 2, FAILED) are a direct consequence of this initial read failure.10/21 12:55:57.929 2764 Facility ???WARNING: P2V::getBuffer: ReadFile - 23. Data error (cyclic redundancy check). 10/21 12:55:57.929 2764 Facility ???ERROR: CPPConverting::ConvertImage: Read 3 10/21 13:03:16.650 2764 Facility ???ERROR: CPPConverting::Convert: FAILED
After in-depth research I can clarify the error is not cause by:
boot.wim there is no difference (Win10 = 550mb)(Win11 = 1GB).What I have tried
- Always use Dynamic/Growable disk image files where possible to keep space used down.
- Always use MBR/HDD style formatting on your USB drives where possible.
- TL;DR = UEFI GOP (Graphics Output Protocol) sets the screen resolution before WinPE when using EFI on my lenovo (resolution seems to be set at 800x600 and cannot be changed)
- Solution = Boot in legacy mode and then change the resolution in DiskGenius if needed: View --> Set screen resolution (Options: 1920x1080, 1024x768). This was on my Lenovo laptop.
- Notes
- Using a different boot loader like Grub which can be used to see what resolutions the GOP provides.
- My Lenovo on EFI returns a resolution of 800x600 but when I use CSM/Legacy I get 1024x768 and 1920x1080 which I can then swap between with the DiskGenius menu in the WinPE environment.
- For most users on modern UEFI systems — the hard limit is 1024x768.
- Some people say showing the boot logo helps increase screen resolution (not tested).
- DiskGenius resolution in the BCD is 1024x768
- Resolutions available will vary from PC to PC, Laptop to Laptop, and can also vary depending on the the boot method (Legacy BIOS / UEFI) used.
In the WinPE environment created by DiskGenius, you can change the screen resolution according to the following, if your hardware supports it.

When trying to change the resolution of my screen when using DiskGenius on my Lenonvo laptop.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Display>
<ColorDepth>32</ColorDepth>
<HorizontalResolution>1920</HorizontalResolution>
<RefreshRate>60</RefreshRate>
<VerticalResolution>1080</VerticalResolution>
</Display>
</component>
</settings>
</unattend>
X:\bcdedit /store D:\boot\BCD /set {globalsettings} graphicsresolution 1280x1024
bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "800x600"
bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "1024x768"
bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "1280x768"
bcdedit /store "d:\boot\BCD" /set {bootmgr} graphicsresolution "1280x1024"
graphicsresolution is backed by the boot graphics adapter using VESA BIOS Extensions (VBE) or UEFI GOP (Graphics Output Protocol).bcdedit.exe /set {globalsettings} graphicsresolution 800x600
bcdedit.exe /set {globalsettings} graphicsresolution 1024x600
bcdedit.exe /set {globalsettings} graphicsresolution 1024x768
C:\windows\system32>bcdedit.exe /set {globalsettings} graphicsresolution 1920x1080
The integer data is not valid as specified.
Run "bcdedit /?" for command line assistance.
The parameter is incorrect.
bcdedit.exe /set {globalsettings} highestmode on
graphicsmode --info command on the GRUB4UEFI commandline.boot.wim file.ventoy.json for persistent settings).QRes.exe /x:800 /y:600
nircmd.exe setdisplay 1024 768 24
bcdedit /deletevalue "{globalsettings}" highestmode
reboot
This is just a temporary article for these notes, I might move them.
/var/lib/mysql/server.quantumwarp.com.err
^(?!.*\[ERROR\] mariadbd: Table).*\r?\n
.*\[ERROR\] mariadbd: Table '\.
' is marked as crashed and should be repaired$
Throughout these examples I have used the regex
YourCodeHereto and you should change this to match your needs
Find: ^.*YourCodeHere(.*) Replace: YourCodeHere\1
$your contentNotes
A couple of methods to identify lines and delete them.
.*YourCodeHere.*\n .*YourCodeHere.*\r?\n
Notes
\n if straight from your Linux box, but you might just want to check this as it could be \r\nYourCodeHere should be swapped for something on each of the lines you want to delete.A couple of methods to identify lines and delete all the others.
^(?!.*YourCodeHere).*\r?\n ^(?!.*YourCodeHere).*\R # When this is used, blank lines are left ^((?!YourCodeHere).)*$
YourCodeHere # This will allow marking of all lines not containing [ERROR] ^((?!YourCodeHere).)*$
Find: ^.*YourCodeHere Replace: YourCodeHere or Find: ^.*?YourCodeHere Replace: YourCodeHere
A collection of hints and tips of this topic.
Notepad++ supports showing newlines as CR/LF/CRLF but does not support showing newlines as ↵, however you can simulate it:
? operator after a quantifier. See the example below:
<h1 style="color: red">Hello</h1> <h1.*?> - This will match <h1 style="color: red"> <h1.*> - This will match <h1 style="color: red">Hello</h1>
a[^c]+c
a, followed by one or more character that isn't c, followed by c. This will match abc and adc.Now Notepad++ will recognise .tpl files as PHP files. When you open the next one, it will contain syntax highlighting.
- I am using the Fira Code here for this example but this will apply to all fonts where this occurs
- The EOL character is shown when using the DejaVu Mono font.
- The question mark character is shown is when the required glyph does not exist in the current font.
- When copying text, the glyph references are copied not the characters, so if a character does not show correctly in one application this does not mean this will be the same in another.
The issue you're encountering is due to the Fira Code font not supporting the ↵ character (Unicode U+21B5: "DOWNWARDS ARROW WITH CORNER LEFTWARDS").
!= into a neat symbol), but it has a more limited set of Unicode glyphs compared to DejaVu Mono.↵, so Notepad++ shows a replacement character (typically a question mark or a box), indicating a missing glyph.↩, ↓, or ⏎), though it’s not the same.You can test if Fira Code supports a character by:
VS Code and Notepad++ handle fonts very differently, particularly when it comes to missing glyphs:
| App | Font Used | ↵ Glyph Supported by Font? | Font Fallback? | Result |
|---|---|---|---|---|
| VS Code | Fira Code | ❌ | ✅ Yes | ✔️ Displays ↵ |
| Notepad++ | Fira Code | ❌ | ❌ No | ❌ Question mark |
Using the regex below and Notepad++ remove the tag data and then remove unwanted paragraphs in list items allowing for correctly formatted information in my articles.
TL;DR
All the methods work but if in doubt use these:
- Remove <article> & </article> tags
- Remove unwanted tag data: Method 2
- Remove Nested <p>...</p>: Method 1
These regex simply removed unwanted style and data-start="" and data-end="" meta values from all html elements (eg: <ul data-start="1463" data-end="1764"> --> <ul>)
Find what: ( data-start="[0-9]+"| data-end="[0-9]+") Replace with:
Find what: <([a-z0-9]+).*?( ?/)?> Replace with: <\1\2>
Find what: <(h1|h2|h3|h4|h5|h6|pr?e?|br|hr|ul|ol|li|strong|code|em){1}.*?( ?/)?>
Replace with: <\1\2>
Find what: (<li>[\s\S]*?)<p>([\s\S]*?)</p>([\s\S]*?</li>) Replace with: \1\2\3
Explanation of the Regex
Make sure you have Regular expression selected in the "Search Mode" area of the Find and Replace dialog.
Find What: (<li>[\s\S]*?)<p>(.*?)<\/p>(?=[\s\S]*?<\/li>) Replace with: $1$2
Explanation of the Regex
This regex uses a combination of capturing groups and a positive lookahead to find and replace all instances within a single pass.
When you use $1$2 in the "Replace with" field, Notepad++ will replace the entire matched string with the content of the first and second capturing groups, effectively removing the <p> tags while preserving their content and the surrounding li structure.
Important: Make sure Regular expression is selected in the Search Mode section of the Find and Replace dialog. You may also need to check the . matches newline box.
## Remove the first nested <p> Find what : <li>[\r?\n?]+<p> Replace With: <li> ## Remove the last nested</p> Find what : </p>[\r?\n?]+</li> Replace With: </li> ## Remove the first pair of nested <p>...</p> Find what : <li>\s*(?:<p>(.*?)</p>\s*)+</li> Replace With: <li>\1</li>
## Remove all <article> Find what : <article.*> Replace With: ## Remove all </article> Find what : </article> Replace With:
Window should just enable this by default but it doesn't even in windows 11.
The tutorials in the links below will give you a clearer understanding of how and why to perform this upgrade but this is an overview of the methods I found
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Type DWord -Value 1
Computer Configuration > Administrative Templates > System > Filesystem > Enable Win32 long paths
LongPathsEnabled is enabledSet-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' -Name LongPathsEnabled -Type DWord -Value 1
Computer Configuration > Administrative Templates > System > Filesystem > Enable win32 long paths
LongPathsEnabled setting on all Windows servers hosting Veeam roles.dddd
So you are installing `Git for Windows` and you are asked how to handle line endings, what option should I pick and why? I will answer that question here so you know what to choose, and why rather than just following a YouTube video than never explains anything except just click next because this is what I use we will explore every avenue.
The information here applies to handling EOL in Git and probably applies to people whose OS is not Windows such as MacOS and Linux.
TL;DR
- EOL = End of Line
- EOL Types
CRLF= \r\n = WindowsCR=\n= Old computers and old MacOSLF=\n= Linux- Modern editors support
CRLF,LFand probablyCR.- Selecting your EOL
LFis the universal EOL and should be used unless it is a Windows project, in which case the EOL will beCRLF.- Only old and specialist systems use
CR.- Some projects can have a mix of files with different EOL.
- Rarely, some single files can have mixed EOL but VSCode does not currently support this.
- How to handle EOL
- Set EOL on a per project basis.
- Use EditorConfig to set your EOL, if this is not supported, set them with your editor.
- Do NOT use Git to convert EOL on submission for any reason.
- Set your editor's default EOL for new files to
LF. This is not mandatory but makes life easier when working cross platform.- Using your editor for EOL handling
- prevents binary files from being damaged.
- Allows the use of files which use different EOL.
- Allows the use of single files with mixed EOL.
Where I can change line endings when using Git for Windows and VSCode? (each overrides the last)
Settings precedence - User and workspace settings | Visual Studio Code
- VSCode (User settings) (
%APPDATA%\Code\User\settings.json)
- Action: Set EOL for new files.
- Scope: All Workspaces.
- Additional:
- Command Palette ( F1 | Ctrl+Shift+P) --> Preferences: Open User Settings --> `Files: Eol`: LF
- Settings --> Text Editor --> Files --> Eol: LF
- Profiles replace the `User settings`, if loaded.
- These settings are only per user which means they are local and are not shared.
- VSCode (Workspace settings) (
.vscode/settings.json)
- Action: Set EOL for new files.
- Scope: Workspace.
- Additional:
- These settings can be commited to a repo and thus can be shared between colleagues and the wider world.
- VSCode (Multi-Root Workspace / Workspace Folder setting) (
.vscode/.code-workspace)
- Action: Set EOL for new files.
- Scope: Specified Workspace Folders.
- Additional:
- Settings for a particular folder can be saved in the
.code-workspace.- These settings can be commited to a repo and thus can be shared.
- VSCode (Multi-Root Workspace) (
[Workspace Folder]/.vscode/settings.json)
- Action: Set EOL for new files.
- Scope: Workspace Folder
- Additional:
- These settings can be commited to a repo and thus can be shared.
- Git (Repository) (
.editorconfig)
- Action: Set EOL for new files.
- Scope: Git repository.
- Additional:
- Visual Studio = Full native support, VS will check your code on every code change.
- VSCode = Partial support is added by extensions.
- VSCode (Extensions) - Examples below:
- Auto Convert End Of Line - Visual Studio Marketplace
- Action: Change the EOL for all
textfiles, on save- Scope: Workspace
- Prettier - Code formatter - Visual Studio Marketplace
- Action: Change the EOL for all files, as specified (see below) on save
- Scope: Workspace
- Additional:
- You can use VS Code settings to configure prettier. Settings will be read from (listed by priority):
.prettierrc(Prettier configuration file).editorconfig- Visual Studio Code Settings (Ignored if any other configuration is present)
- NOTE: If any local configuration file is present (i.e.
.prettierrc) the VS Code settings will NOT be used.- The VS Code settings are meant to be used as a fallback and are generally intended only for use on non-project files.
- It is recommended that you always include a prettier configuration file in your project specifying all settings for your project.
- If
options.editorconfigistrueand an.editorconfigfile is in your project, Prettier will parse it and convert its properties to the corresponding Prettier configuration. This configuration will be overridden by.prettierrc, etc. Currently, the following EditorConfig properties are supported:
end_of_lineindent_styleindent_sizetab_widthmax_line_length- End of Line - Options · Prettier - Prettier ships with a handful of format options.
- Unlocking Prettier: Mastering End of Line Configuration | runebook.dev
- Inconsistent EOL characters can lead to unnecessary Git conflicts, making it harder to track changes and collaborate effectively.
- Prettier aims to enforce consistent code style across a project or team. This includes standardizing how line endings are represented.
- This article covers
.prettierrcand.gtiattributes- ESLint - Linter - Visual Studio Marketplace
Action: Change the EOL for all files, as specified (see below) on saveScope: Workspace- EditorConfig for VS Code - Visual Studio Marketplace
- Action: Change the EOL for all files, as specified in
.editorconfig, on save- Scope: Workspace
- Additional:
- Supported Properties
indent_styleindent_sizetab_widthend_of_line(on save)insert_final_newline(on save)trim_trailing_whitespace(on save)- Git (Repository) (
.gitattributes)
- Action: Change the EOL for all files
- Scope: Git repository, but only on files as specified in the
.gitattributes- Additional:
- Applied when files are checked-in (submitted) to this Git repo.
- Git (Global Config / Git for Windows) (
.gitconfig)
- Action: Change the EOL for all files
- Scope: All local Git repositories.
- Additional:
- Occurs when files are submitted or retrieved from any Git repo.
- Only
core.autocrf=trueperforms a conversion on EOLs during on Check-in and Checkout, all other settings are Checkin-in only.
How to enforce LF EOL (Windows --> VSCode --> Git)
Making the following changes to your Editor and Repo will ensure the best outcome
- VSCode (User settings) (
%APPDATA%\Code\User\settings.json)
- Scope:
- Set EOL LF for new files, for the User.
- Actions:
- Enable
LFas the defaultEOLfor the current VSCode User
- Command Palette --> Preferences: Open User Settings --> `file end of line` --> `Files: Eol`: \n
- It will indicate LF at the bottom of the dropdown, which is fine as this is is just a note.
- VSCode (Workspace settings) (
.vscode/settings.json)
- Scope:
- Set EOL LF for new files, for the Workspace.
- Actions:
- Enable
LFas the defaultEOLfor the VSCode Workspace
.vscode/settings.json{ "files.eol": "\n" }Command Palette --> Preferences: Open Workspace Settings --> `file end of line` --> `Files: Eol`: \n
- Git (Repository) (
.editorconfig)
- Scope:
- Set EOL LF for new files, for the Git Repository.
- Some VSCode extensions will use the EOL and apply upon save.
- Actions:
- Enable
.editorconfigsupport (Visual Studio does not need this)
- Install EditorConfig for VS Code
- Not required if you use Prettier as this has supports, but you will need to make sure it is configured to respect
.editorconfighowever.prettierrcsettings will always override.editorconfigvalues..editorconfigsets the EOL for new files but these VSCode extensions set the EOL on save.- Create
.editorconfig# EditorConfig is awesome: https://EditorConfig.org # top-most EditorConfig file root = true # Default Behaviour [*] end_of_line = lf- VScode (Extensions) (
.prettierrc) (Prettier)
- Scope:
- Can use .editorconfig or it's own settings, Set EOL LF for new files, for the Git Repository.
- Some VSCode extensions will use the EOL and apply upon save.
- Actions:
- Create
.prettierrc(only needed if using Prettier){ "endOfLine": "lf" }- VScode (Extensions) (
eslint.config.js) (ESLint)
- SCope
- Can use .editorconfig or it's own settings, Set EOL LF for new files, for the Git Repository.
- Some VSCode extensions will use the EOL and apply upon save.
- Actions:
- Create
eslint.config.js(only needed if using ESLint)import { defineConfig } from "eslint/config"; export default defineConfig([ // Default Line Ending { files: ['**/*.*'], rules: { 'linebreak-style': ['error', 'unix'], }, }, // Force batch scripts to always use CRLF line endings { files: ['**/*.[bB][aA][tT]', '**/*.[cC][mM][dD]'], rules: { 'linebreak-style': ['error', 'windows'], }, }, // Force bash scripts to always use LF line endings { files: ['**/*.sh'], rules: { 'linebreak-style': ['error', 'unix'], }, }, ]);- Git (Repository) (
.gitattributes)
- Scope
- Enforce conversion of EOL to LF.
- Actions:
- Create
.gitattributes(optional)
# Default Line Ending * text=auto eol=lf
- This will change all text file's EOL to LF when checking them into the repository, but not when you check them out in to your working tree (i.e. real files).
- This is a fallback to enforce EOL before committing and should not be needed if everything in your repo is setup correctly.
- Using this setting (* text=auto eol=lf) on it's own can cause corruption in some case, so a more granular .gitattributes configuration should be usedas Git can make mistakes with line endings, e.g. mixed EOL files and those with binary blobs
- Use and this is a base reference and also consult further notes on this page.
* text=auto eol=lfis the same as* text=auto- This rule is doing the same for this repository as
core.autocrf=inputwould do for the whole local Git instance.
EOL Handling Summary
- General
- DO NOT use
core.autocrlfto normalise your line endings
- This can lead to file corruption (i.e. embedded binary blobs in a text file)
- You cannot assume everyone has set their Git development environment the same.
- These settings would be global and thus a local repository would not have control and nor could you mandate changes with your editor.
- While it was useful in the past for source control tools to handle line endings, it really is an editor problem and it was solved with EditorConfig.
- Use
.gitattributesand.editorconfigto configure line normalisation
- These work on a Per-Repository basis.
- This will allow you granular control of EOL.
- Supports files with different EOL.
- Support an individual file with mixed EOL.
- The repository can define the EOL handling rather than individual user environments.
- This is the professional way to setup a repository.
- .git
- Repo (check-in) = Commit = Submitted to Git
- Working Tree (checkout) = The real files on your PC
- .gitconfig
core.autocrlf=true
- Converts text file's EOL to
LFon check-in to the repo from the working tree.- Converts text file's EOL to
CRLFon checkout from the repo to the working tree.- Tends to be recommended setting for Windows developers since it guarantees
LFin the remote copy of your code while allowing you to useCRLFin your working tree for full compatibility with Windows editors and file formats.- This setting only needs be used in a Window environment
, but can work in other OS.core.autocrlf=input
- Converts text file's EOL to
LFon check-in to the repo from the working tree.- Leaves the working tree untouched.
- This would be the same as:
* text=auto eol=lfand* text=auto, but applied globally.- .gitattributes
- Controls how EOL are handled when checking-in files to the Git repository.
- Local files (Working Tree) and their EOL are unaltered by these settings.
- Conflicts might occur when checking out files, but these can be resolved locally without poisoning the repo.
* text=auto eol=lf,* text=autoandcore.autocrlf=inputall do the same thing exceptcore.autocrlf=inputworks at the Git server level and not on a per repository basis.- (untested) This file will override the
core.autocrlfsettings for specified files in this repository if an appropriate rule exists.- Using this file ensures a consistent behavior for all users, regardless of their Git settings and environment.
- .editorconfig
- An open, editor agnostic schema.
- Defines the EOL for all new files.
- Some VSCode extensions use these settings on save, so these settings can work on new and created files.
- VSCode (User Settings)
- Configuring EOL here will only apply to new files.
- You should change the default EOL to LF as a fallback precaution (unless you are working on Windows only environment).
- These settings are only per user which means they are local and are not shared.
- VSCode (Workspace settings)
- Configuring EOL here will only apply to new files.
- You should change the default EOL to LF as a fallback precaution (unless you are working on Windows only environment).
- These settings can be commited to a repo and thus can be shared.
Checkout as-is, commit as-is (Git for Windows) (core.autocrlf = false)
Why should I choose this option, here is a simple Pros vs Cons:
.gitattributes..editorconfig will be honoured and kept when the files are submitted to the repository.Checkout Windows-style, commit Unix-style line endings (Git for Windows) (core.autocrlf = true)
Why should I choose this option, here is a simple Pros vs Cons:
So you already have a load of files with CRLF and now you need them all to be LF before committing them to Git.
find . -type f -exec dos2unix {} \;
TYPE input_filename | MORE /P > output_filename
sed -i 's/$/\r/' fileLinux.txt
find -type f -exec sed -i 's/$/\r/' '{}' \;
tr -d '\r' < fileWindows.txt > fileLinux.txt
sed -i 's/\r//' fileWindows.txt
## To convert the newline characters from DOS/Windows to Unix/Linux: $ dos2unix <filename> ## To convert the newline characters from Unix/Linux to DOS/Windows: $ unix2dos <filename>
npm i -g eol-converter-cli
eolConverter crlf "**/*.{txt,js,java,etc}"
# Set the default behavior, in case people don't have core.autocrlf set. * text=auto # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. *.c text *.h text # Declare files that will always have CRLF line endings on checkout. *.sln text eol=crlf # Denote all files that are truly binary and should not be modified. *.png binary *.jpg binary
git config --global core.autocrlf inputThis will fix any
CRLF to LF when you commit.git config --global core.autocrlf trueThis will make sure that, when you checkout in windows, all
LF will be converted to CRLF..gitattributes file as we don't want to expect everyone in our team to set their own config. This file should be placed in the repository root and, if it exists, git will respect it..gitattributes and text=auto eol=lf## Specify precise line ending behaviors * text=auto *.sh text eol=lf *.bat text eol=crlf *.txt text eol=lf
.gitattributes file* -text in the .gitattributes and add .editorconfig that enforces the projects preferred line endings. An added benefit is that you can also specify file encodings in your .editorconfig file.###############################
# Git Line Endings #
###############################
# Set default behaviour to automatically normalize line endings.
* text=auto
# Force batch scripts to always use CRLF line endings so that if a repo is accessed
# in Windows via a file share from Linux, the scripts will work.
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
# Force bash scripts to always use LF line endings so that if a repo is accessed
# in Unix via a file share from Windows, the scripts will work.
*.sh text eol=lf
###############################
# Git Large File System (LFS) #
###############################
# Archives
*.7z filter=lfs diff=lfs merge=lfs -text
*.br filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
# Documents
*.pdf filter=lfs diff=lfs merge=lfs -text
# Images
*.gif filter=lfs diff=lfs merge=lfs -text
*.ico filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
# Fonts
*.woff2 filter=lfs diff=lfs merge=lfs -text
# Other
*.exe filter=lfs diff=lfs merge=lfs -text
.gitattributes. git status tells you that you’ve changed a file, but running git diff doesn’t show you any changes.core.autocrlf is enabled, Git will convert CRLF to LF during commit and LF to CRLF during checkout. A file that contains a mixture of LF and CRLF before the commit cannot be recreated by Git. For text files this is the right thing to do: it corrects line endings such that we have only LF line endings in the repository. But for binary files that are accidentally classified as text the conversion can corrupt data.core.safecrlf is basically just a way to make sure you don’t irreversably perform CRLF conversion on a binary file..gitattributes file to manage how Git reads line endings in a specific repository. When you commit this file to a repository, it overrides the core.autocrlf setting for all repository contributors. This ensures consistent behavior for all users, regardless of their Git settings and environment.lf, crlf and native, which uses the platform’s native line ending. The default value is native.
git config core.eol lf # LF git config core.eol crlf # CRLF git config core.eol native # platform (default)
# Set the default behavior, in case people don't have core.autocrlf set. * text=auto # Explicitly declare text files you want to always be normalized and converted # to native line endings on checkout. *.c text *.h text # Declare files that will always have CRLF line endings on checkout. *.sln text eol=crlf # Denote all files that are truly binary and should not be modified. *.png binary *.jpg binary
core.autocrlf setting isn’t the ideal approach for configuring line endings in a project..gitattributes file to your repo so you can enforce line endings consistently in your codebase regardless of what operating systems your developers are using..gitattributes file is technically all that you need to enforce the line endings in the remote copy of your code. However, as we just saw, you may still see CRLF line endings on Windows locally because .gitattributes doesn’t tell Git to change the working copies of your files. Fortunately, we can take things a step further with an .editorconfig file; this is an editor-agnostic project that aims to create a standardized format for customizing the behavior of any given text editor. Lots of text editors (including VS Code) support and automatically read this file if it’s present.core.autocrlf is set to false on a fresh install of Git, meaning Git won’t perform any line ending normalization. Instead, Git will defer to the core.eol setting to decide what line endings should be used; core.eol defaults to native, which means it depends on the OS you’re using. That’s not ideal because it means that CRLF may make its way into your code base from Windows devs.core.autocrlf=true converts files to CRLF on checkout from the repo to the working tree, while core.autocrlf=input leaves the working tree untouched.core.autocrlf=true tends to be recommended setting for Windows developers since it guarantees LF in the remote copy of your code while allowing you to use CRLF in your working tree for full compatibility with Windows editors and file formats..gitattributes config normalizes line endings to LF for all text files checked into your repo while leaving local line endings untouched in the working tree:text=auto option tells Git to only normalize line endings to LF for text files while leaving binary files (images, fonts, etc.) untouched. This distinction is important—we don’t want to corrupt binary files by modifying their line endings..gitattributes file, your changes won’t take effect immediately for files checked into Git prior to the addition of .gitattributes. To force an update, you can use the following command since Git 2.16:CRLF) for line endings, operating systems like Linux and Mac use only the line feed (LF) character..gitattributes file to normalize your line endings regardless of what operating systems your developers are using..editorconfig file to ensure that new files are always created with LF line endings, even on Windows..gitattributes file is indeed the best practice, but if you are working on a personal repository, it shouldn’t matter. In fact, autocrlf=true wouldn’t cause any problems even if you were working with other Linux/Mac developers since the remote code would always have LF line endings anyway. The main reason why autocrlf is not useful is because you have to keep setting it up every time you get a new Windows machine (since line ending normalization is turned off by default in Git). If you forget to set it up, you’ll re-introduce CRLF into the remote code. From my article:.editorconfig is a text file that overrides the settings of the editor of your choice..editorconfig you are able to override this settings with a simple text file that usually is checked in with your source code and available for all developers who work on those sources..editorconfig it will use it immediately and it will check your code on every code change.eol attribute, the Git config, and the platform (see explanation of eol below)..gitattributes file is a special file that tells Git how to handle specific files in your repository..gitattributes in subfolders for rules that only apply there..gitattributes file. Here's how you can do it:* text=auto eol=lf
*: Matches all files in the repository.text=auto: Tells Git to automatically detect text files.eol=lf: Ensures that line endings are normalized to LF when files are checked out..gitattributes:
git add --renormalize . git commit -m "Normalize line endings to LF"
to be continued
I am trying to figure out how to add a custom file type to be recognised by Netbeans.
I am editing .tpl files and I would like them to be recognised as PHP/HTML files.
Solution
This option will use default editor colour, so no colouring any more.
If you upgrade your Java SDK, the NetBeans IDE may give you the following error message (Invalid jdkhome specified) at startup:
Cannot find java.exe in specified jdkhome.
Neither C:\Program Files\Java\jdk1.6.0_10\jre\bin\java.exe
nor C:\Program Files\Java\jdk1.6.0_10\bin\java.exe exists.
Do you want to try to use default version?
This can be corrected by manually editing the netbeans.conf file found under:
%PROGRAMFILES%\NetBeans 6.5\etc
Replace the line netbeans_jdkhome with the correct path information. Alternatively, you can comment out the line entirely with # and NetBeans will use your default JDK, through JAVA_HOME.
In Netbeans using SVN Subversion you get the following error when you try and sync/checkout files.
svn: Repository UUID '1a063a9b-81f0-0310-xxxxx etc' doesn't match expected UUID '7be80a69-xxxxxx etc'
(I've xxxxx'd out some of the UUID numbers in case they were sensitive in nature)
Notes
Solution
This will be a collection of preferred settings for netbeans. This will prevent me hunting to change that one setting for that annoying feature.
Disable mysql auto closing
When you press return/enter to split SQL statements, Netbeans automaticlly closes the statement and then re-opens it. This makes the code evern messier.
options --> editor --> code completion --> PHP language --> disable 'Use String Auto-Concatenation after Typed Break'
These are some examples of searches in netbeans using a Regex pattern
So i want to change some <input> tags.
<input .....> to <input ..... />
The following will search for all <input strings that do not terminate in />
Search String: <input(.*)([^\/])> Replacement String: <input$1$2 />
However this does not take into account of whether there is a space at the end so I need to do another search for:
<input(.*)({space}){2}\/> - needs finishing
Notes
[^\/]
A minor issue is that the built in Netbeans Subversion integration doesn’t work in a 64-bit install. It helpfully provides a link to the Subversion client software at CollaNet, however the most recent version for Windows is v1.5.5 which isn’t a lot of help if you are using Subversion 1.6.x.

Here I will give the basic instructions on how to use GitHub with Netbeans. I can be confusing at the beginning but does get easier.
Keep files in the project folder
This will be a collection of GitHub specific, Git and how to layout your project's Repository.
I have put my real quick overview of accounts plans and who should use what here.
- Public repositories
- Host open source projects in public GitHub repositories, accessible via web or command line.
- Public repositories are accessible to anyone at GitHub.com.
- Collaborators and members for public repositories are always unlimited irrespective of your personal plan (e.g. free, Pro) or your organization's plan (e.g. Free, teams, Enterprise)
- Private repositories
- Host code in private GitHub repositories, accessible via appliance, web, and command line.
- Private repositories are only accessible to you and people you share them with.
- Collaborators and members for private repositories:
- On a GitHub personal account (Free, Pro), collaborators and members are unlimited.
- On a GitHub Free Organization, collaborators and members are unlimited.
- Although collaborators and organization members serve different purposes within GitHub, for organizations subscribed to GitHub Team collaborators must occupy a paid seat in order to access private repositories. Organization members always require a paid seat.
- If you decide to upgrade your organization from GitHub Free to GitHub Team, you must add a paid seat for each organization member as well as each collaborator for them to keep access.
- No data will be lost, just access for those who do not have a seat.
- You only need to buy seats for those users that you want to have access to the organizations repositories going forward, not for everybody who has every made a change or contribution to any of the organization's repositories.
- Upgrading your account's plan - GitHub Docs - If you'd like additional users to have access to your GitHub Team organization's private repositories, you can purchase more seats anytime.
- Pricing Plans
- All pricing @ GitHub is done on a per-user basis.
- Personal accounts and organization seats are classed as separate Billing entities.
- If you upgrade your personal account from GitHub Free to the GitHub Pro plan then you can:
- get additional features for your personal Private repositories such as Pages and Wikis
- you will also get more Git features and various Code workflow enhancements for both your Public and Private repositories.
- If you use GitHub Team for your organization you will also get enhancements for your Public and Private repositories as-well as improved organization management better granular user role control.
- User Accounts
- A user account is for one person and some times is referred to as a `Personal Account`.
A person only needs one user account.You only need one Facebook account right!- This account can be used to host all of a user's project and also be used to login in to organizations.
- There are currently 2 pricing plans for an `personal` account, Free and Pro.
- If you are an individual developers with no commercial angle, then you should just use a personal/single account for all of your repositories.
- If you need more actions, features and that other stuff then you can upgrade your account to Pro.
- I would use my personal account where I need to fork a repo to push some fixes to someone else's code.
- A user can own more than one organization.
- Organizations
- Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once, with sophisticated security and administrative features.
- GitHub Free allows you to add as many members and collaborators to your organization as you’d like at no charge.
- There are currently 3 pricing plans for an account, Free, Team and Enterprise.
- Having an organization for your company ensures that the assets are not controlled by single member of staff under their personal account.
You should use an organization for your code if:
- If you are a company and you are making software.
- If you are a individual developer or a company that is going to sell software.
- You will need to collaborate with team members or other entities.
- Your software project(s) will be large.
- Features:
- Allow for collaboration between team members and other entities.
- Allows more granular permissions for repositories that belong to the organization.
- An organisation can have public and private members. Public members do not count towards your organizations seats.
- Allow for for organising repositories by groups such as; Company, Code Language, Software Type, etc.....
- You can convert your personal account into an organization (but this is not best practice).
- You can identify an organization easily because thy have a people tab.
- Organizations can have more than one organization owner to avoid lapses in ownership.
- Teams
- The concept of Teams in GitHub allows for greater flexibility for collaboration and integration, as well as separation of repositories and permissions.
- Enterprise accounts
- Are for very large companies, or those teams that need to manage multiple organisations but all under the same company banner.
- Pricing is done per member, each member requires a seat/license, I am assuming there will always be at leats one member.
- Discounts
- Discounted plans for GitHub accounts - GitHub Docs - GitHub provides discounts to students, educators, educational institutions, nonprofits, and libraries.
.com with .dev in the URL. For example, this repo https://github.com/github/dev becomes http://github.dev/github/devRepository --> Insights --> Forks
Repository Type = Network (Forks of other forks) can be quite useful.https://github.com/Open-Shell/Open-Shell-Menu/compare/v4.4.190...v4.4.191
/stargazers to the end of the repositories URL.GitHub Free and GitHub Pro follow the instructions below:
This section will deal with configuring GitHub for your developing and company needs.
- The hierarchy of GitHub is as follows:
- Enterprise Account --> Organization --> Repository --> Users
Does setting up a SSH key and PAT allow me to use them to recover my account with my email address when locked out of my account???
Read this article, it is very clear and calming.
- How to Recover Your GitHub Account
- Regain access to your GitHub account with a step-by-step guide on using 2FA codes, email verification, and support requests for account recovery.
- Best Practices to Prevent Account Lockout
- Setting Up Multiple 2FA Methods for Backup
- Downloading and Securely Storing Recovery Codes
- Ensuring Access to Verified Devices and Email Addresses


This is covering the use of 2FA on GitHub.
- If you loose your 2FA methods and your Recovery codes then you will be locked out of your account permanently, this is to protect GitHub and users from social engineering.
- You can use any 2FA method you have configured to login which is useful if you loose access to one.
- Make sure you set up as many recovery methods as possible.
- Having multiple 2FA methods reduces the risk of users getting locked out of their accounts
- 2FA does not just mean TOTP, you can also add SMS, Github Mobile.
- SMS is not really secure, but easy to setup and can prevent lockout.
- Download and print out your Recovery codes
- When you change your password your Recovery Codes will be revoked and new ones issued which you should download immediately.
- Download 2FA Recovery codes here:
Profile --> Settings --> Access --> Password and authentication --> Recovery options --> Recovery codes --> View
The search feature on GitHub is very powerful and is underused by a lot of people.
in:title findme
AND keyword
is:issue state:open in:title issue AND reporter
GET /search/issues?q=text+to+search+in:title+repo:some/repo
- This free feature allows you to run websites directly from GitHub, even with your own custom domain name. Useful for small developers who are bandwidth constrained.
- GitHub pages host only static HTML pages. No server side technology is supported, so Node.js applications won't run on GitHub pages.
- GitHub pages does support the Jekyll template system.
master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.What are they and how to do you create, edit and share them.
in the marketplace, how do i use them + put examples here.
Settings --> Code, planning and automation --> Repositories --> Repository default branch: master/main
- TL;DR
- kebab-case
- Lowercase letters
- Hyphens for word separation
- No spaces
- No numbers
- No emojies
- Say what the repo is about in 3–5 words max
- If you are company or team consider using a format such as:
- [prefix]-[project-name]-[suffix]
- [team-name]-[service-name]-[environment]
Links
| Project Type | Naming Pattern | Example |
| Language/framework library | language-name or framework-name |
python-requests, react-router |
| Tool or CLI application | action-verb or tool-purpose |
git-flow, docker-compose |
| Website or service | service-name or domain-name |
blog-nextjs, api-gateway |
| Learning/tutorial project | learn-topic or topic-tutorial |
learn-golang, javascript-fundamentals |
| Fork or variation | original-fork or variant-description |
lodash-es, prettier-plugin-vue |
| Fork or variation | dotfiles or config-purpose |
dotfiles, eslint-config |
Once your organizational structure (or not) is configured you then actually need to create your repos. In this section we will deal with how to setup a nice looking repository to ge the best out of it.
joomla joomla-component joomla-extensions app-server app-site
Bad: https://github.com/webmin/authentic-theme/blob/0ca0f9e215fdad49e028158f1f0d5096295a8595/tconfig-lib.pl#L201C1-L204C6
Good: https://github.com/webmin/authentic-theme/blob/0ca0f9e215fdad49e028158f1f0d5096295a8595/tconfig-lib.pl#L201-L204

LF(Unix/Linux) locallyCRLF(Windows) to LF(Linux/Unix) endings before submission and vice-versa upon checkout.^M represents carriage return (CR). This diff means something removed a Unicode BOM from the beginning of the line and added a CR at the end.^M is in the new-changes side (right/green side), then that means the file's line-endings were changed from LF to CRLF, otherwise, file was CRLF and is now changed to LF.^ symbol stands for Control, so ^M means Ctrl+M.^A is character code 1 (because A is 65). ^M is 77 - 64 = 13 (because M is 77), which corresponds to carriage return in ASCII.^L represents the form-feed character (FF is the abbreviation, not hexadecimal), and has ASCII value 12 or 0x0C.Try
git config core.whitespace cr-at-eol to hide it from the diffgit config --global core.autocrlf trueCR would return the carriage to the first position of the line while LF would feed to the next line.CR+LF in the file themselves made it possible to send a file directly to the printer, without any kind of printer driver.CR and LF when they were first used.
I have found recently a lot of Google searches takes me to the repo/blob page for that particular GitHub asset, so I made these scripts.
Here I show you how you can manually convert the URLs which can be useful to also explain the process
## Formula for Converting https://github.com/<owner>/<repo>/blob/<branch>/<content-path>/<file>.md --> https://<site-domain>/<lang>/<content-path>/<file> ## Example https://github.com/github/docs/blob/main/content/search-github/searching-on-github/searching-issues-and-pull-requests.md --> https://docs.github.com/en/search-github/searching-on-github/searching-issues-and-pull-requests
javascript:(async function(){
try {
const repoUrl = window.location.href;
if(!repoUrl.includes("/blob/")){
alert("This does not appear to be a GitHub file URL.");
return;
}
// Extract owner, repo, branch, and path
const match = repoUrl.match(/github\.com\/([^\/]+)\/([^\/]+)\/blob\/([^\/]+)\/(.+)/);
if(!match){
alert("Failed to parse repo URL.");
return;
}
const owner = match[1];
const repo = match[2];
const branch = match[3];
let path = match[4];
// Remove .md extension if present
if(path.endsWith(".md")) path = path.slice(0,-3);
// Try to get homepage from GitHub API
const apiUrl = `https://api.github.com/repos/${owner}/${repo}`;
const response = await fetch(apiUrl);
const repoData = await response.json();
let siteDomain = repoData.homepage || `https://${owner}.github.io/${repo}`;
// Optional: detect /content/ folder like GitHub Docs
if(path.startsWith("content/")){
path = path.replace(/^content\//,'');
}
// Assume English for GitHub Docs style
const lang = (owner === "github" && repo === "docs") ? "/en" : "";
// Build final URL
const finalUrl = `${siteDomain}${lang}/${path}`;
window.location.href = finalUrl;
} catch(e){
alert("Error converting URL: " + e);
console.error(e);
}
})();
Console Version
javascript: (async function(){
try{
const repoUrl = window.location.href;
const blobMatch = repoUrl.match(/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)\/blob\/([^\/]+)\/(.+)$/);
if(!blobMatch){
alert("This doesn't look like a GitHub file URL (must be a /blob/ file page).");
return;
}
const owner = blobMatch[1];
const repo = blobMatch[2];
// const branch = blobMatch[3]; // branch not used but could be
let path = blobMatch[4]; // e.g. content/search-github/....
// If path contains a 'content' like folder used by many doc repos, strip known prefixes
const prefixes = ["content/", "docs/content/", "docs/", "website/content/", "src/content/", "site/content/"];
for(const p of prefixes){
if(path.startsWith(p)){
path = path.slice(p.length);
break;
}
}
// Remove .md if present
if(path.endsWith(".md")) path = path.slice(0,-3);
// Convert index/README to directory root
path = path.replace(/(?:\/|^)(index|README)$/i, "");
path = path.replace(/\/+$/,""); // trim trailing slashes
// Special-case for official github/docs repo (friendly mapping)
if(owner === "github" && repo === "docs"){
const base = "https://docs.github.com";
const langSegment = "/en"; // adjust if you need another language
const final = base + langSegment + (path ? "/" + path : "");
window.location.href = final;
return;
}
// Try Pages API (gives correct html_url for Pages, including custom CNAME)
let siteBase = null;
try{
const pagesResp = await fetch(`https://api.github.com/repos/${owner}/${repo}/pages`);
if(pagesResp.ok){
const pagesData = await pagesResp.json();
if(pagesData && pagesData.html_url){
siteBase = pagesData.html_url.replace(/\/+$/,"");
}
}
} catch(e){
// ignore and try fallback
}
// Fallback: repo homepage field
if(!siteBase){
try{
const repoResp = await fetch(`https://api.github.com/repos/${owner}/${repo}`);
if(repoResp.ok){
const repoData = await repoResp.json();
if(repoData && repoData.homepage){
siteBase = repoData.homepage.replace(/\/+$/,"");
}
}
} catch(e){}
}
// Final fallback: standard GitHub Pages pattern
if(!siteBase){
siteBase = `https://${owner}.github.io/${repo}`;
}
// Build final URL, avoid duplicate slashes
const finalUrl = siteBase + (path ? (siteBase.endsWith("/") ? "" : "/") + path : "");
window.location.href = finalUrl;
} catch(err){
alert("Conversion failed: " + err);
console.error(err);
}
})();
Bookmarklet Version
javascript:(async function(){try{const repoUrl=window.location.href;const m=repoUrl.match(/^https?:\/\/github\.com\/([^\/]+)\/([^\/]+)\/blob\/([^\/]+)\/(.+)$/);if(!m){alert("Not a GitHub /blob/ file URL.");return;}const owner=m[1],repo=m[2];let path=m[4];const prefixes=["content/","docs/content/","docs/","website/content/","src/content/","site/content/"];for(const p of prefixes)if(path.startsWith(p)){path=path.slice(p.length);break;}if(path.endsWith(".md"))path=path.slice(0,-3);path=path.replace(/(?:\/|^)(index|README)$/i,"");path=path.replace(/\/+$/,"");if(owner==="github"&&repo==="docs"){const final="https://docs.github.com/en"+(path?"/"+path:"");window.location.href=final;return;}let siteBase=null;try{const r=await fetch(`https://api.github.com/repos/${owner}/${repo}/pages`);if(r.ok){const d=await r.json();if(d&&d.html_url)siteBase=d.html_url.replace(/\/+$/,"");}}catch(e){}if(!siteBase){try{const r2=await fetch(`https://api.github.com/repos/${owner}/${repo}`);if(r2.ok){const rd=await r2.json();if(rd&&rd.homepage)siteBase=rd.homepage.replace(/\/+$/,"");}}catch(e){} }if(!siteBase)siteBase=`https://${owner}.github.io/${repo}`;const finalUrl=siteBase+(path? (siteBase.endsWith("/")?"" : "/")+path:"");window.location.href=finalUrl;}catch(e){alert("Error: "+e);console.error(e);} })();
Notes
https://<owner>.github.io/<repo> or the repo homepage if present./blob/ file page. It will alert if you're not.github/docs it forces https://docs.github.com/en/... which matches their site structure.So you have come across a nice profile and want to know how they did certain badges or layouts on their profile page using Markdown, then these are the instructions for you.
Important Note
- Not all GitHub profiles have custom README files. The profile README feature is relatively new, so many users haven't created one yet.
- If the USERNAME/USERNAME repository doesn't exist or there's no README.md file, that user simply hasn't set up a custom profile.
The README markdown, for a profile, is stored in a special repository. To see the markdown source code for any GitHub user's profile:
Alternatively, you can navigate directly to the raw markdown by following the URL logic below:
https://github.com/shoulders --> https://github.com/shoulders/shoulders/raw/main/README.md --> https://raw.github.com/shoulders/shoulders/raw/main/README.md
Convert the URL by following the URL logic below:
## Logic https://<USERNAME>.github.io/<REPOSITORY>/ --> https://github.com/<USERNAME>/<REPOSITORY> ## Example https://shoulders.github.io/mysql-slow-query-log-visualizer/ --> https://github.com/shoulders/mysql-slow-query-log-visualizer
This content is not all specific to GitHub but deserves to be separate section.
Things like flags and badges. I will add the code and tutorials for them here.
- I cannot find an article listing all of the GitHub badge commands:
[github-downloads-uri][![Version][github-version-img]][github-version-uri][![Downloads][github-downloads-img]][github-downloads-uri][![Size][github-size-img]][github-size-img]- etc...
You will see these badges all over the place and they can be very useful to provide feedback to you userbase. Essentiall they are dynamically created images which can also be clickable.
These badges are small visual labels that show project stats such as version, downloads, file size, commit activity, or contributors.
They can be used in your Profile or on a project's README.


[![Version][github-version-img]][github-version-uri] [![Downloads][github-downloads-img]][github-downloads-uri]
## ? Projects [](https://github.com/shoulders/dns-hijacking-inspector) [](https://qwertycube.com/dns-hijacking-inspector/)  ## ?️ Tech Stack ### Languages     ### Frontend    ### Backend   ### Desktop   ### Mobile  ### Deployment   
[](https://github.com/USERNAME/REPO/releases) [](https://github.com/USERNAME/REPO/releases) [](https://github.com/USERNAME/REPO/commits) [](https://github.com/USERNAME/REPO/graphs/contributors) [](LICENSE)
<img src="/docs/images/logos/csf.png" height="230"> <!-- prettier-ignore-start --> [![Version][github-version-img]][github-version-uri] [![Downloads][github-downloads-img]][github-downloads-uri] [![Size][github-size-img]][github-size-img] [![Last Commit][github-commit-img]][github-commit-img] [![Contributors][contribs-all-img]](#contributors-) [](https://docs.configserver.dev) <!-- prettier-ignore-end --> <div align="center"> [](https://discord.configserver.dev)[](https://discord.configserver.dev)
Documentation [](https://deepwiki.com/michen00/invisible-squiggles)
<!-- Copy-paste in your Readme.md file --> <a href = "https://github.com/open-reSource/openresource.dev/graphs/contributors"> <img src = "https://contrib.rocks/image?repo=open-reSource/openresource.dev"/> </a> Made with [contributors-img](https://contrib.rocks).
<img> tag.
## Closed by default (Standard) <details> <summary>Always visible</summary> Content is hidden by default </details> ## Open by default <details open> <summary>Always visible</summary> Content is visible by default </details> ## Nestable <details> <summary>Parent Section</summary> <details> <summary>Child Section</summary> Nested content here </details> </details>
- Generate a new repository using an existing repository as a tempalte using this command:
https://github.com/<user>/<repo>/generate
.gitignore file tells Git which files and folders to ignore (not track).I will include how to use Git in VSCode tips and tricks.
## CentOS / Alma / Rocky / RHEL cd /usr/libexec/webmin/virtual-server ## Ubuntu cd /usr/share/webmin/virtual-server ## Common (the actual patch command) curl https://github.com/virtualmin/virtualmin-gpl/commit/7037f778b30eda80bb9a8a3a1bd4065377763b1c.patch | git apply --reject --whitespace=fix curl https://github.com/virtualmin/virtualmin-gpl/commit/85f803eb05e1fe8db0b59bd5a44fec8590034e88.patch | git apply --reject --whitespace=fixThis is from https://github.com/virtualmin/virtualmin-gpl/issues/747
These are just here for reference, you should only use VSCode with the relevant extensions. It should be noted most IDE also have visual GUIs for handling Git.
There are all of these files and folders that everyone seems to use so I am going to try and get a full list.
vsce) which files/folders to exclude from your .vsix package.init eslint in vscode via npm then a eslint.config.mjs is created.