Skip to content

Instantly share code, notes, and snippets.

View Eperty123's full-sized avatar

EP Eperty123

  • Denmark
View GitHub Profile
@Eperty123
Eperty123 / PDiskInformation.cs
Created October 8, 2021 12:13 — forked from mjs3339/PDiskInformation.cs
C# Get Physical Disk Information using WMI and MSFT_PhysicalDisk
public class PDiskInformation
{
private Dictionary<string, PhysicalDiskStruct> _pdiCache = new Dictionary<string, PhysicalDiskStruct>();
public Dictionary<string, PhysicalDiskStruct> PDiskInfo
{
get
{
if(_pdiCache.Count == 0)
_pdiCache = GetDiskPI();
return _pdiCache;
@Eperty123
Eperty123 / delete_git_submodule.md
Created May 23, 2021 00:18 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@Eperty123
Eperty123 / JunctionPoint.cs
Created November 19, 2020 19:11 — forked from LGM-AdrianHum/JunctionPoint.cs
Create, Delete and Examine Junction Points in C#
// File: RollThroughLibrary/CreateMaps/JunctionPoint.cs
// User: Adrian Hum/
//
// Created: 2017-11-19 2:46 PM
// Modified: 2017-11-19 6:10 PM
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Runtime.InteropServices;