Skip to content

Instantly share code, notes, and snippets.

View LoganDark's full-sized avatar

LoganDark LoganDark

View GitHub Profile
@LoganDark
LoganDark / README.md
Last active February 2, 2024 21:32
I can't profile on my Windows PC

Update #2

I was able to rebuild perf in order to make it work. My previous version of perf was built with these features:

...                         dwarf: [ OFF ]
...            dwarf_getlocations: [ OFF ]
...                         glibc: [ on  ]
...                        libbfd: [ OFF ]
...                libbfd-buildid: [ OFF ]
@LoganDark
LoganDark / backup.md
Created May 31, 2022 11:15
Back up your computer

Preface

There are many ways to back up your computer. In order from least effective to most effective, we have:

  • Copy all the files manually to another disk periodically. (Optionally, use an automated tool for this, like rsync.)

    This sucks. Most of the time you don't even preserve permissions. Plus it's horribly error-prone. And you also can't restore a working system from it.

  • Image your entire boot drive.

@LoganDark
LoganDark / upgrade.md
Created May 31, 2022 11:18
Perform an in-place upgrade

Why not reinstall?

You may have seen that the premier advice online whenever literally anything goes wrong is to reinstall Windows. No, don't reset or refresh - wipe your hard drive and reinstall the entire OS. Windows can't be trusted to unbreak invariants.

What are invariants?

For non-technical users, "invariants" are rules that must apply in order for an operating system to work correctly. This includes things like file & folder permissions being correct. These invariants are sometimes broken which result in one or more parts of your working system becoming nonworking.

Windows is famously bad at repairing broken invariants, which is why the advice is typically that you need to reinstall the entire thing - to get a fresh new system with all the invariants upheld.